aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 50db9b04a552..ae86adee3746 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1465,6 +1465,16 @@ static inline void skb_set_mac_header(struct sk_buff *skb, const int offset)
1465} 1465}
1466#endif /* NET_SKBUFF_DATA_USES_OFFSET */ 1466#endif /* NET_SKBUFF_DATA_USES_OFFSET */
1467 1467
1468static inline void skb_mac_header_rebuild(struct sk_buff *skb)
1469{
1470 if (skb_mac_header_was_set(skb)) {
1471 const unsigned char *old_mac = skb_mac_header(skb);
1472
1473 skb_set_mac_header(skb, -skb->mac_len);
1474 memmove(skb_mac_header(skb), old_mac, skb->mac_len);
1475 }
1476}
1477
1468static inline int skb_checksum_start_offset(const struct sk_buff *skb) 1478static inline int skb_checksum_start_offset(const struct sk_buff *skb)
1469{ 1479{
1470 return skb->csum_start - skb_headroom(skb); 1480 return skb->csum_start - skb_headroom(skb);