tools/padjffs2: use Host/Prepare/Default instead of raw commands
[openwrt/staging/stintel.git] / target / linux / generic / hack-6.6 / 650-netfilter-add-xt_FLOWOFFLOAD-target.patch
index cb7ac007b11d12e45e5881af389d53f46d83b484..eca611da7e837551ad8e91497d7222d16eb9670e 100644 (file)
@@ -8,7 +8,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/net/netfilter/Kconfig
 +++ b/net/netfilter/Kconfig
-@@ -1025,6 +1025,15 @@ config NETFILTER_XT_TARGET_NOTRACK
+@@ -729,7 +729,6 @@ config NF_FLOW_TABLE
+       tristate "Netfilter flow table module"
+       depends on NETFILTER_INGRESS
+       depends on NF_CONNTRACK
+-      depends on NF_TABLES
+       help
+         This option adds the flow table core infrastructure.
+@@ -1025,6 +1024,15 @@ config NETFILTER_XT_TARGET_NOTRACK
        depends on NETFILTER_ADVANCED
        select NETFILTER_XT_TARGET_CT
  
@@ -36,7 +44,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  obj-$(CONFIG_NETFILTER_XT_TARGET_LED) += xt_LED.o
 --- /dev/null
 +++ b/net/netfilter/xt_FLOWOFFLOAD.c
-@@ -0,0 +1,702 @@
+@@ -0,0 +1,703 @@
 +/*
 + * Copyright (C) 2018-2021 Felix Fietkau <nbd@nbd.name>
 + *
@@ -101,7 +109,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +              proto = veth->h_vlan_encapsulated_proto;
 +              break;
 +      case htons(ETH_P_PPP_SES):
-+              proto = nf_flow_pppoe_proto(skb);
++              if (!nf_flow_pppoe_proto(skb, &proto))
++                      return NF_ACCEPT;
 +              break;
 +      default:
 +              proto = skb->protocol;
@@ -547,6 +556,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +      if (!nf_ct_is_confirmed(ct))
 +              return XT_CONTINUE;
 +
++      dir = CTINFO2DIR(ctinfo);
++
 +      devs[dir] = xt_out(par);
 +      devs[!dir] = xt_in(par);
 +
@@ -556,8 +567,6 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +      if (test_and_set_bit(IPS_OFFLOAD_BIT, &ct->status))
 +              return XT_CONTINUE;
 +
-+      dir = CTINFO2DIR(ctinfo);
-+
 +      if (xt_flowoffload_route(skb, ct, par, &route, dir, devs) < 0)
 +              goto err_flow_route;
 +