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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 12 Feb 2020 22:06:47 +0100
From:   William Dauchy <w.dauchy@...teo.com>
To:     Nicolas Dichtel <nicolas.dichtel@...nd.com>
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH v3 net] net, ip6_tunnel: enhance tunnel locate with link
 check

Hello Nicolas,

Thank you for your review.

On Wed, Feb 12, 2020 at 04:54:19PM +0100, Nicolas Dichtel wrote:
> 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;
> }

true, I missed that one; I reworked to something like:

int mtu;

mtu = ETH_DATA_LEN;
if (t->parms.link) {
	tdev = __dev_get_by_index(t->net, t->parms.link);
	if (tdev && tdev->mtu < mtu)
		mtu = tdev->mtu;
}
dev->mtu = mtu - t_hlen;


However in ipip we do:

mtu -= (dev->hard_header_len + t_hlen);

Do I need to use hard_header_len as well?

Thanks,
-- 
William

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ