Skip to contentSkip to conversation

packet: make packet too small warning match condition

PATCH In review Willem de Bruijn 3 participants 3 messages Jan 8, 2015 – Jan 12, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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.

---
 net/packet/af_packet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/packet/af_packet.c +1 -1
index 6880f34..0f02668 100644
@@ -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