aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-07-08 15:01:22 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-08 15:01:22 -0400
commit8b6b3172ce02aef147f74b32ea11796c580f795c (patch)
tree2733742fc8cda742ad851e32155999915e85bf45 /net/ipv6/route.c
parentb8d4c1f9f48e344fe1d6e6ffae01d4b31bf0aac0 (diff)
parente8df760307830ca26cf380a9a4b36468a0352fa5 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: "Mostly fixing some light fallout from the changes that went into the merge window. 1) Fix memory leaks on network namespace teardown in netfilter, from Liping Zhang. 2) When comparing ipv6 nexthops, we have to take the lightweight tunnel state into account as well. From David Ahern. 3) Fix socket option object length check in the new TLS code, from Matthias Rosenfelder. 4) Fix memory leak in nfp driver flower support, from Jakub Kicinski. 5) Several netlink attribute validation fixes in cfg80211, from Srinivas Dasari. 6) Fix context array leak in virtio_net, from Jason Wang. 7) SKB use after free in hns driver, from Yusheng Lin. 8) Fix socket leak on accept() in RDS, from Sowmini Varadhan. Also add a WARN_ON() to sock_graft() so other protocol stacks don't trip over this as well" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (26 commits) net: ethernet: mediatek: remove useless code in mtk_probe() mpls: fix uninitialized in_label var warning in mpls_getroute doc: SKB_GSO_[IPIP|SIT] have been replaced bonding: avoid NETDEV_CHANGEMTU event when unregistering slave net/sock: add WARN_ON(parent->sk) in sock_graft() rds: tcp: use sock_create_lite() to create the accept socket net: hns: Fix a skb used after free bug net: hns: Fix a wrong op phy C45 code net: macb: Adding Support for Jumbo Frames up to 10240 Bytes in SAMA5D3 net: Update networking MAINTAINERS entry. virtio-net: fix leaking of ctx array cfg80211: Validate frequencies nested in NL80211_ATTR_SCAN_FREQUENCIES cfg80211: Define nla_policy for NL80211_ATTR_LOCAL_MESH_POWER_MODE cfg80211: Check if NAN service ID is of expected size cfg80211: Check if PMKID attribute is of expected size arcnet: com20020-pci: Fix an error handling path in 'com20020pci_probe()' nfp: flower: add missing clean up call to avoid memory leaks vrf: fix bug_on triggered by rx when destroying a vrf ptp: dte: Use LL suffix for 64-bit constants sctp: set the value of flowi6_oif to sk_bound_dev_if to make sctp_v6_get_dst to find the correct route entry. ...
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