]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/network/networkd-link.c
networkd: ndisc - handle router advertisement in userspace
authorTom Gundersen <teg@jklm.no>
Tue, 3 Nov 2015 12:02:16 +0000 (13:02 +0100)
committerTom Gundersen <teg@jklm.no>
Wed, 11 Nov 2015 14:42:38 +0000 (15:42 +0100)
commit3b015d40c19d9338b66bf916d84dec601019c811
tree2b74c34a975553106c48b2dfc0319cf84c5b4436
parentf5a8c43f39937d97c9ed75e3fe8621945b42b0db
networkd: ndisc - handle router advertisement in userspace

Router Discovery is a core part of IPv6, which by default is handled by the kernel.
However, the kernel implementation is meant as a fall-back, and to fully support
the protocol a userspace implementation is desired.

The protocol essentially listens for Router Advertisement packets from routers
on the local link and use these to configure the client automatically. The four
main pieces of information are: what kind (if any) of DHCPv6 configuration should
be performed; a default gateway; the prefixes that should be considered to be on
the local link; and the prefixes with which we can preform SLAAC in order to pick
a global IPv6 address.

A lot of additional information is also available, which we do not yet fully
support, but which will eventually allow us to avoid the need for DHCPv6 in the
common case.

Short-term, the reason for wanting this is in userspace was the desire to fully
track all the addresses on links we manage, and that is not possible for addresses
managed by the kernel (as the kernel does not expose to us the fact that it
manages these addresses). Moreover, we would like to support stable privacy
addresses, which will soon be mandated and the legacy MAC-based global addresses
deprecated, to do this well we need to handle the generation in userspace. Lastly,
more long-term we wish to support more RA options than what the kernel exposes.
src/libsystemd-network/sd-ndisc.c
src/network/networkd-link.c
src/network/networkd-link.h
src/network/networkd-ndisc.c
src/network/networkd-route.c
src/network/networkd-route.h