packet: make packet too small warning match condition
Subsystems (3)
PATCH 1/1 packet: make packet too small warning match condition
From: Willem de Bruijn <[email protected]>
The expression in ll_header_truncated() tests less than or equal, but the warning prints less than. Update the warning.
Reported-by Jouni Malinen <[email protected]>
Signed-off-by Willem de Bruijn <[email protected]>
--- net/packet/af_packet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/packet/af_packet.c +1 -1
@@ -2102,7 +2102,7 @@ static bool ll_header_truncated(const struct net_device *dev, int len) {/* net device doesn't like empty head */ if (unlikely (len <= dev->hard_header_len)) { -net_warn_ratelimited ("%s: packet size is too short (%d < %d)\n" , +net_warn_ratelimited ("%s: packet size is too short (%d <= %d)\n" , current->comm, len, dev->hard_header_len);return true; }
Signature · 1 line
2.2.0.rc0.207.ga3a616c
Quoted 7 lines · Willem de Bruijn
From: Willem de Bruijn <[email protected]>
The expression in
ll_header_truncated()tests less than or equal, but the warning prints less than. Update the warning.Reported-by Jouni Malinen <[email protected]>Signed-off-by Willem de Bruijn <[email protected]>
Acked-by Daniel Borkmann <[email protected]>
David Miller
maintainerFrom: Willem de Bruijn <[email protected]>
Date: Thu, 8 Jan 2015 11:29:18 -0500
Quoted 7 lines
From: Willem de Bruijn <[email protected]>
The expression in
ll_header_truncated()tests less than or equal, but the warning prints less than. Update the warning.Reported-by Jouni Malinen <[email protected]>Signed-off-by Willem de Bruijn <[email protected]>
Yeah that could be really confusing. Applied, thanks.