summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorHannes Frederic Sowa <hannes@stressinduktion.org>2013-10-27 17:29:11 +0100
committerDavid S. Miller <davem@davemloft.net>2013-10-29 00:15:22 -0400
commitdaba287b299ec7a2c61ae3a714920e90e8396ad5 (patch)
tree388feed8fdf3b531da0d365a06d36ae6fcd5bdab /net/core
parent2613af0ed18a11d5c566a81f9a6510b73180660a (diff)
downloadop-kernel-dev-daba287b299ec7a2c61ae3a714920e90e8396ad5.zip
op-kernel-dev-daba287b299ec7a2c61ae3a714920e90e8396ad5.tar.gz
ipv4: fix DO and PROBE pmtu mode regarding local fragmentation with UFO/CORK
UFO as well as UDP_CORK do not respect IP_PMTUDISC_DO and IP_PMTUDISC_PROBE well enough. UFO enabled packet delivery just appends all frags to the cork and hands it over to the network card. So we just deliver non-DF udp fragments (DF-flag may get overwritten by hardware or virtual UFO enabled interface). UDP_CORK does enqueue the data until the cork is disengaged. At this point it sets the correct IP_DF and local_df flags and hands it over to ip_fragment which in this case will generate an icmp error which gets appended to the error socket queue. This is not reflected in the syscall error (of course, if UFO is enabled this also won't happen). Improve this by checking the pmtudisc flags before appending data to the socket and if we still can fit all data in one packet when IP_PMTUDISC_DO or IP_PMTUDISC_PROBE is set, only then proceed. We use (mtu-fragheaderlen) to check for the maximum length because we ensure not to generate a fragment and non-fragmented data does not need to have its length aligned on 64 bit boundaries. Also the passed in ip_options are already aligned correctly. Maybe, we can relax some other checks around ip_fragment. This needs more research. Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud