netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] packet: make packet too small warning match condition
@ 2015-01-08 16:29 Willem de Bruijn
  2015-01-08 21:21 ` Daniel Borkmann
  2015-01-12 21:01 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Willem de Bruijn @ 2015-01-08 16:29 UTC (permalink / raw)
  To: netdev; +Cc: davem, jkmalinen, dborkman, Willem de Bruijn

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 <jkmalinen@gmail.com>
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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-12 21:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-08 16:29 [PATCH net-next] packet: make packet too small warning match condition Willem de Bruijn
2015-01-08 21:21 ` Daniel Borkmann
2015-01-12 21:01 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).