]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - net/netfilter/ipvs/ip_vs_core.c
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[mirror_ubuntu-jammy-kernel.git] / net / netfilter / ipvs / ip_vs_core.c
index 14457551bcb4edca3047320028be0a331d185e14..7138556b206b9fb4ec16c1c5ad48cc0a35680bc9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * IPVS         An implementation of the IP virtual server support for the
  *              LINUX operating system.  IPVS is now implemented as a module
@@ -9,11 +10,6 @@
  *              Peter Kese <peter.kese@ijs.si>
  *              Julian Anastasov <ja@ssi.bg>
  *
- *              This program is free software; you can redistribute it and/or
- *              modify it under the terms of the GNU General Public License
- *              as published by the Free Software Foundation; either version
- *              2 of the License, or (at your option) any later version.
- *
  * The IPVS code for kernel 2.2 was done by Wensong Zhang and Peter Kese,
  * with changes/fixes from Julian Anastasov, Lars Marowsky-Bree, Horms
  * and others.
@@ -21,7 +17,6 @@
  * Changes:
  *     Paul `Rusty' Russell            properly handle non-linear skbs
  *     Harald Welte                    don't use nfcache
- *
  */
 
 #define KMSG_COMPONENT "IPVS"
@@ -2312,7 +2307,6 @@ static void __net_exit __ip_vs_cleanup(struct net *net)
 {
        struct netns_ipvs *ipvs = net_ipvs(net);
 
-       nf_unregister_net_hooks(net, ip_vs_ops, ARRAY_SIZE(ip_vs_ops));
        ip_vs_service_net_cleanup(ipvs);        /* ip_vs_flush() with locks */
        ip_vs_conn_net_cleanup(ipvs);
        ip_vs_app_net_cleanup(ipvs);
@@ -2327,6 +2321,7 @@ static void __net_exit __ip_vs_dev_cleanup(struct net *net)
 {
        struct netns_ipvs *ipvs = net_ipvs(net);
        EnterFunction(2);
+       nf_unregister_net_hooks(net, ip_vs_ops, ARRAY_SIZE(ip_vs_ops));
        ipvs->enable = 0;       /* Disable packet reception */
        smp_wmb();
        ip_vs_sync_net_cleanup(ipvs);