[Bug 181741] [kernel] [patch] Packet loss when 'control' messages are present with large data (sendmsg(2))
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon Jan 9 00:37:13 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=181741
--- Comment #12 from chris.torek at gmail.com ---
The test code demonstrating the new bug is slightly wrong (or insufficient at
least). What's happening is that one of the attached patches also changes the
code in uipc_finalizecontrol() to always prepend SCM_CREDS to DGRAM sockets.
The result is that you need a larger control-message buffer here so that you
can get both the credentials (i.e., who sent you the fd) *and* the rights (the
fd itself). With the small control-message buffer you have room only for the
prepended credentials.
Apparently UNP_WANTCREDS is not set on the pre-connected SOCK_DGRAM socketpair.
So, dropping or altering that particular commit (so that it prepends SCM_CREDS
only if UNP_WANTCREDS is set, whether or not this is a one-shot stream-ish
socket or repeating datagram socket) will make the test program run. Or,
making its control message receive buffer bigger will also make the test
program run...
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-net
mailing list