diff options
| author | Hangbin Liu <liuhangbin@gmail.com> | 2015-07-30 14:28:42 +0800 |
|---|---|---|
| committer | Jiri Slaby <jslaby@suse.cz> | 2016-03-02 16:29:06 +0100 |
| commit | e16f537864eb9cf68683d9e107706d1b31fcaa76 (patch) | |
| tree | 4ed0d5be9aac6a98a2a871fd891a73499cad7139 /include/linux | |
| parent | 22d310aa03b6009f252c1c53fe2adb5b0919f330 (diff) | |
| download | lwn-e16f537864eb9cf68683d9e107706d1b31fcaa76.tar.gz lwn-e16f537864eb9cf68683d9e107706d1b31fcaa76.zip | |
net/ipv6: add sysctl option accept_ra_min_hop_limit
[ Upstream commit 8013d1d7eafb0589ca766db6b74026f76b7f5cb4 ]
Commit 6fd99094de2b ("ipv6: Don't reduce hop limit for an interface")
disabled accept hop limit from RA if it is smaller than the current hop
limit for security stuff. But this behavior kind of break the RFC definition.
RFC 4861, 6.3.4. Processing Received Router Advertisements
A Router Advertisement field (e.g., Cur Hop Limit, Reachable Time,
and Retrans Timer) may contain a value denoting that it is
unspecified. In such cases, the parameter should be ignored and the
host should continue using whatever value it is already using.
If the received Cur Hop Limit value is non-zero, the host SHOULD set
its CurHopLimit variable to the received value.
So add sysctl option accept_ra_min_hop_limit to let user choose the minimum
hop limit value they can accept from RA. And set default to 1 to meet RFC
standards.
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Acked-by: YOSHIFUJI Hideaki <hideaki.yoshifuji@miraclelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/ipv6.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 88c0cf0079ad..167c976554fa 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h @@ -30,6 +30,7 @@ struct ipv6_devconf { #endif __s32 max_addresses; __s32 accept_ra_defrtr; + __s32 accept_ra_min_hop_limit; __s32 accept_ra_pinfo; #ifdef CONFIG_IPV6_ROUTER_PREF __s32 accept_ra_rtr_pref; |
