Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Oct 2023 23:16:06 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 90876d4c6939 - releng/14.0 - LinuxKPI: skbuff: remove assumption about mac_header
Message-ID:  <202310092316.399NG6Zf070881@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch releng/14.0 has been updated by bz:

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

commit 90876d4c69393fc926d50320c31d5fa5ac3904d5
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-09 23:14:52 +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
    Approved by:    re (gjb)
    
    (cherry picked from commit f0e59b6903c881859d7f4eaf269b2336b774c7bc)
    (cherry picked from commit 46e5d2b0c6e01fd0789a6ef543c8b9f52852301b)
---
 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)
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202310092316.399NG6Zf070881>