Author: nbd
Date: 2015-11-11 15:12:51 +0100 (Wed, 11 Nov 2015)
New Revision: 47459

Added:
   trunk/target/linux/generic/patches-4.1/103-packet_allow_empty_payload.patch
   trunk/target/linux/generic/patches-4.3/103-packet_allow_empty_payload.patch
Log:
kernel: fix an af_packet regression that was breaking PPPoE on 4.1+ (#20707)

Signed-off-by: Felix Fietkau <[email protected]>

Added: 
trunk/target/linux/generic/patches-4.1/103-packet_allow_empty_payload.patch
===================================================================
--- trunk/target/linux/generic/patches-4.1/103-packet_allow_empty_payload.patch 
                        (rev 0)
+++ trunk/target/linux/generic/patches-4.1/103-packet_allow_empty_payload.patch 
2015-11-11 14:12:51 UTC (rev 47459)
@@ -0,0 +1,17 @@
+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 <[email protected]>
+
+--- a/net/packet/af_packet.c
++++ b/net/packet/af_packet.c
+@@ -2106,7 +2106,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;

Added: 
trunk/target/linux/generic/patches-4.3/103-packet_allow_empty_payload.patch
===================================================================
--- trunk/target/linux/generic/patches-4.3/103-packet_allow_empty_payload.patch 
                        (rev 0)
+++ trunk/target/linux/generic/patches-4.3/103-packet_allow_empty_payload.patch 
2015-11-11 14:12:51 UTC (rev 47459)
@@ -0,0 +1,17 @@
+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 <[email protected]>
+
+--- a/net/packet/af_packet.c
++++ b/net/packet/af_packet.c
+@@ -2323,7 +2323,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;
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to