diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2018-09-15 00:01:17 +0200 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2018-09-15 00:01:17 +0200 |
commit | de1230ab3be91cea8e4a51211b0d1ce24cc85d81 (patch) | |
tree | 55bef6971635f54b8e73663c438a45859653589d /target/linux/mediatek/patches/1019-fix-wifi-forward-crash.patch | |
parent | efb1b35fe9e904d64ba5d5b1886199a2c968ae37 (diff) | |
download | mtk-20170518-de1230ab3be91cea8e4a51211b0d1ce24cc85d81.zip mtk-20170518-de1230ab3be91cea8e4a51211b0d1ce24cc85d81.tar.gz mtk-20170518-de1230ab3be91cea8e4a51211b0d1ce24cc85d81.tar.bz2 |
target/linux/mediatek: add all other patches
Diffstat (limited to 'target/linux/mediatek/patches/1019-fix-wifi-forward-crash.patch')
-rw-r--r-- | target/linux/mediatek/patches/1019-fix-wifi-forward-crash.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/target/linux/mediatek/patches/1019-fix-wifi-forward-crash.patch b/target/linux/mediatek/patches/1019-fix-wifi-forward-crash.patch new file mode 100644 index 0000000..449be43 --- /dev/null +++ b/target/linux/mediatek/patches/1019-fix-wifi-forward-crash.patch @@ -0,0 +1,25 @@ +Index: linux-3.10.20/drivers/net/wireless/wifi_forward/wifi_fwd/wifi_fwd.c +=================================================================== +--- linux-3.10.20.orig/drivers/net/wireless/wifi_forward/wifi_fwd/wifi_fwd.c ++++ linux-3.10.20/drivers/net/wireless/wifi_forward/wifi_fwd/wifi_fwd.c +@@ -2473,6 +2473,9 @@ static int wifi_fwd_rx_handler(struct sk + unsigned int recv_from = 0, band_from = 0, ret = 0; + int idx = 0; + ++ if (mh == NULL || skb == NULL) { ++ return 1; ++ } + net_dev = skb->dev; + recv_from = WIFI_FWD_GET_PACKET_RECV_FROM(skb, recv_from_cb_offset); + band_from = WIFI_FWD_GET_PACKET_BAND(skb, band_cb_offset); +@@ -2506,6 +2509,10 @@ static int wifi_fwd_rx_handler(struct sk + return 2; + } + } ++ ++ if (mh->h_dest == NULL || br_lan->dev_addr == NULL) { ++ return 1; ++ } + + /* forward the packet to bridge no matter unicast or broadcast */ + if (MAC_ADDR_EQUAL(mh->h_dest, br_lan->dev_addr)) |