Page MenuHomeFreeBSD

netlink: Fix RTA_MULTIPATH on RTM_GETROUTE
Needs ReviewPublic

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

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

344–346

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.