Commit f9aefd6
net: warn if mac header was not set
Make sure skb_mac_header(), skb_mac_offset() and skb_mac_header_len() uses
are not fooled if the mac header has not been set.
These checks are enabled if CONFIG_DEBUG_NET=y
This commit will likely expose existing bugs in linux networking stacks.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20220620093017.3366713-1-eric.dumazet@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>1 parent 4336487 commit f9aefd6
1 file changed
+7
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2763 | 2763 | | |
2764 | 2764 | | |
2765 | 2765 | | |
| 2766 | + | |
| 2767 | + | |
| 2768 | + | |
| 2769 | + | |
| 2770 | + | |
2766 | 2771 | | |
2767 | 2772 | | |
| 2773 | + | |
2768 | 2774 | | |
2769 | 2775 | | |
2770 | 2776 | | |
| |||
2775 | 2781 | | |
2776 | 2782 | | |
2777 | 2783 | | |
| 2784 | + | |
2778 | 2785 | | |
2779 | 2786 | | |
2780 | 2787 | | |
2781 | | - | |
2782 | | - | |
2783 | | - | |
2784 | | - | |
2785 | | - | |
2786 | 2788 | | |
2787 | 2789 | | |
2788 | 2790 | | |
| |||
0 commit comments