]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/ipv6/route.c
Merge tag 'for-v4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux...
[karo-tx-linux.git] / net / ipv6 / route.c
index 0488a24c2a4425657f2e851aa3cd78fcd1dcea98..4d30c96a819dee548ec34704a34b22774fac5da1 100644 (file)
@@ -3036,17 +3036,11 @@ static int ip6_route_info_append(struct list_head *rt6_nh_list,
                                 struct rt6_info *rt, struct fib6_config *r_cfg)
 {
        struct rt6_nh *nh;
-       struct rt6_info *rtnh;
        int err = -EEXIST;
 
        list_for_each_entry(nh, rt6_nh_list, next) {
                /* check if rt6_info already exists */
-               rtnh = nh->rt6_info;
-
-               if (rtnh->dst.dev == rt->dst.dev &&
-                   rtnh->rt6i_idev == rt->rt6i_idev &&
-                   ipv6_addr_equal(&rtnh->rt6i_gateway,
-                                   &rt->rt6i_gateway))
+               if (rt6_duplicate_nexthop(nh->rt6_info, rt))
                        return err;
        }