ipv4: Kill ip_route_input_noref().
Subsystems (4)
David Miller
maintainerRFC PATCH v4 2/8 ipv4: Kill ip_route_input_noref().
The "noref" argument to ip_route_input_common() is now always ignored because we do not cache routes, and in that case we must always grab a reference to the resulting 'dst'.
Signed-off-by David S. Miller <[email protected]>
--- include/net/route.h | 16 ++-------------- net/ipv4/arp.c | 2 +- net/ipv4/ip_input.c | 4 ++-- net/ipv4/route.c | 6 +++--- net/ipv4/xfrm4_input.c | 4 ++-- 5 files changed, 10 insertions(+), 22 deletions(-)
include/net/route.h +2 -14
@@ -179,20 +179,8 @@ static inline struct rtable *ip_route_output_gre(struct net *net,return ip_route_output_key (net, &fl4); } -extern int ip_route_input_common (struct sk_buff *skb,__be32 dst,__be32 src, -u8 tos,struct net_device *devin,bool noref); - -static inline int ip_route_input (struct sk_buff *skb,__be32 dst,__be32 src, -u8 tos,struct net_device *devin) -{ -return ip_route_input_common (skb, dst, src, tos, devin, false); -} - -static inline int ip_route_input_noref (struct sk_buff *skb,__be32 dst,__be32 src, -u8 tos,struct net_device *devin) -{ -return ip_route_input_common (skb, dst, src, tos, devin, true); -} +extern int ip_route_input (struct sk_buff *skb,__be32 dst,__be32 src, +u8 tos,struct net_device *devin);extern unsigned short ip_rt_frag_needed (struct net *net,struct iphdr *iph,unsigned short new_mtu,struct net_device *dev);extern void ip_rt_send_redirect (struct sk_buff *skb);
net/ipv4/arp.c +1 -1
@@ -872,7 +872,7 @@ static int arp_process(struct sk_buff *skb) }if (arp->ar_op ==htons (ARPOP_REQUEST ) && -ip_route_input_noref (skb, tip, sip,0 , dev) ==0 ) { +ip_route_input (skb, tip, sip,0 , dev) ==0 ) { rt =skb_rtable (skb); addr_type = rt->rt_type;
net/ipv4/ip_input.c +2 -2
@@ -324,8 +324,8 @@ static int ip_rcv_finish(struct sk_buff *skb)* how the packet travels inside Linux networking. */ if (skb_dst (skb) ==NULL ) { -int err =ip_route_input_noref (skb, iph->daddr, iph->saddr, - iph->tos, skb->dev); +int err =ip_route_input (skb, iph->daddr, iph->saddr, + iph->tos, skb->dev);if (unlikely (err)) {if (err == -EHOSTUNREACH ) IP_INC_STATS_BH(dev_net(skb->dev),
net/ipv4/route.c +3 -3
@@ -1527,8 +1527,8 @@ martian_source_keep_err: goto out; } -int ip_route_input_common (struct sk_buff *skb,__be32 daddr,__be32 saddr, -u8 tos,struct net_device *dev,bool noref) +int ip_route_input (struct sk_buff *skb,__be32 daddr,__be32 saddr, +u8 tos,struct net_device *dev) {int res;
@@ -1571,7 +1571,7 @@ int ip_route_input_common(struct sk_buff *skb, __be32 daddr, __be32 saddr,rcu_read_unlock ();return res; } -EXPORT_SYMBOL (ip_route_input_common); +EXPORT_SYMBOL (ip_route_input);/* called with rcu_read_lock() */ static struct rtable *__mkroute_output(const struct fib_result *res,
net/ipv4/xfrm4_input.c +2 -2
@@ -27,8 +27,8 @@ static inline int xfrm4_rcv_encap_finish(struct sk_buff *skb)if (skb_dst (skb) ==NULL ) {const struct iphdr *iph =ip_hdr (skb); -if (ip_route_input_noref (skb, iph->daddr, iph->saddr, - iph->tos, skb->dev)) +if (ip_route_input (skb, iph->daddr, iph->saddr, + iph->tos, skb->dev)) goto drop; }return dst_input (skb);
Signature · 1 line
1.7.4.1