aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 0488a24c2a44..4d30c96a819d 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -3036,17 +3036,11 @@ static int ip6_route_info_append(struct list_head *rt6_nh_list,
3036 struct rt6_info *rt, struct fib6_config *r_cfg) 3036 struct rt6_info *rt, struct fib6_config *r_cfg)
3037{ 3037{
3038 struct rt6_nh *nh; 3038 struct rt6_nh *nh;
3039 struct rt6_info *rtnh;
3040 int err = -EEXIST; 3039 int err = -EEXIST;
3041 3040
3042 list_for_each_entry(nh, rt6_nh_list, next) { 3041 list_for_each_entry(nh, rt6_nh_list, next) {
3043 /* check if rt6_info already exists */ 3042 /* check if rt6_info already exists */
3044 rtnh = nh->rt6_info; 3043 if (rt6_duplicate_nexthop(nh->rt6_info, rt))
3045
3046 if (rtnh->dst.dev == rt->dst.dev &&
3047 rtnh->rt6i_idev == rt->rt6i_idev &&
3048 ipv6_addr_equal(&rtnh->rt6i_gateway,
3049 &rt->rt6i_gateway))
3050 return err; 3044 return err;
3051 } 3045 }
3052 3046