]> git.baikalelectronics.ru Git - kernel.git/commit
drop_monitor: Better sanitize notified packets
authorIdo Schimmel <idosch@mellanox.com>
Sun, 15 Sep 2019 06:46:36 +0000 (09:46 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Sep 2019 19:39:27 +0000 (21:39 +0200)
commitde221f9c00c873db6e7457c34fd6947698e0fc62
treedb3d398fe5737b425daebfbf7cccb46117cc3bec
parent054b9c0fd97a47f5b7bc7cbb88005360e8b8f44f
drop_monitor: Better sanitize notified packets

When working in 'packet' mode, drop monitor generates a notification
with a potentially truncated payload of the dropped packet. The payload
is copied from the MAC header, but I forgot to check that the MAC header
was set, so do it now.

Fixes: 30cb88d1b0a7 ("drop_monitor: Add packet alert mode")
Fixes: ae757ce8213e ("drop_monitor: Add support for packet alert mode for hardware drops")
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/drop_monitor.c