Folks

I have a doubt about the behaviour of a Linux IPv4 raw socket, with the 
IP_HDRINCL option set, rejecting a packet bigger than the outgoing interface’s 
MTU size with EMSGSIZE.  Please take a look at the following and let me know if 
I should make a kernel code change to remove this behaviour and fragment the 
packet instead.

- raw_send_hdrinc() (net/ipv4/raw.c) has an explicit check for (length > 
rt->dst.dev->mtu), returning -EMSGSIZE if this is true.

- I do not understand the reason for this restriction.  If a packet was 
received on one interface and routed out through another interface with a 
smaller MTU then the packet would be fragmented.  Why is a locally originated 
packet treated differently?

- I note that the “raw(7) - Linux man page” lists “When the IP_HDRINCL option 
is set, datagrams will not be fragmented and are limited to the interface MTU” 
as a known bug.

Please let me know if you have any questions.

Regards
Alan Davey


Reply via email to