Closed KanjiMonster closed 3 months ago
I didn't try to link the nexthop and route caches for now, to keep the changes simple.
There is still a if (r->ce_mask & ROUTE_ATTR_NHID && r->rt_nhid != 0)
. It should only check the flags (granted, the conditions are true always at the same time).
Rest lgtm.
There is still a
if (r->ce_mask & ROUTE_ATTR_NHID && r->rt_nhid != 0)
. It should only check the flags (granted, the conditions are true always at the same time).Rest lgtm.
Oops, fixed.
merged as 3e0806317b5116bca7a097a0cb9b7a9cbebc465a
Thank you!!
Routes may reference a nexthop (group) via the new nexthop API by its ID, so add accessors for setting and getting it.
Referencing a nexthop is mutually exclusive to specifiying nexthops in the route, so make sure we do not do that when creating netlink messages (which may exist both, since netlink messages from the kernel contain both unless 'nexthop_compat_mode' is disabled).
Before:
After: