summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2024-03-04 11:47:07 +0300
committerDavid S. Miller <davem@davemloft.net>2024-03-04 11:47:07 +0300
commit4a759c12526e2fce3f09ce78fe065c6f93ddb0b6 (patch)
treeee624de454e831304d471110cf6f8aef0d3b0fb7 /include
parent4b2765ae410abf01154cf97876384d8a58c43953 (diff)
parentcc15bd10e716fcb472d611f24d76c795acb0f8c7 (diff)
downloadlinux-4a759c12526e2fce3f09ce78fe065c6f93ddb0b6.tar.xz
Merge branch 'skb-helpers'
Eric Dumazet says: ==================== net: better use of skb helpers First patch is a pure cleanup. Second patch adds a DEBUG_NET_WARN_ON_ONCE() in skb_network_header_len(), this could help to discover old bugs. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/skbuff.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 1470b74fb6d2..d577e0bee18d 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -3036,6 +3036,7 @@ static inline int skb_transport_offset(const struct sk_buff *skb)
static inline u32 skb_network_header_len(const struct sk_buff *skb)
{
+ DEBUG_NET_WARN_ON_ONCE(!skb_transport_header_was_set(skb));
return skb->transport_header - skb->network_header;
}