Save each new onlink IPv6 prefix and attach an expiry timer to it. If the prefixes overlap, take the shorter prefix and write a debug message about the event. Once the prefix is resent in a Router Advertisement, update the timer. Add a new event for the expiring prefix.
Add two helper functions, one for returning a prefix length given a Router Advertisement and the other for generic prefix matching given an IPv6 prefix and address.
d77bde3 sd-icmp6-nd: Parse ICMPv6 prefix information
src/libsystemd-network/sd-icmp6-nd.c | 202 ++++++++++++++++++++++++++++++++++
src/systemd/sd-icmp6-nd.h | 26 ++++-
2 files changed, 224 insertions(+), 4 deletions(-)
Upstream: github.com