]> asedeno.scripts.mit.edu Git - linux.git/commit
ip6_gre: process toobig in a better way
authorXin Long <lucien.xin@gmail.com>
Sat, 11 Nov 2017 11:06:50 +0000 (19:06 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Nov 2017 01:44:05 +0000 (10:44 +0900)
commitfe1a4ca0a2b7884672661284666a0b8c183b0b1e
tree8a775ed43e63751f6161569085c82395fcb966cc
parent929fc0327569aa745c9c3cb68a213c22fad3f3f9
ip6_gre: process toobig in a better way

Now ip6gre processes toobig icmp packet by setting gre dev's mtu in
ip6gre_err, which would cause few things not good:

  - It couldn't set mtu with dev_set_mtu due to it's not in user context,
    which causes route cache and idev->cnf.mtu6 not to be updated.

  - It has to update sk dst pmtu in tx path according to gredev->mtu for
    ip6gre, while it updates pmtu again according to lower dst pmtu in
    ip6_tnl_xmit.

  - To change dev->mtu by toobig icmp packet is not a good idea, it should
    only work on pmtu.

This patch is to process toobig by updating the lower dst's pmtu, as later
sk dst pmtu will be updated in ip6_tnl_xmit, the same way as in ip4gre.

Note that gre dev's mtu will not be updated any more, it doesn't make any
sense to change dev's mtu after receiving a toobig packet.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_gre.c