Commit b24bfee
committed
net: skb_reset_mac_len() must check if mac_header was set
JIRA: https://issues.redhat.com/browse/RHEL-96625
Upstream Status: net-next.git commit 1e4033b
commit 1e4033b
Author: Eric Dumazet <edumazet@google.com>
Date: Tue Nov 5 17:43:57 2024 +0000
net: skb_reset_mac_len() must check if mac_header was set
Recent discussions show that skb_reset_mac_len() should be more careful.
We expect the MAC header being set.
If not, clear skb->mac_len and fire a warning for CONFIG_DEBUG_NET=y builds.
If after investigations we find that not having a MAC header was okay,
we can remove the warning.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/netdev/CANn89iJZGH+yEfJxfPWa3Hm7jxb-aeY2Up4HufmLMnVuQXt38A@mail.gmail.com/T/
Cc: En-Wei Wu <en-wei.wu@canonical.com>
Reviewed-by: Joe Damato <jdamato@fastly.com>
Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Link: https://patch.msgid.link/20241105174403.850330-2-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Davide Caratti <dcaratti@redhat.com>1 parent f683009 commit b24bfee
1 file changed
+11
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2916 | 2916 | | |
2917 | 2917 | | |
2918 | 2918 | | |
| 2919 | + | |
| 2920 | + | |
| 2921 | + | |
| 2922 | + | |
| 2923 | + | |
2919 | 2924 | | |
2920 | 2925 | | |
2921 | | - | |
| 2926 | + | |
| 2927 | + | |
| 2928 | + | |
| 2929 | + | |
| 2930 | + | |
| 2931 | + | |
2922 | 2932 | | |
2923 | 2933 | | |
2924 | 2934 | | |
| |||
3021 | 3031 | | |
3022 | 3032 | | |
3023 | 3033 | | |
3024 | | - | |
3025 | | - | |
3026 | | - | |
3027 | | - | |
3028 | | - | |
3029 | 3034 | | |
3030 | 3035 | | |
3031 | 3036 | | |
| |||
0 commit comments