RIOT
RIOT copied to clipboard
gnrc/ipv6: `nib route`: hide off-link PLEs
Contribution description
An off-link prefix with SLAAC (i.e. RA PIO: L flag = 0, A flag = 1):
- is listed in
nib prefix
. Listing it here only means it’s a "managed" prefix (for SLAAC lifetimes), no indication about whether it’s on-link. -
nib route
❌ Currently falsely displays it as on-link (e.g.2001:db8::/32 dev #6
) Should not list it, to reflect the actually used routing logic [1] https://github.com/RIOT-OS/RIOT/blob/0e7636a463894c177a2982fd08f7e02cef83aa89/sys/net/gnrc/network_layer/ipv6/nib/_nib-internal.c#L653
This PR removes it from the nib route
output.
[1] which is correct ("forward the packet to a default router" - https://datatracker.ietf.org/doc/html/rfc4861#section-6.3.4)
Testing procedure
Expand
sudo dist/tools/tapsetup/tapsetup
In any directory:
Set file content of radvd-offl.conf
to:
interface tapbr0 {
AdvSendAdvert on;
prefix 2001:db8::/32 {
AdvOnLink off;
};
};
Run
sudo radvd --nodaemon --config=radvd-offl.conf
cd examples/gnrc_networking/
make && make term
In RIOT terminal: command nib route
In command output, observe unexpected line 2001:db8::/32 dev #6
.
Issues/PRs references
#20757 revealed this bug by adding a feature