Brian Candler wrote:
On Wed, Nov 29, 2006 at 06:08:51PM -0500, John Heffner wrote:
A couple things to keep in mind. One, if you are sending something
larger than the interface MTU (or the current route cache MTU), you will
not get an ICMP Can't Fragment from anything, and hence no EMSGSIZE.
The kernel will automatically fragment these and everything is happy.
Also, you will only get EMSGSIZE on a connected socket. It is
nonsensical on an unconnected socket with a sendto() call.
That's useful, thank you.
Does it therefore still make sense to set DF=1 on outbound packets from an
unconnected socket?
It does, because you still want to do MTU discovery at the IP layer. IP
wants to get back Can't Fragment responses so it can fragment to the
right size. (1) This saves downstream routers a lot of work, and (2)
it's mandatory (implicit) for IPv6 since routers can't fragment packets
ever.
-John
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html