[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <200702071031.58463.dkabs@mobotix.com>
Date: Wed, 7 Feb 2007 10:31:57 +0100
From: Daniel Kabs <dkabs@...otix.com>
To: David Miller <davem@...emloft.net>
Cc: linux-kernel@...r.kernel.org
Subject: Re: 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:
http://linux.bkbits.net:8080/linux-2.6/net/ipv4/udp.c?PAGE=history
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 :-)
Cheers
Daniel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists