[lkml]   [2007]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Problem with unix sockets: SOCK_DGRAM ignores MSG_TRUNC
On Monday 05 February 2007 01:52, David Miller wrote:
> What UDP is doing is different, it's returning the full packet length
> when the packet is larger then the given buffer size, but it does this
> irregardless of whether you set MSG_TRUNC in the recvmsg() passed-in
> flags. UDP itself sets the MSG_TRUNC flag when it detects this
> situation.

I hope that I am researching the appropriate kernel source tree, but if I
am not mistaken, this behaviour was introduced with change 1.66 according
to bitkeeper:

I think the bitkeeper comment on that change (1.66) is misleading:
"[UDP]: Return true length if user specifies MSG_TRUNC."

As you said, this is wrong. The true length is returned, regardless
whether the user specified MSG_TRUNC.

Exploring this topic I learned a lot about browsing and reading kernel
source code, e.g. that commit statements have to be taken with a grain of
salt :-)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-02-07 10:35    [W:0.091 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site