diff options
Diffstat (limited to 'include/net/route.h')
-rw-r--r-- | include/net/route.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/include/net/route.h b/include/net/route.h index c29ef2733f2d..8c52bc6f1c90 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <net/inet_sock.h> | 30 | #include <net/inet_sock.h> |
31 | #include <linux/in_route.h> | 31 | #include <linux/in_route.h> |
32 | #include <linux/rtnetlink.h> | 32 | #include <linux/rtnetlink.h> |
33 | #include <linux/rcupdate.h> | ||
33 | #include <linux/route.h> | 34 | #include <linux/route.h> |
34 | #include <linux/ip.h> | 35 | #include <linux/ip.h> |
35 | #include <linux/cache.h> | 36 | #include <linux/cache.h> |
@@ -157,8 +158,22 @@ static inline struct rtable *ip_route_output_gre(struct net *net, struct flowi4 | |||
157 | return ip_route_output_key(net, fl4); | 158 | return ip_route_output_key(net, fl4); |
158 | } | 159 | } |
159 | 160 | ||
160 | extern int ip_route_input(struct sk_buff *skb, __be32 dst, __be32 src, | 161 | extern int ip_route_input_noref(struct sk_buff *skb, __be32 dst, __be32 src, |
161 | u8 tos, struct net_device *devin); | 162 | u8 tos, struct net_device *devin); |
163 | |||
164 | static inline int ip_route_input(struct sk_buff *skb, __be32 dst, __be32 src, | ||
165 | u8 tos, struct net_device *devin) | ||
166 | { | ||
167 | int err; | ||
168 | |||
169 | rcu_read_lock(); | ||
170 | err = ip_route_input_noref(skb, dst, src, tos, devin); | ||
171 | if (!err) | ||
172 | skb_dst_force(skb); | ||
173 | rcu_read_unlock(); | ||
174 | |||
175 | return err; | ||
176 | } | ||
162 | 177 | ||
163 | extern void ipv4_update_pmtu(struct sk_buff *skb, struct net *net, u32 mtu, | 178 | extern void ipv4_update_pmtu(struct sk_buff *skb, struct net *net, u32 mtu, |
164 | int oif, u32 mark, u8 protocol, int flow_flags); | 179 | int oif, u32 mark, u8 protocol, int flow_flags); |