mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-30 10:39:04 +00:00
cdb83aaf5f
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de SVN-Revision: 48224
18 lines
636 B
Diff
18 lines
636 B
Diff
Fix a regression in the af_packet code that was breaking PPPoE
|
|
|
|
pppd sends packets with only a header and no payload.
|
|
|
|
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|
|
|
--- a/net/packet/af_packet.c
|
|
+++ b/net/packet/af_packet.c
|
|
@@ -2329,7 +2329,7 @@ static void tpacket_destruct_skb(struct
|
|
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)) {
|
|
+ if (unlikely(len < dev->hard_header_len)) {
|
|
net_warn_ratelimited("%s: packet size is too short (%d <= %d)\n",
|
|
current->comm, len, dev->hard_header_len);
|
|
return true;
|