summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Kuznetsov <kuznet@ms2.inr.ac.ru>2002-10-24 12:42:55 -0700
committerHideaki Yoshifuji <yoshfuji@linux-ipv6.org>2002-10-24 12:42:55 -0700
commitca77d319b757e8abb74684207de47298d1dd6fa2 (patch)
tree9ff830d01068a13443dba609c98f0bc45ed79fea
parent29cdd1dbfbc4a7ca7ac2dca453b0bb3ba189ca00 (diff)
[IPV4]: Kill ip_send, use dst_output instead.
-rw-r--r--include/net/ip.h8
-rw-r--r--include/net/ipip.h2
-rw-r--r--net/ipv4/ip_forward.c23
-rw-r--r--net/ipv4/ip_gre.c6
-rw-r--r--net/ipv4/ipip.c6
-rw-r--r--net/ipv6/sit.c7
6 files changed, 4 insertions, 48 deletions
diff --git a/include/net/ip.h b/include/net/ip.h
index bf14f1f50b90..af74bb3f79d9 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -162,14 +162,6 @@ extern int sysctl_local_port_range[2];
extern int sysctl_ip_default_ttl;
#ifdef CONFIG_INET
-static inline int ip_send(struct sk_buff *skb)
-{
- if (skb->len > skb->dst->pmtu)
- return ip_fragment(skb, ip_finish_output);
- else
- return ip_finish_output(skb);
-}
-
/* The function in 2.2 was invalid, producing wrong result for
* check=0xFEFF. It was noticed by Arthur Skawina _year_ ago. --ANK(000625) */
static inline
diff --git a/include/net/ipip.h b/include/net/ipip.h
index ac6438760b0b..ab54c217d75d 100644
--- a/include/net/ipip.h
+++ b/include/net/ipip.h
@@ -34,7 +34,7 @@ struct ip_tunnel
ip_select_ident(iph, &rt->u.dst, NULL); \
ip_send_check(iph); \
\
- err = NF_HOOK(PF_INET, NF_IP_LOCAL_OUT, skb, NULL, rt->u.dst.dev, do_ip_send); \
+ err = NF_HOOK(PF_INET, NF_IP_LOCAL_OUT, skb, NULL, rt->u.dst.dev, dst_output);\
if (err == NET_XMIT_SUCCESS || err == NET_XMIT_CN) { \
stats->tx_bytes += pkt_len; \
stats->tx_packets++; \
diff --git a/net/ipv4/ip_forward.c b/net/ipv4/ip_forward.c
index 3e7b1f5bc394..3115409b0319 100644
--- a/net/ipv4/ip_forward.c
+++ b/net/ipv4/ip_forward.c
@@ -47,27 +47,10 @@ static inline int ip_forward_finish(struct sk_buff *skb)
IP_INC_STATS_BH(IpForwDatagrams);
- if (opt->optlen == 0) {
-#ifdef CONFIG_NET_FASTROUTE
- struct rtable *rt = (struct rtable*)skb->dst;
+ if (unlikely(opt->optlen))
+ ip_forward_options(skb);
- if (rt->rt_flags&RTCF_FAST && !netdev_fastroute_obstacles) {
- struct dst_entry *old_dst;
- unsigned h = ((*(u8*)&rt->fl.fl4_dst)^(*(u8*)&rt->fl.fl4_src))&NETDEV_FASTROUTE_HMASK;
-
- write_lock_irq(&skb->dev->fastpath_lock);
- old_dst = skb->dev->fastpath[h];
- skb->dev->fastpath[h] = dst_clone(&rt->u.dst);
- write_unlock_irq(&skb->dev->fastpath_lock);
-
- dst_release(old_dst);
- }
-#endif
- return (ip_send(skb));
- }
-
- ip_forward_options(skb);
- return (ip_send(skb));
+ return dst_output(skb);
}
int ip_forward(struct sk_buff *skb)
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 1f2be777418d..abc8c432205c 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -675,12 +675,6 @@ drop_nolock:
return(0);
}
-/* Need this wrapper because NF_HOOK takes the function address */
-static inline int do_ip_send(struct sk_buff *skb)
-{
- return ip_send(skb);
-}
-
static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct ip_tunnel *tunnel = (struct ip_tunnel*)dev->priv;
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index 26e76160f75a..24303cbbf85e 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -521,12 +521,6 @@ out:
return 0;
}
-/* Need this wrapper because NF_HOOK takes the function address */
-static inline int do_ip_send(struct sk_buff *skb)
-{
- return ip_send(skb);
-}
-
/*
* This function assumes it is being called from dev_queue_xmit()
* and that skb is filled properly by that function.
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index ccfd558c1031..35ae6b288d67 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -423,13 +423,6 @@ out:
return 0;
}
-/* Need this wrapper because NF_HOOK takes the function address */
-static inline int do_ip_send(struct sk_buff *skb)
-{
- return ip_send(skb);
-}
-
-
/* Returns the embedded IPv4 address if the IPv6 address
comes from 6to4 (draft-ietf-ngtrans-6to4-04) addr space */