Page MenuHomeFreeBSD

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

Authored by pouria on Tue, Mar 31, 4:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 7, 8:29 AM
Unknown Object (File)
Tue, Apr 7, 12:44 AM
Unknown Object (File)
Mon, Apr 6, 7:08 AM
Unknown Object (File)
Mon, Apr 6, 6:08 AM
Unknown Object (File)
Sun, Apr 5, 6:10 AM
Unknown Object (File)
Thu, Apr 2, 11:52 AM
Subscribers

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 Skipped
Unit
Tests Skipped
Build Status
Buildable 71865
Build 68748: 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.