Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de94c459 authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso
Browse files

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: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Acked-by: default avatarGao feng <gaofeng@cn.fujitsu.com>
parent 6d11cfdb
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -15,5 +15,11 @@ struct netns_xt {
	struct ebt_table *frame_filter;
	struct ebt_table *frame_nat;
#endif
#if IS_ENABLED(CONFIG_IP_NF_TARGET_ULOG)
	bool ulog_warn_deprecated;
#endif
#if IS_ENABLED(CONFIG_BRIDGE_EBT_ULOG)
	bool ebt_ulog_warn_deprecated;
#endif
};
#endif
+6 −0
Original line number Diff line number Diff line
@@ -267,6 +267,12 @@ static int ebt_ulog_tg_check(const struct xt_tgchk_param *par)
{
	struct ebt_ulog_info *uloginfo = par->targinfo;

	if (!par->net->xt.ebt_ulog_warn_deprecated) {
		pr_info("ebt_ulog is deprecated and it will be removed soon, "
			"use ebt_nflog instead\n");
		par->net->xt.ebt_ulog_warn_deprecated = true;
	}

	if (uloginfo->nlgroup > 31)
		return -EINVAL;

+1 −1
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ config IP_NF_TARGET_REJECT
	  To compile it as a module, choose M here.  If unsure, say N.

config IP_NF_TARGET_ULOG
	tristate "ULOG target support"
	tristate "ULOG target support (obsolete)"
	default m if NETFILTER_ADVANCED=n
	---help---

+6 −0
Original line number Diff line number Diff line
@@ -325,6 +325,12 @@ static int ulog_tg_check(const struct xt_tgchk_param *par)
{
	const struct ipt_ulog_info *loginfo = par->targinfo;

	if (!par->net->xt.ulog_warn_deprecated) {
		pr_info("ULOG is deprecated and it will be removed soon, "
			"use NFLOG instead\n");
		par->net->xt.ulog_warn_deprecated = true;
	}

	if (loginfo->prefix[sizeof(loginfo->prefix) - 1] != '\0') {
		pr_debug("prefix not null-terminated\n");
		return -EINVAL;