[][[Kernel][common][hnat][Fix debug_level in skb_to_hnat_info]]
[Description]
Fix debug_level in skb_to_hnat_info.
If without the patch, can't return when gmac < 0(default debug_level is 0).
[Release-log]
NA
Change-Id: Ic6d8771b2e7ee636665b1f7b645465286efc1c49
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/9736046
diff --git a/21.02/files/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat_nf_hook.c b/21.02/files/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat_nf_hook.c
index 17f5e4e..1de70af 100644
--- a/21.02/files/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat_nf_hook.c
+++ b/21.02/files/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat_nf_hook.c
@@ -1157,8 +1157,8 @@
}
static int hnat_ipv6_get_nexthop(struct sk_buff *skb,
- const struct net_device *out,
- struct flow_offload_hw_path *hw_path)
+ const struct net_device *out,
+ struct flow_offload_hw_path *hw_path)
{
const struct in6_addr *ipv6_nexthop;
struct neighbour *neigh = NULL;
@@ -1193,8 +1193,8 @@
}
static int hnat_ipv4_get_nexthop(struct sk_buff *skb,
- const struct net_device *out,
- struct flow_offload_hw_path *hw_path)
+ const struct net_device *out,
+ struct flow_offload_hw_path *hw_path)
{
u32 nexthop;
struct neighbour *neigh;
@@ -2144,10 +2144,11 @@
gmac = -EINVAL;
}
- if ((gmac < 0) && (debug_level >= 7)) {
- printk_ratelimited(KERN_WARNING
- "Unknown case of dp, iif=%x --> %s\n",
- skb_hnat_iface(skb), dev->name);
+ if (gmac < 0) {
+ if (debug_level >= 7)
+ printk_ratelimited(KERN_WARNING
+ "Unknown case of dp, iif=%x --> %s\n",
+ skb_hnat_iface(skb), dev->name);
return 0;
}