Update hnat_nf_hook.c

This commit is contained in:
padavanonly 2023-04-12 14:02:00 +08:00 committed by GitHub
parent 5c15d0669b
commit 59953ad02b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -494,7 +494,14 @@ unsigned int do_hnat_ge_to_ext(struct sk_buff *skb, const char *func)
else
index = entry->ipv6_5t_route.act_dp;
skb->dev = get_dev_from_index(index);
dev = get_dev_from_index(index);
if (!dev) {
trace_printk("%s: called from %s. Get wifi interface fail\n",
__func__, func);
return 0;
}
skb->dev = dev;
if (IS_HQOS_MODE && eth_hdr(skb)->h_proto == HQOS_MAGIC_TAG) {
skb = skb_unshare(skb, GFP_ATOMIC);