git: 46e5d2b0c6e0 - stable/14 - LinuxKPI: skbuff: remove assumption about mac_header

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Wed, 04 Oct 2023 15:23:43 UTC
The branch stable/14 has been updated by bz:

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

commit 46e5d2b0c6e01fd0789a6ef543c8b9f52852301b
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2023-09-08 12:47:03 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2023-10-04 15:19:18 +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)
 {