linux-stable/net
Alexey Kodanev 1139d77d8a ip6_vti: adjust vti mtu according to mtu of lower device
[ Upstream commit 53c81e95df ]

LTP/udp6_ipsec_vti tests fail when sending large UDP datagrams over
ip6_vti that require fragmentation and the underlying device has an
MTU smaller than 1500 plus some extra space for headers. This happens
because ip6_vti, by default, sets MTU to ETH_DATA_LEN and not updating
it depending on a destination address or link parameter. Further
attempts to send UDP packets may succeed because pmtu gets updated on
ICMPV6_PKT_TOOBIG in vti6_err().

In case the lower device has larger MTU size, e.g. 9000, ip6_vti works
but not using the possible maximum size, output packets have 1500 limit.

The above cases require manual MTU setup after ip6_vti creation. However
ip_vti already updates MTU based on lower device with ip_tunnel_bind_dev().

Here is the example when the lower device MTU is set to 9000:

  # ip a sh ltp_ns_veth2
      ltp_ns_veth2@if7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 ...
        inet 10.0.0.2/24 scope global ltp_ns_veth2
        inet6 fd00::2/64 scope global

  # ip li add vti6 type vti6 local fd00::2 remote fd00::1
  # ip li show vti6
      vti6@NONE: <POINTOPOINT,NOARP> mtu 1500 ...
        link/tunnel6 fd00::2 peer fd00::1

After the patch:
  # ip li add vti6 type vti6 local fd00::2 remote fd00::1
  # ip li show vti6
      vti6@NONE: <POINTOPOINT,NOARP> mtu 8832 ...
        link/tunnel6 fd00::2 peer fd00::1

Reported-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-24 11:00:25 +01:00
..
6lowpan
9p 9p/trans_virtio: discard zero-length reply 2018-02-22 15:43:50 +01:00
802
8021q net/8021q: create device with all possible features in wanted_features 2018-03-22 09:17:40 +01:00
appletalk
atm
ax25 ax25: Fix segfault after sock connection timeout 2017-02-04 09:47:09 +01:00
batman-adv batman-adv: handle race condition for claims between gateways 2018-03-22 09:17:41 +01:00
bluetooth Bluetooth: 6lowpan: fix delay work init in add_peer_chan() 2018-03-22 09:17:52 +01:00
bridge netfilter: bridge: ebt_among: add missing match size checks 2018-03-18 11:18:53 +01:00
caif net: caif: Fix a sleep-in-atomic bug in cfpkt_create_pfx 2017-07-05 14:40:14 +02:00
can can: af_can: canfd_rcv(): replace WARN_ONCE by pr_warn_once 2018-01-31 12:55:50 +01:00
ceph libceph: don't WARN() if user tries to add invalid key 2017-11-30 08:39:03 +00:00
core net: fix race on decreasing number of TX queues 2018-03-11 16:21:31 +01:00
dcb net: dcb: set error code on failures 2016-12-03 23:54:25 -05:00
dccp dccp: CVE-2017-8824: use-after-free in DCCP code 2018-02-17 13:21:13 +01:00
decnet dn_getsockoptdecnet: move nf_{get/set}sockopt outside sock lock 2018-02-25 11:05:44 +01:00
dns_resolver KEYS: Fix race between updating and finding a negative key 2017-10-27 10:38:11 +02:00
dsa net: dsa: select NET_SWITCHDEV 2017-11-15 15:53:17 +01:00
ethernet net: introduce device min_header_len 2017-02-18 15:11:43 +01:00
hsr
ieee802154 Revert "net: fix percpu memory leaks" 2017-09-20 08:19:55 +02:00
ipv4 tcp: remove poll() flakes with FastOpen 2018-03-24 11:00:12 +01:00
ipv6 ip6_vti: adjust vti mtu according to mtu of lower device 2018-03-24 11:00:25 +01:00
ipx ipx: call ipxitf_put() in ioctl error path 2017-05-25 15:44:41 +02:00
irda irda: do not leak initialized list.dev to userspace 2017-08-30 10:21:42 +02:00
iucv net/af_iucv: don't use paged skbs for TX on HiperSockets 2017-01-19 20:18:04 +01:00
kcm kcm: Only allow TCP sockets to be attached to a KCM mux 2018-02-25 11:05:40 +01:00
key af_key: fix buffer overread in parse_exthdrs() 2018-01-23 19:57:05 +01:00
l2tp l2tp: cleanup l2tp_tunnel_delete calls 2017-12-20 10:07:31 +01:00
l3mdev
lapb
llc net/llc: avoid BUG_ON() in skb_orphan() 2017-02-26 11:10:50 +01:00
mac80211 mac80211: Fix possible sband related NULL pointer de-reference 2018-03-24 11:00:17 +01:00
mac802154
mpls mpls, nospec: Sanitize array index in mpls_label_ok() 2018-03-11 16:21:34 +01:00
ncsi
netfilter netfilter: x_tables: unlock on error in xt_find_table_lock() 2018-03-24 11:00:17 +01:00
netlabel
netlink netlink: ensure to loop over all netns in genlmsg_multicast_allns() 2018-03-11 16:21:32 +01:00
netrom
nfc NFC: fix device-allocation error return 2017-11-30 08:39:07 +00:00
openvswitch openvswitch: Delete conntrack entry clashing with an expectation. 2018-03-24 11:00:14 +01:00
packet net/packet: fix a race in packet_bind() and packet_notifier() 2017-12-16 16:25:45 +01:00
phonet
qrtr net: qrtr: Mark 'buf' as little endian 2017-12-09 22:01:51 +01:00
rds rds: tcp: atomically purge entries from rds_tcp_conn_list during netns delete 2018-02-25 11:05:43 +01:00
rfkill
rose
rxrpc rxrpc: Fix send in rxrpc_send_data_packet() 2018-03-11 16:21:32 +01:00
sched sched: act_csum: don't mangle TCP and UDP GSO packets 2018-03-22 09:17:42 +01:00
sctp sctp: verify size of a new chunk in _sctp_make_chunk() 2018-03-11 16:21:34 +01:00
strparser strparser: destroy workqueue on module exit 2017-03-22 12:43:33 +01:00
sunrpc xprtrdma: Cancel refresh worker during buffer shutdown 2018-03-24 11:00:15 +01:00
switchdev
tipc tipc: check return value of nlmsg_new 2018-03-24 11:00:14 +01:00
unix net/unix: don't show information about sockets from other namespaces 2017-11-18 11:22:22 +01:00
vmw_vsock vsock: cancel packets when failing to connect 2017-12-25 14:23:38 +01:00
wimax
wireless nl80211: Check for the required netlink attribute presence 2018-03-03 10:23:26 +01:00
x25
xfrm net: xfrm: allow clearing socket xfrm policies. 2018-03-22 09:17:54 +01:00
compat.c audit: log 32-bit socketcalls 2017-10-08 10:26:06 +02:00
Kconfig
Makefile
socket.c bpf: introduce BPF_JIT_ALWAYS_ON config 2018-01-31 12:55:56 +01:00
sysctl_net.c