treewide: fix replace nbd@openwrt.org with nbd@nbd.name
[openwrt.git] / target / linux / generic / patches-4.1 / 103-packet_allow_empty_payload.patch
1 Fix a regression in the af_packet code that was breaking PPPoE
2
3 pppd sends packets with only a header and no payload.
4
5 Signed-off-by: Felix Fietkau <nbd@nbd.name>
6
7 --- a/net/packet/af_packet.c
8 +++ b/net/packet/af_packet.c
9 @@ -2112,7 +2112,7 @@ static void tpacket_destruct_skb(struct
10  static bool ll_header_truncated(const struct net_device *dev, int len)
11  {
12         /* net device doesn't like empty head */
13 -       if (unlikely(len <= dev->hard_header_len)) {
14 +       if (unlikely(len < dev->hard_header_len)) {
15                 net_warn_ratelimited("%s: packet size is too short (%d <= %d)\n",
16                                      current->comm, len, dev->hard_header_len);
17                 return true;