From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f195.google.com ([209.85.192.195]:46794 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934821AbeCMPkT (ORCPT ); Tue, 13 Mar 2018 11:40:19 -0400 Received: by mail-pf0-f195.google.com with SMTP id z10so3829pfh.13 for ; Tue, 13 Mar 2018 08:40:19 -0700 (PDT) From: David Ahern To: netdev@vger.kernel.org Cc: David Ahern Subject: [PATCH net-next 1/2] net/ipv6: Handle onlink flag with multipath routes Date: Tue, 13 Mar 2018 08:40:09 -0700 Message-Id: <20180313154010.31623-2-dsahern@gmail.com> In-Reply-To: <20180313154010.31623-1-dsahern@gmail.com> References: <20180313154010.31623-1-dsahern@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: For multipath routes the ONLINK flag is specified per nexthop in rtnh_flags (as opposed to rtm_flags for unicast routes). Update ip6_route_multipath_add to set fc_flags based on rtnh_flags. Fixes: fc1e64e1092f ("net/ipv6: Add support for onlink flag") Signed-off-by: David Ahern --- net/ipv6/route.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/ipv6/route.c b/net/ipv6/route.c index f0ae58424c45..b223dffa8521 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -4166,6 +4166,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