mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
inet: Make tunnel RX/TX byte counters more consistent
This patch makes the RX/TX byte counters for IPIP, GRE and SIT more consistent. Previously we included the external IP headers on the way out but not when the packet is inbound. The new scheme is to count payload only in both directions. For IPIP and SIT this simply means the exclusion of the external IP header. For GRE this means that we exclude the GRE header as well. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e1a8000228
commit
64194c31a0
2 changed files with 6 additions and 3 deletions
|
@ -37,7 +37,7 @@ struct ip_tunnel_prl_entry
|
|||
|
||||
#define IPTUNNEL_XMIT() do { \
|
||||
int err; \
|
||||
int pkt_len = skb->len; \
|
||||
int pkt_len = skb->len - skb_transport_offset(skb); \
|
||||
\
|
||||
skb->ip_summed = CHECKSUM_NONE; \
|
||||
ip_select_ident(iph, &rt->u.dst, NULL); \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue