]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
ipv6: adjust ndisc_is_useropt() to also return true for PIO
authorMaciej Żenczykowski <maze@google.com>
Mon, 7 Aug 2023 10:25:32 +0000 (03:25 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 30 Oct 2023 11:00:00 +0000 (12:00 +0100)
commit168d9c274e6017887aacc03e435977762935794b
tree37328dd3af65f72a1665ac237dbc72bc73615b8d
parent42415fa489177fadeaf4baf9ffd1986e2e01d32e
ipv6: adjust ndisc_is_useropt() to also return true for PIO

BugLink: https://bugs.launchpad.net/bugs/2038969
commit 048c796beb6eb4fa3a5a647ee1c81f5c6f0f6a2a upstream.

The upcoming (and nearly finalized):
  https://datatracker.ietf.org/doc/draft-collink-6man-pio-pflag/
will update the IPv6 RA to include a new flag in the PIO field,
which will serve as a hint to perform DHCPv6-PD.

As we don't want DHCPv6 related logic inside the kernel, this piece of
information needs to be exposed to userspace.  The simplest option is to
simply expose the entire PIO through the already existing mechanism.

Even without this new flag, the already existing PIO R (router address)
flag (from RFC6275) cannot AFAICT be handled entirely in kernel,
and provides useful information that should be exposed to userspace
(the router's global address, for use by Mobile IPv6).

Also cc'ing stable@ for inclusion in LTS, as while technically this is
not quite a bugfix, and instead more of a feature, it is absolutely
trivial and the alternative is manually cherrypicking into all Android
Common Kernel trees - and I know Greg will ask for it to be sent in via
LTS instead...

Cc: Jen Linkova <furry@google.com>
Cc: Lorenzo Colitti <lorenzo@google.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
Cc: stable@vger.kernel.org
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Link: https://lore.kernel.org/r/20230807102533.1147559-1-maze@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
net/ipv6/ndisc.c