git: b5e94d0bad60 - stable/13 - LinuxKPI: skbuff: remove assumption about mac_header

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Wed, 29 Nov 2023 16:38:11 UTC
The branch stable/13 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=b5e94d0bad60705239ddd865bfc7cf93c400e0a4

commit b5e94d0bad60705239ddd865bfc7cf93c400e0a4
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2023-09-08 12:47:03 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2023-11-29 16:36:06 +0000

    LinuxKPI: skbuff: remove assumption about mac_header
    
    It seems the mac_header can be set to offset 0 for frames received.
    Remove the warning splattering messages to the console for each packet.
    
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit f0e59b6903c881859d7f4eaf269b2336b774c7bc)
---
 sys/compat/linuxkpi/common/include/linux/skbuff.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys/compat/linuxkpi/common/include/linux/skbuff.h b/sys/compat/linuxkpi/common/include/linux/skbuff.h
index c917b3f09ac9..f8ce212e7853 100644
--- a/sys/compat/linuxkpi/common/include/linux/skbuff.h
+++ b/sys/compat/linuxkpi/common/include/linux/skbuff.h
@@ -935,10 +935,9 @@ static inline uint8_t *
 skb_mac_header(const struct sk_buff *skb)
 {
 	SKB_TRACE(skb);
-	/* Make sure the mac_header was set as otherwise we return garbage. */
-	WARN_ON(skb->mac_header == 0);
 	return (skb->head + skb->mac_header);
 }
+
 static inline void
 skb_reset_mac_header(struct sk_buff *skb)
 {