mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-30 01:52:51 +00:00
ipq807x: fix a null pointer crash in ip_tunnel
Fixes: WIFI-7571 Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
Index: linux-5.4.164-qsdk-d5fcb18e5420670c8734c6a659873e73adab6dac/net/ipv4/ip_tunnel_core.c
|
||||
===================================================================
|
||||
--- linux-5.4.164-qsdk-d5fcb18e5420670c8734c6a659873e73adab6dac.orig/net/ipv4/ip_tunnel_core.c
|
||||
+++ linux-5.4.164-qsdk-d5fcb18e5420670c8734c6a659873e73adab6dac/net/ipv4/ip_tunnel_core.c
|
||||
@@ -86,7 +86,7 @@ void iptunnel_xmit(struct sock *sk, stru
|
||||
in_dev = __dev_get_by_index(&init_net, skb_iif);
|
||||
}
|
||||
|
||||
- if (proto == IPPROTO_IPV6 || proto == IPPROTO_GRE || netif_is_vxlan(in_dev)) {
|
||||
+ if (proto == IPPROTO_IPV6 || proto == IPPROTO_GRE || (in_dev && netif_is_vxlan(in_dev))) {
|
||||
skb->skb_iif = skb_iif;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user