[PATCH net-next] packet: make packet too small warning match condition

Subsystems: networking [general], packet sockets, the rest

STALE4223d

3 messages, 3 authors, 2015-01-12 · open the first message on its own page

[PATCH net-next] packet: make packet too small warning match condition

From: Willem de Bruijn <willemb@google.com>
Date: 2015-01-08 16:29:44

From: Willem de Bruijn <willemb@google.com>

The expression in ll_header_truncated() tests less than or equal, but
the warning prints less than. Update the warning.

Reported-by: Jouni Malinen <redacted>
Signed-off-by: Willem de Bruijn <willemb@google.com>
---
 net/packet/af_packet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 6880f34..0f02668 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -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;
 	}
-- 
2.2.0.rc0.207.ga3a616c

Re: [PATCH net-next] packet: make packet too small warning match condition

From: Daniel Borkmann <hidden>
Date: 2015-01-08 21:22:02

On 01/08/2015 05:29 PM, Willem de Bruijn wrote:
From: Willem de Bruijn <willemb@google.com>

The expression in ll_header_truncated() tests less than or equal, but
the warning prints less than. Update the warning.

Reported-by: Jouni Malinen <redacted>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Acked-by: Daniel Borkmann <redacted>

Re: [PATCH net-next] packet: make packet too small warning match condition

From: David Miller <davem@davemloft.net>
Date: 2015-01-12 21:01:46

From: Willem de Bruijn <willemb@google.com>
Date: Thu,  8 Jan 2015 11:29:18 -0500
From: Willem de Bruijn <willemb@google.com>

The expression in ll_header_truncated() tests less than or equal, but
the warning prints less than. Update the warning.

Reported-by: Jouni Malinen <redacted>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Yeah that could be really confusing.  Applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help