]> git.itanic.dy.fi Git - linux-stable/commit
net: add sysctl accept_ra_min_rtr_lft
authorPatrick Rohr <prohr@google.com>
Wed, 19 Jul 2023 14:52:13 +0000 (07:52 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 23 Jul 2023 10:51:24 +0000 (11:51 +0100)
commit1671bcfd76fdc0b9e65153cf759153083755fe4c
tree2cdf85b02de36c2fe6ad26db0cf77c6a6a47717f
parent5c9f7b04aadf79f783542d096dfbb8184e7c91f5
net: add sysctl accept_ra_min_rtr_lft

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>
Documentation/networking/ip-sysctl.rst
include/linux/ipv6.h
include/uapi/linux/ipv6.h
net/ipv6/addrconf.c
net/ipv6/ndisc.c