Page MenuHomeFreeBSD

routing: fix RTM_CHANGE for multipath #1
ClosedPublic

Authored by melifaro on Jun 19 2022, 8:28 PM.
Tags
None
Referenced Files
F153543990: D35526.id.diff
Tue, Apr 21, 7:15 PM
F153541135: D35526.diff
Tue, Apr 21, 6:45 PM
Unknown Object (File)
Mon, Apr 20, 10:59 AM
Unknown Object (File)
Sun, Apr 12, 5:54 PM
Unknown Object (File)
Tue, Apr 7, 5:43 AM
Unknown Object (File)
Mon, Apr 6, 12:18 PM
Unknown Object (File)
Fri, Mar 27, 6:43 AM
Unknown Object (File)
Mar 15 2026, 3:24 PM
Subscribers

Details

Summary

RTM_CHANGE is supposed to operate on a single component of the multipath route (e.g. on a single nexthop). Search of this nexthop is peformed by iterating over each nexthop from multipath (nexthop) group, using check_info_match_nhop. The problem with the current code that it (incorrectly assumes that check_info_match_nhop() returns true value on match, while in reality it returns an error code on failure).
Fix this by properly comparing the result with 0.

Next, the followup code creating a new nexthop group, was modifying original group instead of a new one, leading to the spurious errors.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 46032
Build 42921: arc lint + arc unit