Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netfilter: remove xt pernet data

clusterip is now handled via net_generic.

NOTRACK is tiny compared to rest of xt_CT feature set, even the existing
deprecation warning is bigger than the actual functionality.

Just remove the warning, its not worth keeping/adding a net_generic one.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

authored by

Florian Westphal and committed by
Pablo Neira Ayuso
f2e3778d ded2d10e

-25
-2
include/net/net_namespace.h
··· 23 23 #include <net/netns/ieee802154_6lowpan.h> 24 24 #include <net/netns/sctp.h> 25 25 #include <net/netns/netfilter.h> 26 - #include <net/netns/x_tables.h> 27 26 #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) 28 27 #include <net/netns/conntrack.h> 29 28 #endif ··· 132 133 #endif 133 134 #ifdef CONFIG_NETFILTER 134 135 struct netns_nf nf; 135 - struct netns_xt xt; 136 136 #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) 137 137 struct netns_ct ct; 138 138 #endif
-12
include/net/netns/x_tables.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef __NETNS_X_TABLES_H 3 - #define __NETNS_X_TABLES_H 4 - 5 - #include <linux/list.h> 6 - #include <linux/netfilter_defs.h> 7 - 8 - struct netns_xt { 9 - bool notrack_deprecated_warning; 10 - bool clusterip_deprecated_warning; 11 - }; 12 - #endif
-11
net/netfilter/xt_CT.c
··· 351 351 return XT_CONTINUE; 352 352 } 353 353 354 - static int notrack_chk(const struct xt_tgchk_param *par) 355 - { 356 - if (!par->net->xt.notrack_deprecated_warning) { 357 - pr_info("netfilter: NOTRACK target is deprecated, " 358 - "use CT instead or upgrade iptables\n"); 359 - par->net->xt.notrack_deprecated_warning = true; 360 - } 361 - return 0; 362 - } 363 - 364 354 static struct xt_target notrack_tg_reg __read_mostly = { 365 355 .name = "NOTRACK", 366 356 .revision = 0, 367 357 .family = NFPROTO_UNSPEC, 368 - .checkentry = notrack_chk, 369 358 .target = notrack_tg, 370 359 .table = "raw", 371 360 .me = THIS_MODULE,