Skip to content

Commit

Permalink
ip_tunnel: Resolve ipsec merge conflict properly.
Browse files Browse the repository at this point in the history
We want to use dev_set_mtu() regardless of how we calculate
the mtu value.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Mar 29, 2018
1 parent 2d2d99e commit 5568cdc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions net/ipv4/ip_tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 5568cdc

Please sign in to comment.