network/ndisc: first process options with zero lifetime
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 18 Nov 2024 05:09:49 +0000 (14:09 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 18 Nov 2024 19:04:14 +0000 (04:04 +0900)
commit25688f8d5a871db7d6abf4a8124749dbd04d5a66
tree03d26099142e4b681c3710a685728e1ec1358368
parentcb3243460b8efab09f0ae5677df4b0342e1dbcae
network/ndisc: first process options with zero lifetime

Fixes IPv6 Core Conformance test failures reported at #33468.
https://www.ipv6ready.org/docs/Core_Conformance.pdf
Test v6LC.2.2.23 h and j: Processing Router Advertisement with Route
Information Option (Host Only)

When a RA contains route option with ::/0 prefix, then previously that
may contradict with the default route requested with the RA header.
If the route option has zero lifetime, the existing default route should
be removed, and a new route based on the RA header should be configured.
If the route option has non-zero lifetime, the RA header should be
ignored.

So, we first need to process options with zero lifetime (not only
route option, as the similar reasons), then configure the default route
based on the RA, finally process options with non-zero lifetime.
src/network/networkd-ndisc.c