diff options
Diffstat (limited to 'include/net/ipip.h')
-rw-r--r-- | include/net/ipip.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/include/net/ipip.h b/include/net/ipip.h index b522397f8..398660ca8 100644 --- a/include/net/ipip.h +++ b/include/net/ipip.h @@ -9,7 +9,7 @@ struct ip_tunnel { struct ip_tunnel *next; - struct net_device *dev; + struct net_device *dev; struct net_device_stats stat; int recursion; /* Depth of hard_start_xmit recursion */ @@ -25,6 +25,25 @@ struct ip_tunnel struct ip_tunnel_parm parms; }; +#define IPTUNNEL_XMIT() do { \ + int err; \ + int pkt_len = skb->len; \ + \ + iph->tot_len = htons(skb->len); \ + ip_select_ident(iph, &rt->u.dst); \ + ip_send_check(iph); \ + \ + err = NF_HOOK(PF_INET, NF_IP_LOCAL_OUT, skb, NULL, rt->u.dst.dev, do_ip_send); \ + if (err == NET_XMIT_SUCCESS || err == NET_XMIT_CN) { \ + stats->tx_bytes += pkt_len; \ + stats->tx_packets++; \ + } else { \ + stats->tx_errors++; \ + stats->tx_aborted_errors++; \ + } \ +} while (0) + + extern int ipip_init(void); extern int ipgre_init(void); extern int sit_init(void); |