Page MenuHomeFreeBSD

netlink: Fix RTA_MULTIPATH on RTM_GETROUTE
Needs ReviewPublic

Authored by pouria on Tue, Mar 31, 4:08 PM.
Tags
None
Referenced Files
F153059415: D56188.id.diff
Sat, Apr 18, 9:46 PM
F152966823: D56188.id174672.diff
Sat, Apr 18, 9:27 AM
F152960599: D56188.id174672.diff
Sat, Apr 18, 8:29 AM
F152953935: D56188.id175145.diff
Sat, Apr 18, 7:30 AM
F152953651: D56188.id175145.diff
Sat, Apr 18, 7:29 AM
Unknown Object (File)
Sat, Apr 18, 3:45 AM
Unknown Object (File)
Fri, Apr 17, 7:31 AM
Unknown Object (File)
Thu, Apr 16, 8:20 AM
Subscribers

Details

Reviewers
kp
markj
glebius
zlei
melifaro
Group Reviewers
network
Summary

Before this patch, netlink never returned RTA_MULTIPATH.
Also, add RTA_MULTIPATH attribute in way that don't confuse
non-mpath support consumers.

Diff Detail

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

Event Timeline

sys/netlink/route/rt.c
189

For reviewers, Without this, non-mpath aware apps can't find their gw, therefore, we choose one here for netlink users. see line 658 below.

349–353

For reviewers, without these changes here + removal of nhop_select_func() from line 658 it was impossible to return RTA_MULTIPATH.
Since we overwrite nhgrp of rnd by nhop_select_func() to nhop. So this patch will restore the intended behavior.

This comment was removed by pouria.

Also return the weight of selected nhop from nhgrp.