* [PATCH v3 net] net/ipv6: Handle onlink flag with multipath routes
@ 2018-03-20 17:06 David Ahern
2018-03-22 16:40 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: David Ahern @ 2018-03-20 17:06 UTC (permalink / raw)
To: netdev; +Cc: David Ahern
For multipath routes the ONLINK flag can be specified per nexthop in
rtnh_flags or globally in rtm_flags. Update ip6_route_multipath_add
to consider the ONLINK setting coming from rtnh_flags. Each loop over
nexthops the config for the sibling route is initialized to the global
config and then per nexthop settings overlayed. The flag is 'or'ed into
fib6_config to handle the ONLINK flag coming from either rtm_flags or
rtnh_flags.
Fixes: fc1e64e1092f ("net/ipv6: Add support for onlink flag")
Signed-off-by: David Ahern <dsahern@gmail.com>
---
v3
- no change; resend because patchworks shows v2 as superseded
v2
- updated commit message to reflect flag can be global or per-nexthop
and both need to be handled
net/ipv6/route.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index b3c1137ad0b8..b0d5c64e1978 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -4112,6 +4112,7 @@ static int ip6_route_multipath_add(struct fib6_config *cfg,
r_cfg.fc_encap_type = nla_get_u16(nla);
}
+ r_cfg.fc_flags |= (rtnh->rtnh_flags & RTNH_F_ONLINK);
rt = ip6_route_info_create(&r_cfg, extack);
if (IS_ERR(rt)) {
err = PTR_ERR(rt);
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3 net] net/ipv6: Handle onlink flag with multipath routes
2018-03-20 17:06 [PATCH v3 net] net/ipv6: Handle onlink flag with multipath routes David Ahern
@ 2018-03-22 16:40 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-03-22 16:40 UTC (permalink / raw)
To: dsahern; +Cc: netdev
From: David Ahern <dsahern@gmail.com>
Date: Tue, 20 Mar 2018 10:06:59 -0700
> For multipath routes the ONLINK flag can be specified per nexthop in
> rtnh_flags or globally in rtm_flags. Update ip6_route_multipath_add
> to consider the ONLINK setting coming from rtnh_flags. Each loop over
> nexthops the config for the sibling route is initialized to the global
> config and then per nexthop settings overlayed. The flag is 'or'ed into
> fib6_config to handle the ONLINK flag coming from either rtm_flags or
> rtnh_flags.
>
> Fixes: fc1e64e1092f ("net/ipv6: Add support for onlink flag")
> Signed-off-by: David Ahern <dsahern@gmail.com>
Applied, thanks David.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-22 16:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-20 17:06 [PATCH v3 net] net/ipv6: Handle onlink flag with multipath routes David Ahern
2018-03-22 16:40 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.