git: f0e59b6903c8 - main - LinuxKPI: skbuff: remove assumption about mac_header
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 11 Sep 2023 14:32:01 UTC
The branch main has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=f0e59b6903c881859d7f4eaf269b2336b774c7bc
commit f0e59b6903c881859d7f4eaf269b2336b774c7bc
Author: Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2023-09-08 12:47:03 +0000
Commit: Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2023-09-11 14:31:35 +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
MFC after: 3 days
---
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)
{