--- /dev/null
+--- ggaoed-1.1/netlink.c.orig 2011-06-20 19:57:17.000000000 +0200
++++ ggaoed-1.1/netlink.c 2011-06-20 20:27:47.426951722 +0200
+@@ -174,7 +174,7 @@
+ int len;
+
+ addrlen = sizeof(from_addr);
+- len = recvfrom(nl_fd, recvbuf, recvlen, MSG_TRUNC | MSG_DONTWAIT,
++ len = recvfrom(nl_fd, recvbuf, recvlen, MSG_TRUNC | MSG_DONTWAIT | MSG_PEEK,
+ (struct sockaddr *)&from_addr, &addrlen);
+ if (!len)
+ return;
+@@ -185,13 +185,12 @@
+ }
+ if (len > recvlen)
+ {
+- /* The buffer was too small. Increase it and request a
+- * new enumeration */
+- recvlen <<= 1;
++ /* The buffer was too small. Increase it and try again... */
++ recvlen = len;
+ recvbuf = g_realloc(recvbuf, recvlen);
+- netmon_enumerate();
+- return;
+ }
++ len = recvfrom(nl_fd, recvbuf, recvlen, MSG_TRUNC | MSG_DONTWAIT,
++ (struct sockaddr *)&from_addr, &addrlen);
+
+ for (msg = (struct nlmsghdr *)recvbuf; NLMSG_OK(msg, (unsigned)len);
+ msg = NLMSG_NEXT(msg, len))
Summary: ggaoed - ATA over Ethernet target implementation for Linux
Name: ggaoed
Version: 1.1
-Release: 1
+Release: 2
License: GPL v2
Group: Networking/Daemons
Source0: http://ggaoed.googlecode.com/files/%{name}-%{version}.tar.gz
Source1: %{name}.init
Source2: %{name}.sysconfig
Patch0: %{name}-build.patch
+Patch1: %{name}-netlink-rx-buffer-realloc.patch
URL: http://code.google.com/p/ggaoed/
BuildRequires: docbook2X >= 0.8
BuildRequires: glib2-devel >= 2.12
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
%build
%configure