summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2013-05-22 18:42:37 -0400
committerPablo Neira Ayuso <pablo@netfilter.org>2013-05-23 08:23:16 -0400
commitde94c4591bd606729af1b913d6e98c6c449e42df (patch)
tree7c829fc4d72632b28c0927a3942c1ab6012b77c7
parent6d11cfdba52af08b889fd6d3ee4212930493eb38 (diff)
netfilter: {ipt,ebt}_ULOG: rise warning on deprecation
This target has been superseded by NFLOG. Spot a warning so we prepare removal in a couple of years. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Acked-by: Gao feng <gaofeng@cn.fujitsu.com>
-rw-r--r--include/net/netns/x_tables.h6
-rw-r--r--net/bridge/netfilter/ebt_ulog.c6
-rw-r--r--net/ipv4/netfilter/Kconfig2
-rw-r--r--net/ipv4/netfilter/ipt_ULOG.c6
4 files changed, 19 insertions, 1 deletions
diff --git a/include/net/netns/x_tables.h b/include/net/netns/x_tables.h
index c24060ee411e..02fe40f8c8fd 100644
--- a/include/net/netns/x_tables.h
+++ b/include/net/netns/x_tables.h
@@ -15,5 +15,11 @@ struct netns_xt {
15 struct ebt_table *frame_filter; 15 struct ebt_table *frame_filter;
16 struct ebt_table *frame_nat; 16 struct ebt_table *frame_nat;
17#endif 17#endif
18#if IS_ENABLED(CONFIG_IP_NF_TARGET_ULOG)
19 bool ulog_warn_deprecated;
20#endif
21#if IS_ENABLED(CONFIG_BRIDGE_EBT_ULOG)
22 bool ebt_ulog_warn_deprecated;
23#endif
18}; 24};
19#endif 25#endif
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c
index fc1905c51417..2ec6c19ff903 100644
--- a/net/bridge/netfilter/ebt_ulog.c
+++ b/net/bridge/netfilter/ebt_ulog.c
@@ -267,6 +267,12 @@ static int ebt_ulog_tg_check(const struct xt_tgchk_param *par)
267{ 267{
268 struct ebt_ulog_info *uloginfo = par->targinfo; 268 struct ebt_ulog_info *uloginfo = par->targinfo;
269 269
270 if (!par->net->xt.ebt_ulog_warn_deprecated) {
271 pr_info("ebt_ulog is deprecated and it will be removed soon, "
272 "use ebt_nflog instead\n");
273 par->net->xt.ebt_ulog_warn_deprecated = true;
274 }
275
270 if (uloginfo->nlgroup > 31) 276 if (uloginfo->nlgroup > 31)
271 return -EINVAL; 277 return -EINVAL;
272 278
diff --git a/net/ipv4/netfilter/Kconfig b/net/ipv4/netfilter/Kconfig
index e7916c193932..4e9028017428 100644
--- a/net/ipv4/netfilter/Kconfig
+++ b/net/ipv4/netfilter/Kconfig
@@ -111,7 +111,7 @@ config IP_NF_TARGET_REJECT
111 To compile it as a module, choose M here. If unsure, say N. 111 To compile it as a module, choose M here. If unsure, say N.
112 112
113config IP_NF_TARGET_ULOG 113config IP_NF_TARGET_ULOG
114 tristate "ULOG target support" 114 tristate "ULOG target support (obsolete)"
115 default m if NETFILTER_ADVANCED=n 115 default m if NETFILTER_ADVANCED=n
116 ---help--- 116 ---help---
117 117
diff --git a/net/ipv4/netfilter/ipt_ULOG.c b/net/ipv4/netfilter/ipt_ULOG.c
index f8a222cb6448..c1953d07e2f4 100644
--- a/net/ipv4/netfilter/ipt_ULOG.c
+++ b/net/ipv4/netfilter/ipt_ULOG.c
@@ -325,6 +325,12 @@ static int ulog_tg_check(const struct xt_tgchk_param *par)
325{ 325{
326 const struct ipt_ulog_info *loginfo = par->targinfo; 326 const struct ipt_ulog_info *loginfo = par->targinfo;
327 327
328 if (!par->net->xt.ulog_warn_deprecated) {
329 pr_info("ULOG is deprecated and it will be removed soon, "
330 "use NFLOG instead\n");
331 par->net->xt.ulog_warn_deprecated = true;
332 }
333
328 if (loginfo->prefix[sizeof(loginfo->prefix) - 1] != '\0') { 334 if (loginfo->prefix[sizeof(loginfo->prefix) - 1] != '\0') {
329 pr_debug("prefix not null-terminated\n"); 335 pr_debug("prefix not null-terminated\n");
330 return -EINVAL; 336 return -EINVAL;