RIOs with zero prefix length in RA messages should be honored
Summary
ndp_msg_opt_for_each_offset (offset, msg, NDP_MSG_OPT_ROUTE) {
guint8 plen = ndp_msg_opt_route_prefix_len(msg, offset);
struct in6_addr network;
if (plen == 0 || plen > 128)
continue;
RFC 4191 section 2.3 states:
When a type C host receives a Router Advertisement, it modifies its Routing Table as follows. When processing a Router Advertisement, a type C host first updates a ::/0 route based on the Router Lifetime and Default Router Preference in the Router Advertisement message header. Then as the host processes Route Information Options in the Router Advertisement message body, it updates its routing table for each such option. The Router Preference and Lifetime values in a ::/0 Route Information Option override the preference and lifetime values in the Router Advertisement header.
Pushing default routes with the RIO option is valid.
Version affected
master branch (1.51.4 as of 2024-11-16)
Steps to reproduce
N/A
Actual result
An RIO with zero prefix length(ie. default route) is ignored. The router preference and the lifetime are not overridden with the values in the RIO.
Expected result
The router preference and the lifetime should be overridden with the values in the RIO.