tsocket/bsd: fix comment in tdgram_bsd_recvfrom_handler()
authorStefan Metzmacher <metze@samba.org>
Wed, 17 Feb 2010 18:11:11 +0000 (19:11 +0100)
committerKarolin Seeger <kseeger@samba.org>
Fri, 19 Feb 2010 13:32:29 +0000 (14:32 +0100)
metze
(cherry picked from commit c42d9c4ec410e205091784cd97cbceb5572609d8)
(cherry picked from commit d68c7db67dc8f87be8a924d1b2b66379fc52b723)

lib/tsocket/tsocket_bsd.c

index a0caa5af166f66e4644672cf1289455212a72c43..201788e9223b3b9ffc807485f458180fc46a2a51 100644 (file)
@@ -878,8 +878,10 @@ static void tdgram_bsd_recvfrom_handler(void *private_data)
        }
 
        /*
-        * some systems too much bytes in tsocket_bsd_pending()
-        * the return value includes some IP/UDP header bytes
+        * Some systems (FreeBSD, see bug #7115) return too much
+        * bytes in tsocket_bsd_pending()/ioctl(fd, FIONREAD, ...),
+        * the return value includes some IP/UDP header bytes,
+        * while recvfrom() just returns the payload.
         */
        state->buf = talloc_realloc(state, state->buf, uint8_t, ret);
        if (tevent_req_nomem(state->buf, req)) {