patch-2.4.0-test6 linux/net/ipv4/ipip.c
Next file: linux/net/ipv4/ipmr.c
Previous file: linux/net/ipv4/ipconfig.c
Back to the patch index
Back to the overall index
- Lines: 55
- Date:
Fri Aug 4 18:18:49 2000
- Orig file:
v2.4.0-test5/linux/net/ipv4/ipip.c
- Orig date:
Mon Jul 10 16:47:28 2000
diff -u --recursive --new-file v2.4.0-test5/linux/net/ipv4/ipip.c linux/net/ipv4/ipip.c
@@ -1,7 +1,7 @@
/*
* Linux NET3: IP/IP protocol decoder.
*
- * Version: $Id: ipip.c,v 1.37 2000/07/07 23:47:45 davem Exp $
+ * Version: $Id: ipip.c,v 1.38 2000/08/02 06:03:59 davem Exp $
*
* Authors:
* Sam Lantinga (slouken@cs.ucdavis.edu) 02/01/95
@@ -534,7 +534,6 @@
int max_headroom; /* The extra header space needed */
u32 dst = tiph->daddr;
int mtu;
- int err;
if (tunnel->recursion++) {
tunnel->stat.collisions++;
@@ -637,26 +636,12 @@
if ((iph->ttl = tiph->ttl) == 0)
iph->ttl = old_iph->ttl;
- iph->tot_len = htons(skb->len);
- ip_select_ident(iph, &rt->u.dst);
- ip_send_check(iph);
-
#ifdef CONFIG_NETFILTER
nf_conntrack_put(skb->nfct);
skb->nfct = NULL;
#endif
- err = NF_HOOK(PF_INET, NF_IP_LOCAL_OUT, skb, NULL, rt->u.dst.dev,
- do_ip_send);
- if(err < 0) {
- if(net_ratelimit())
- printk(KERN_ERR "ipip_tunnel_xmit: ip_send() failed, err=%d\n", -err);
- skb = NULL;
- goto tx_error;
- }
-
- stats->tx_bytes += skb->len;
- stats->tx_packets++;
+ IPTUNNEL_XMIT();
tunnel->recursion--;
return 0;
@@ -664,8 +649,7 @@
dst_link_failure(skb);
tx_error:
stats->tx_errors++;
- if(skb)
- dev_kfree_skb(skb);
+ dev_kfree_skb(skb);
tunnel->recursion--;
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)