[PATCH] net: l2tp_eth: fix max_mtu
From: Asbjoern Sloth Toennesen
Date: Thu Oct 20 2016 - 16:15:46 EST
Fixes: 61e84623ace3 ("net: centralize net_device min/max MTU checking")
CC: netdev@xxxxxxxxxxxxxxx
CC: Jarod Wilson <jarod@xxxxxxxxxx>
Signed-off-by: Asbjoern Sloth Toennesen <asbjorn@xxxxxxxxxx>
---
net/l2tp/l2tp_eth.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/l2tp/l2tp_eth.c b/net/l2tp/l2tp_eth.c
index 965f7e3..ba82dcc 100644
--- a/net/l2tp/l2tp_eth.c
+++ b/net/l2tp/l2tp_eth.c
@@ -259,6 +259,7 @@ static int l2tp_eth_create(struct net *net, u32 tunnel_id, u32 session_id, u32 p
session->mtu = dev->mtu - session->hdr_len;
dev->mtu = session->mtu;
dev->needed_headroom += session->hdr_len;
+ dev->max_mtu = ETH_MAX_MTU - dev->needed_headroom;
priv = netdev_priv(dev);
priv->dev = dev;
--
2.9.3