Page MenuHomeFreeBSD

routing: Implement merge of nhgrp in new multipath route
Needs ReviewPublic

Authored by pouria on Tue, Mar 31, 4:08 PM.

Details

Reviewers
kp
markj
glebius
zlei
melifaro
Group Reviewers
network
Summary

Routing subsystem allows creating new multipath routes by
nexthop groups (e.g RTA_MULTIPATH in netlink), in case of
a second nexthop group on the same route, don't panic and
merge the existing nhgrp with new one.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 71876
Build 68759: arc lint + arc unit

Event Timeline

For tests, see D56190.

sys/net/route/nhgrp_ctl.c
836–838

For reviewers, it's meaningless to reference nhops of an nhgrp here like above. Therefore, I didn't.

843–845

For reviewers, don't worry about the reverse order here, it will eventually sorted by qsort.

For reviewers: this patch also fixes a panic caused by an incorrect assumption in nhgrp_get_addition_group().
That function assumes rnd->rnd_nhop is not an nhgrp_object, therefore sending two or more RTA_MULTIPATH attributes can trigger a panic.

This comment was removed by pouria.
sys/net/route/nhgrp_ctl.c
662

The parenthesis around sizeof() are superfluous.

pouria marked an inline comment as done.

Address @glebius comment.