kernel: xt_FLOWOFFLOAD: fix use of uninitialized dir variable
[openwrt/staging/ansuel.git] / target / linux / generic / hack-6.1 / 650-netfilter-add-xt_FLOWOFFLOAD-target.patch
index 59a5fb4d9104607e6723a5e54cd0339b21b9ef55..1dfd556ce881df73ab8b2a68672d80bcc377281e 100644 (file)
@@ -547,6 +547,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 +558,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;
 +