summaryrefslogtreecommitdiff
path: root/sys/modules/examples/panic_string/panic_string.c
diff options
context:
space:
mode:
authormaxv <maxv@NetBSD.org>2018-05-29 08:24:59 +0000
committermaxv <maxv@NetBSD.org>2018-05-29 08:24:59 +0000
commitae37ae8f9dd7c62b55f78b29cc504ec5371a6c58 (patch)
treebbce1cf7e6254bf168e56b5b6321385660c89d59 /sys/modules/examples/panic_string/panic_string.c
parentb0b0709220e1186d02bc8035ffc2a51f1fd09417 (diff)
Replace KASSERT by m_pullup. While the ethernet header is always there
when the packet was received on a physical interface, it may not be if the packet was received over L2TP/EtherIP. In particular, if the inner ethernet header ends up on two separate IP fragments. Here the KASSERT is triggered, and on !DIAGNOSTIC we corrupt memory. Note that this is a widespread problem: a lot of L2 code was written with the assumption that "most" headers are present in the first mbuf. Obviously, that's not true if L2 encapsulation is being used.
Diffstat (limited to 'sys/modules/examples/panic_string/panic_string.c')
0 files changed, 0 insertions, 0 deletions