lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 12 Feb 2020 16:54:19 +0100 From: Nicolas Dichtel <nicolas.dichtel@...nd.com> To: William Dauchy <w.dauchy@...teo.com>, netdev@...r.kernel.org Subject: Re: [PATCH v3 net] net, ip6_tunnel: enhance tunnel locate with link check Le 12/02/2020 à 09:30, William Dauchy a écrit : [snip] > @@ -1848,6 +1870,11 @@ ip6_tnl_dev_init_gen(struct net_device *dev) > dev->type = ARPHRD_TUNNEL6; > dev->hard_header_len = LL_MAX_HEADER + t_hlen; > dev->mtu = ETH_DATA_LEN - t_hlen; > + if (t->parms.link) { > + tdev = __dev_get_by_index(t->net, t->parms.link); > + if (tdev && tdev->mtu < dev->mtu) > + dev->mtu = tdev->mtu; Hmm, I was expecting 'tdev->mtu - t_hlen'. Am I wrong? In fact, something like this: dev->mtu = ETH_DATA_LEN - t_hlen; if (t->parms.link) { tdev = __dev_get_by_index(t->net, t->parms.link); if (tdev) dev->mtu = tdev->mtu - t_hlen; } With ipip: $ ip l s eth1 mtu 2000 $ ip link add ipip1 type ipip remote 10.16.0.121 local 10.16.0.249 dev eth1 $ ip l 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 2000 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 ... 10: ipip1@...1: <POINTOPOINT,NOARP> mtu 1980 qdisc noop state DOWN mode DEFAULT group default qlen 1000
Powered by blists - more mailing lists