kernel: bump 6.1 to 6.1.63
[openwrt/openwrt.git] / target / linux / generic / pending-6.1 / 700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch
index 3de0201f95547e9184f05a34712848d4c5c88462..6050db3f5b7fb8cdf89de03ba173ebe336963454 100644 (file)
@@ -10,7 +10,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
 
 --- a/net/netfilter/nf_flow_table_core.c
 +++ b/net/netfilter/nf_flow_table_core.c
-@@ -608,28 +608,52 @@ void nf_flow_table_free(struct nf_flowta
+@@ -659,6 +659,23 @@ static struct pernet_operations nf_flow_
        .exit_batch = nf_flow_table_pernet_exit,
  };
  
@@ -34,19 +34,14 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  static int __init nf_flow_table_module_init(void)
  {
        int ret;
-       ret = register_pernet_subsys(&nf_flow_table_net_ops);
-       if (ret < 0)
-               return ret;
-       ret = nf_flow_table_offload_init();
+@@ -671,8 +688,14 @@ static int __init nf_flow_table_module_i
        if (ret)
                goto out_offload;
-+
 +      ret = register_netdevice_notifier(&flow_offload_netdev_notifier);
 +      if (ret)
 +              goto out_offload_init;
++
        return 0;
  
 +out_offload_init:
@@ -54,18 +49,17 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  out_offload:
        unregister_pernet_subsys(&nf_flow_table_net_ops);
        return ret;
- }
+@@ -680,6 +703,7 @@ out_offload:
  
  static void __exit nf_flow_table_module_exit(void)
  {
 +      unregister_netdevice_notifier(&flow_offload_netdev_notifier);
        nf_flow_table_offload_exit();
-       unregister_pernet_subsys(&nf_flow_table_net_ops);
+       unregister_pernet_subsys(&nf_flow_table_net_ops);
  }
 --- a/net/netfilter/nft_flow_offload.c
 +++ b/net/netfilter/nft_flow_offload.c
-@@ -444,47 +444,14 @@ static struct nft_expr_type nft_flow_off
+@@ -470,47 +470,14 @@ static struct nft_expr_type nft_flow_off
        .owner          = THIS_MODULE,
  };