Commit eee2f04b authored by Willem de Bruijn's avatar Willem de Bruijn Committed by David S. Miller

packet: make packet too small warning match condition

The expression in ll_header_truncated() tests less than or equal, but
the warning prints less than. Update the warning.
Reported-by: default avatarJouni Malinen <jkmalinen@gmail.com>
Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
Acked-by: default avatarDaniel Borkmann <dborkman@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 20d14a5d
...@@ -2102,7 +2102,7 @@ static bool ll_header_truncated(const struct net_device *dev, int len) ...@@ -2102,7 +2102,7 @@ static bool ll_header_truncated(const struct net_device *dev, int len)
{ {
/* net device doesn't like empty head */ /* net device doesn't like empty head */
if (unlikely(len <= dev->hard_header_len)) { 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); current->comm, len, dev->hard_header_len);
return true; return true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment