]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: allow local fragmentation in ip_finish_output_gso()
authorLance Richardson <lrichard@redhat.com>
Wed, 2 Nov 2016 20:36:17 +0000 (16:36 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Nov 2016 20:10:26 +0000 (16:10 -0400)
commit24d05de5f993eb16486c6073ce4c7e3dc6b2c239
treeb52ae6938861f8a9ce99c46db958b28a7ac321fd
parentec51340930da86e046279a0b3bef2ed7db0f2376
ipv4: allow local fragmentation in ip_finish_output_gso()

Some configurations (e.g. geneve interface with default
MTU of 1500 over an ethernet interface with 1500 MTU) result
in the transmission of packets that exceed the configured MTU.
While this should be considered to be a "bad" configuration,
it is still allowed and should not result in the sending
of packets that exceed the configured MTU.

Fix by dropping the assumption in ip_finish_output_gso() that
locally originated gso packets will never need fragmentation.
Basic testing using iperf (observing CPU usage and bandwidth)
have shown no measurable performance impact for traffic not
requiring fragmentation.

Fixes: c8b6e92431b1 ("net: ip: push gso skb forwarding handling down the stack")
Reported-by: Jan Tluka <jtluka@redhat.com>
Signed-off-by: Lance Richardson <lrichard@redhat.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip.h
net/ipv4/ip_forward.c
net/ipv4/ip_output.c
net/ipv4/ip_tunnel_core.c
net/ipv4/ipmr.c