]> Pileus Git - ~andy/linux/commitdiff
ipv6/multipath: remove flag NLM_F_EXCL after the first nexthop
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Thu, 1 Nov 2012 22:58:22 +0000 (22:58 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 3 Nov 2012 01:38:19 +0000 (21:38 -0400)
fib6_add_rt2node() will reject the nexthop if this flag is set, so
we perform the check only for the first nexthop.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c

index c42650cf8d4d71a24f46314aee1b56bc89ecf0b0..9c7b5d80049563b02b152c1535c1735d98bce173 100644 (file)
@@ -2449,6 +2449,12 @@ beginning:
                                goto beginning;
                        }
                }
+               /* Because each route is added like a single route we remove
+                * this flag after the first nexthop (if there is a collision,
+                * we have already fail to add the first nexthop:
+                * fib6_add_rt2node() has reject it).
+                */
+               cfg->fc_nlinfo.nlh->nlmsg_flags &= ~NLM_F_EXCL;
                rtnh = rtnh_next(rtnh, &remaining);
        }