aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/skbuff.h7
-rw-r--r--net/bridge/br_forward.c2
-rw-r--r--net/ipv4/ip_forward.c2
-rw-r--r--net/ipv6/ip6_output.c2
4 files changed, 10 insertions, 3 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 37247901ebd2..1c19b2d55c2b 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1654,5 +1654,12 @@ static inline int skb_is_gso(const struct sk_buff *skb)
1654 return skb_shinfo(skb)->gso_size; 1654 return skb_shinfo(skb)->gso_size;
1655} 1655}
1656 1656
1657static inline void skb_forward_csum(struct sk_buff *skb)
1658{
1659 /* Unfortunately we don't support this one. Any brave souls? */
1660 if (skb->ip_summed == CHECKSUM_COMPLETE)
1661 skb->ip_summed = CHECKSUM_NONE;
1662}
1663
1657#endif /* __KERNEL__ */ 1664#endif /* __KERNEL__ */
1658#endif /* _LINUX_SKBUFF_H */ 1665#endif /* _LINUX_SKBUFF_H */
diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c
index 3e45c1a1aa96..ada7f495445c 100644
--- a/net/bridge/br_forward.c
+++ b/net/bridge/br_forward.c
@@ -71,7 +71,7 @@ static void __br_forward(const struct net_bridge_port *to, struct sk_buff *skb)
71 71
72 indev = skb->dev; 72 indev = skb->dev;
73 skb->dev = to->dev; 73 skb->dev = to->dev;
74 skb->ip_summed = CHECKSUM_NONE; 74 skb_forward_csum(skb);
75 75
76 NF_HOOK(PF_BRIDGE, NF_BR_FORWARD, skb, indev, skb->dev, 76 NF_HOOK(PF_BRIDGE, NF_BR_FORWARD, skb, indev, skb->dev,
77 br_forward_finish); 77 br_forward_finish);
diff --git a/net/ipv4/ip_forward.c b/net/ipv4/ip_forward.c
index 61b30d100676..9cb04df0054b 100644
--- a/net/ipv4/ip_forward.c
+++ b/net/ipv4/ip_forward.c
@@ -67,7 +67,7 @@ int ip_forward(struct sk_buff *skb)
67 if (skb->pkt_type != PACKET_HOST) 67 if (skb->pkt_type != PACKET_HOST)
68 goto drop; 68 goto drop;
69 69
70 skb->ip_summed = CHECKSUM_NONE; 70 skb_forward_csum(skb);
71 71
72 /* 72 /*
73 * According to the RFC, we must first decrease the TTL field. If 73 * According to the RFC, we must first decrease the TTL field. If
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index e2b8db6b9aef..be3f082a87ed 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -378,7 +378,7 @@ int ip6_forward(struct sk_buff *skb)
378 goto drop; 378 goto drop;
379 } 379 }
380 380
381 skb->ip_summed = CHECKSUM_NONE; 381 skb_forward_csum(skb);
382 382
383 /* 383 /*
384 * We DO NOT make any processing on 384 * We DO NOT make any processing on