• Petr Machata's avatar
    nexthop: Pass nh_config to replace_nexthop() · 597f48e4
    Petr Machata authored
    Currently, replace assumes that the new group that is given is a
    fully-formed object. But mpath groups really only have one attribute, and
    that is the constituent next hop configuration. This may not be universally
    true. From the usability perspective, it is desirable to allow the replace
    operation to adjust just the constituent next hop configuration and leave
    the group attributes as such intact.
    
    But the object that keeps track of whether an attribute was or was not
    given is the nh_config object, not the next hop or next-hop group. To allow
    (selective) attribute updates during NH group replacement, propagate `cfg'
    to replace_nexthop() and further to replace_nexthop_grp().
    Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
    Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    597f48e4
nexthop.c 52.3 KB