summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-11-11 14:12:51 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-11-11 14:12:51 +0000
commit8a2a1c1d71199a77ba92a02f8e5be6fd7d7bf398 (patch)
tree926e5970f96ee9b989fd929669e1c5e66b380b38 /target
parent4e239d9fdbad9f125b2a82eb2eb39041ac87c1da (diff)
downloadmtk-20170518-8a2a1c1d71199a77ba92a02f8e5be6fd7d7bf398.zip
mtk-20170518-8a2a1c1d71199a77ba92a02f8e5be6fd7d7bf398.tar.gz
mtk-20170518-8a2a1c1d71199a77ba92a02f8e5be6fd7d7bf398.tar.bz2
kernel: fix an af_packet regression that was breaking PPPoE on 4.1+ (#20707)
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 47459
Diffstat (limited to 'target')
-rw-r--r--target/linux/generic/patches-4.1/103-packet_allow_empty_payload.patch17
-rw-r--r--target/linux/generic/patches-4.3/103-packet_allow_empty_payload.patch17
2 files changed, 34 insertions, 0 deletions
diff --git a/target/linux/generic/patches-4.1/103-packet_allow_empty_payload.patch b/target/linux/generic/patches-4.1/103-packet_allow_empty_payload.patch
new file mode 100644
index 0000000..052f457
--- /dev/null
+++ b/target/linux/generic/patches-4.1/103-packet_allow_empty_payload.patch
@@ -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 <nbd@openwrt.org>
+
+--- 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;
diff --git a/target/linux/generic/patches-4.3/103-packet_allow_empty_payload.patch b/target/linux/generic/patches-4.3/103-packet_allow_empty_payload.patch
new file mode 100644
index 0000000..3e38bdf
--- /dev/null
+++ b/target/linux/generic/patches-4.3/103-packet_allow_empty_payload.patch
@@ -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 <nbd@openwrt.org>
+
+--- 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;