diff options
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/inet_sock.h | 9 | ||||
-rw-r--r-- | include/net/ip_fib.h | 6 | ||||
-rw-r--r-- | include/net/netns/ipv4.h | 2 | ||||
-rw-r--r-- | include/net/route.h | 3 |
4 files changed, 16 insertions, 4 deletions
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index 613cfa401672..83b567fe1941 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
@@ -249,4 +249,13 @@ static inline __u8 inet_sk_flowi_flags(const struct sock *sk) | |||
249 | return flags; | 249 | return flags; |
250 | } | 250 | } |
251 | 251 | ||
252 | static inline void inet_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) | ||
253 | { | ||
254 | struct dst_entry *dst = skb_dst(skb); | ||
255 | |||
256 | dst_hold(dst); | ||
257 | sk->sk_rx_dst = dst; | ||
258 | inet_sk(sk)->rx_dst_ifindex = skb->skb_iif; | ||
259 | } | ||
260 | |||
252 | #endif /* _INET_SOCK_H */ | 261 | #endif /* _INET_SOCK_H */ |
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index e69c3a47153d..926142ed8d7a 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/rcupdate.h> | 21 | #include <linux/rcupdate.h> |
22 | #include <net/fib_rules.h> | 22 | #include <net/fib_rules.h> |
23 | #include <net/inetpeer.h> | 23 | #include <net/inetpeer.h> |
24 | #include <linux/percpu.h> | ||
24 | 25 | ||
25 | struct fib_config { | 26 | struct fib_config { |
26 | u8 fc_dst_len; | 27 | u8 fc_dst_len; |
@@ -54,6 +55,7 @@ struct fib_nh_exception { | |||
54 | u32 fnhe_pmtu; | 55 | u32 fnhe_pmtu; |
55 | __be32 fnhe_gw; | 56 | __be32 fnhe_gw; |
56 | unsigned long fnhe_expires; | 57 | unsigned long fnhe_expires; |
58 | struct rtable __rcu *fnhe_rth; | ||
57 | unsigned long fnhe_stamp; | 59 | unsigned long fnhe_stamp; |
58 | }; | 60 | }; |
59 | 61 | ||
@@ -81,8 +83,8 @@ struct fib_nh { | |||
81 | __be32 nh_gw; | 83 | __be32 nh_gw; |
82 | __be32 nh_saddr; | 84 | __be32 nh_saddr; |
83 | int nh_saddr_genid; | 85 | int nh_saddr_genid; |
84 | struct rtable *nh_rth_output; | 86 | struct rtable __rcu * __percpu *nh_pcpu_rth_output; |
85 | struct rtable *nh_rth_input; | 87 | struct rtable __rcu *nh_rth_input; |
86 | struct fnhe_hash_bucket *nh_exceptions; | 88 | struct fnhe_hash_bucket *nh_exceptions; |
87 | }; | 89 | }; |
88 | 90 | ||
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index 0ffb8e31f3cd..1474dd65c66f 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h | |||
@@ -61,8 +61,6 @@ struct netns_ipv4 { | |||
61 | int sysctl_icmp_ratelimit; | 61 | int sysctl_icmp_ratelimit; |
62 | int sysctl_icmp_ratemask; | 62 | int sysctl_icmp_ratemask; |
63 | int sysctl_icmp_errors_use_inbound_ifaddr; | 63 | int sysctl_icmp_errors_use_inbound_ifaddr; |
64 | int sysctl_rt_cache_rebuild_count; | ||
65 | int current_rt_cache_rebuild_count; | ||
66 | 64 | ||
67 | unsigned int sysctl_ping_group_range[2]; | 65 | unsigned int sysctl_ping_group_range[2]; |
68 | long sysctl_tcp_mem[3]; | 66 | long sysctl_tcp_mem[3]; |
diff --git a/include/net/route.h b/include/net/route.h index 8c52bc6f1c90..776a27f1ab78 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -57,6 +57,8 @@ struct rtable { | |||
57 | 57 | ||
58 | /* Miscellaneous cached information */ | 58 | /* Miscellaneous cached information */ |
59 | u32 rt_pmtu; | 59 | u32 rt_pmtu; |
60 | |||
61 | struct list_head rt_uncached; | ||
60 | }; | 62 | }; |
61 | 63 | ||
62 | static inline bool rt_is_input_route(const struct rtable *rt) | 64 | static inline bool rt_is_input_route(const struct rtable *rt) |
@@ -107,6 +109,7 @@ extern struct ip_rt_acct __percpu *ip_rt_acct; | |||
107 | struct in_device; | 109 | struct in_device; |
108 | extern int ip_rt_init(void); | 110 | extern int ip_rt_init(void); |
109 | extern void rt_cache_flush(struct net *net, int how); | 111 | extern void rt_cache_flush(struct net *net, int how); |
112 | extern void rt_flush_dev(struct net_device *dev); | ||
110 | extern struct rtable *__ip_route_output_key(struct net *, struct flowi4 *flp); | 113 | extern struct rtable *__ip_route_output_key(struct net *, struct flowi4 *flp); |
111 | extern struct rtable *ip_route_output_flow(struct net *, struct flowi4 *flp, | 114 | extern struct rtable *ip_route_output_flow(struct net *, struct flowi4 *flp, |
112 | struct sock *sk); | 115 | struct sock *sk); |