• X
    ip6_gre: process toobig in a better way · fe1a4ca0
    Xin Long 提交于
    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: NXin Long <lucien.xin@gmail.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    fe1a4ca0
ip6_gre.c 39.2 KB