]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec
authorDavid S. Miller <davem@davemloft.net>
Thu, 29 Mar 2018 14:12:47 +0000 (10:12 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 29 Mar 2018 14:12:47 +0000 (10:12 -0400)
Steffen Klassert says:

====================
pull request (net): ipsec 2018-03-29

1) Fix a rcu_read_lock/rcu_read_unlock imbalance
   in the error path of xfrm_local_error().
   From Taehee Yoo.

2) Some VTI MTU fixes. From Stefano Brivio.

3) Fix a too early overwritten skb control buffer
   on xfrm transport mode.

Please note that this pull request has a merge conflict
in net/ipv4/ip_tunnel.c.

The conflict is between

commit f6cc9c054e77 ("ip_tunnel: Emit events for post-register MTU changes")

from the net tree and

commit 24fc79798b8d ("ip_tunnel: Clamp MTU to bounds on new link")

from the ipsec tree.

It can be solved as it is currently done in linux-next.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
1  2 
net/ipv4/ip_tunnel.c

index 7b85ffad5d74628bfde2aca5dbbf673bcaedc607,7c76dd17b6b90aa0803183cd53665919871a3839..f3db1f35a79dd3b6fab195e650baee9fedd4e5ec
@@@ -1117,10 -1108,13 +1117,15 @@@ int ip_tunnel_newlink(struct net_devic
                eth_hw_addr_random(dev);
  
        mtu = ip_tunnel_bind_dev(dev);
-       if (!tb[IFLA_MTU]) {
+       if (tb[IFLA_MTU]) {
+               unsigned int max = 0xfff8 - dev->hard_header_len - nt->hlen;
+               dev->mtu = clamp(dev->mtu, (unsigned int)ETH_MIN_MTU,
+                                (unsigned int)(max - sizeof(struct iphdr)));
+       } else {
 -              dev->mtu = mtu;
 +              err = dev_set_mtu(dev, mtu);
 +              if (err)
 +                      goto err_dev_set_mtu;
        }
  
        ip_tunnel_add(itn, nt);