summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPatrick Rohr <prohr@google.com>2023-07-19 07:52:13 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-10-10 22:02:55 +0200
commitb2b10fd6d417361879e80a9bb9d06c61d88b2053 (patch)
treec57d5cabfe4362fb4cf7652b081aea73a7bd7275 /include
parent0b37467cbd2d611d720ea3d3c8b0cf9d42e854ad (diff)
downloadlinux-b2b10fd6d417361879e80a9bb9d06c61d88b2053.tar.gz
linux-b2b10fd6d417361879e80a9bb9d06c61d88b2053.tar.bz2
linux-b2b10fd6d417361879e80a9bb9d06c61d88b2053.zip
net: add sysctl accept_ra_min_rtr_lft
commit 1671bcfd76fdc0b9e65153cf759153083755fe4c upstream. This change adds a new sysctl accept_ra_min_rtr_lft to specify the minimum acceptable router lifetime in an RA. If the received RA router lifetime is less than the configured value (and not 0), the RA is ignored. This is useful for mobile devices, whose battery life can be impacted by networks that configure RAs with a short lifetime. On such networks, the device should never gain IPv6 provisioning and should attempt to drop RAs via hardware offload, if available. Signed-off-by: Patrick Rohr <prohr@google.com> Cc: Maciej Żenczykowski <maze@google.com> Cc: Lorenzo Colitti <lorenzo@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ipv6.h1
-rw-r--r--include/uapi/linux/ipv6.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 644e69354cba..58ce58ed850a 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -33,6 +33,7 @@ struct ipv6_devconf {
__s32 accept_ra_defrtr;
__u32 ra_defrtr_metric;
__s32 accept_ra_min_hop_limit;
+ __s32 accept_ra_min_rtr_lft;
__s32 accept_ra_pinfo;
__s32 ignore_routes_with_linkdown;
#ifdef CONFIG_IPV6_ROUTER_PREF
diff --git a/include/uapi/linux/ipv6.h b/include/uapi/linux/ipv6.h
index ac56605fe9bc..8b6bcbf6ed4a 100644
--- a/include/uapi/linux/ipv6.h
+++ b/include/uapi/linux/ipv6.h
@@ -198,6 +198,7 @@ enum {
DEVCONF_IOAM6_ID_WIDE,
DEVCONF_NDISC_EVICT_NOCARRIER,
DEVCONF_ACCEPT_UNTRACKED_NA,
+ DEVCONF_ACCEPT_RA_MIN_RTR_LFT,
DEVCONF_MAX
};