Date: Wed, 5 May 2021 02:00:29 +0300 From: Evgeniy Khramtsov <evgeniy@khramtsov.org> To: freebsd-net@freebsd.org Subject: Hop limit override Message-ID: <YJHSDU8ZIhxyqgS/@vax.khramtsov.org>
next in thread | raw e-mail | index | archive | help
Hi net, According to in6_selecthlim() in in6_src.c, hlim selection order is: 1. hlim specified via ioctl; 2. interface chlim via nd if outgoing interface; 3. V_ip6_defhlim. Let us suppose one needs to change the default non-ioctl hlim. The obvious way without reading in6_src.c would be to specify it via net.inet6.ip6.hlim. But then it would not work if there is curhlim: # ndp -i foo ... curhlim=255 ... Changing it via 'ndp -i foo curhlim=bar' seems to be temporary. I thought rtsold may refresh it back to the original value, though the value changes back to the original after rtsold was stopped. The first question: is nd behaviour a bug or works as intended? The second question: what would be the best way to override hlim? Currently I patched in6_selecthlim() to always return V_ip6_defhlim, though I am more interested to know a way that already works, or the way networking people would accept as a patch. If it matters, the described behaviour was observed on FreeBSD 14. -- (reachability warning: IPv6-only email address)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YJHSDU8ZIhxyqgS/>