summaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_tunnel.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-03-29 17:42:14 +0200
committerDavid S. Miller <davem@davemloft.net>2018-03-29 17:42:14 +0200
commit5568cdc368c349eee7b5fc48bc956234a0828d71 (patch)
tree504f8fa0ce3f02fb51d09fe095849e0cc816a6e6 /net/ipv4/ip_tunnel.c
parentlan78xx: Crash in lan78xx_writ_reg (Workqueue: events lan78xx_deferred_multic... (diff)
downloadlinux-5568cdc368c349eee7b5fc48bc956234a0828d71.tar.xz
linux-5568cdc368c349eee7b5fc48bc956234a0828d71.zip
ip_tunnel: Resolve ipsec merge conflict properly.
We want to use dev_set_mtu() regardless of how we calculate the mtu value. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_tunnel.c')
-rw-r--r--net/ipv4/ip_tunnel.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
index f3db1f35a79d..a7fd1c5a2a14 100644
--- a/net/ipv4/ip_tunnel.c
+++ b/net/ipv4/ip_tunnel.c
@@ -1120,14 +1120,14 @@ int ip_tunnel_newlink(struct net_device *dev, struct nlattr *tb[],
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 {
- err = dev_set_mtu(dev, mtu);
- if (err)
- goto err_dev_set_mtu;
+ mtu = clamp(dev->mtu, (unsigned int)ETH_MIN_MTU,
+ (unsigned int)(max - sizeof(struct iphdr)));
}
+ err = dev_set_mtu(dev, mtu);
+ if (err)
+ goto err_dev_set_mtu;
+
ip_tunnel_add(itn, nt);
return 0;