aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h1
-rw-r--r--include/net/ip6_route.h8
-rw-r--r--include/net/sock.h1
3 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index e48ee2eaaa3e..779b23595596 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3284,6 +3284,7 @@ void __dev_notify_flags(struct net_device *, unsigned int old_flags,
3284int dev_change_name(struct net_device *, const char *); 3284int dev_change_name(struct net_device *, const char *);
3285int dev_set_alias(struct net_device *, const char *, size_t); 3285int dev_set_alias(struct net_device *, const char *, size_t);
3286int dev_change_net_namespace(struct net_device *, struct net *, const char *); 3286int dev_change_net_namespace(struct net_device *, struct net *, const char *);
3287int __dev_set_mtu(struct net_device *, int);
3287int dev_set_mtu(struct net_device *, int); 3288int dev_set_mtu(struct net_device *, int);
3288void dev_set_group(struct net_device *, int); 3289void dev_set_group(struct net_device *, int);
3289int dev_set_mac_address(struct net_device *, struct sockaddr *); 3290int dev_set_mac_address(struct net_device *, struct sockaddr *);
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index 0fbf73dd531a..199056933dcb 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -22,6 +22,7 @@ struct route_info {
22#include <net/flow.h> 22#include <net/flow.h>
23#include <net/ip6_fib.h> 23#include <net/ip6_fib.h>
24#include <net/sock.h> 24#include <net/sock.h>
25#include <net/lwtunnel.h>
25#include <linux/ip.h> 26#include <linux/ip.h>
26#include <linux/ipv6.h> 27#include <linux/ipv6.h>
27#include <linux/route.h> 28#include <linux/route.h>
@@ -232,4 +233,11 @@ static inline struct in6_addr *rt6_nexthop(struct rt6_info *rt,
232 return daddr; 233 return daddr;
233} 234}
234 235
236static inline bool rt6_duplicate_nexthop(struct rt6_info *a, struct rt6_info *b)
237{
238 return a->dst.dev == b->dst.dev &&
239 a->rt6i_idev == b->rt6i_idev &&
240 ipv6_addr_equal(&a->rt6i_gateway, &b->rt6i_gateway) &&
241 !lwtunnel_cmp_encap(a->dst.lwtstate, b->dst.lwtstate);
242}
235#endif 243#endif
diff --git a/include/net/sock.h b/include/net/sock.h
index 48e4d5c38f85..8c85791fc196 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1697,6 +1697,7 @@ static inline void sock_orphan(struct sock *sk)
1697 1697
1698static inline void sock_graft(struct sock *sk, struct socket *parent) 1698static inline void sock_graft(struct sock *sk, struct socket *parent)
1699{ 1699{
1700 WARN_ON(parent->sk);
1700 write_lock_bh(&sk->sk_callback_lock); 1701 write_lock_bh(&sk->sk_callback_lock);
1701 sk->sk_wq = parent->wq; 1702 sk->sk_wq = parent->wq;
1702 parent->sk = sk; 1703 parent->sk = sk;