Skip to contentSkip to conversation

NOTRACK removal breaks working configurations

DISCUSSION Florian Westphal 2 participants 4 messages Dec 20, 2012

Subsystems (2)
lore
Share & tools
lore

Florian Westphal

author maintainer
#0 lore raw

Pablo,

please consider reverting

commit 965505015beccc4ec900798070165875b8e8dccf
Author: Cong Wang <[email protected]>
Subject: netfilter: remove xt_NOTRACK

It breaks working netfilter configurations.
At the very least, NOTRACK should have printk'd

BIG FAT REMOVAL WARNING

for a year or so. Which it didn't do.

Now, someone updating from 3.6 to 3.7 will get iptables-restore failure.

#1 lore raw

Hi Florian,

Quoted 8 lines · Florian Westphal

Pablo,

please consider reverting

commit 965505015beccc4ec900798070165875b8e8dccf
Author: Cong Wang <[email protected]>
Subject: netfilter: remove xt_NOTRACK

Quoted 6 lines

It breaks working netfilter configurations.
At the very least, NOTRACK should have printk'd

BIG FAT REMOVAL WARNING

for a year or so. Which it didn't do.

This was announced in Documentation/feature-removal-schedule.txt and the aliasing infrastructure was added to iptables but I agree in that it was agressive since I think not many users have checked that file / they may no have upgrade iptables to latest.

Can you see any problem with the patch attached?

Quoted 1 line

From 3d990849b0e4b0e4db93195a39e468968e5a10ac Mon Sep 17 00:00:00 2001

From: Pablo Neira Ayuso <[email protected]>
Date: Thu, 20 Dec 2012 12:26:22 +0100
Subject: [PATCH] netfilter: xt_CT: recover NOTRACK target support

Florian Westphal reported that the removal of the NOTRACK target (9655050 netfilter: remove xt_NOTRACK) is breaking some existing setups.

That removal was scheduled for removal since long time ago as described in Documentation/feature-removal-schedule.txt

What:  xt_NOTRACK
Files: net/netfilter/xt_NOTRACK.c
When:  April 2011
Why:   Superseded by xt_CT

Still, people may have not notice / may have decided to stick to an old iptables version. I agree with him in that some more conservative approach by spotting some printk to warn users for some time is less agressive.

Current iptables 1.4.16.3 already contains the aliasing support that makes it point to the CT target, so upgrading would fix it. Still, the policy so far has been to avoid pushing our users to upgrade.

As a solution, this patch recovers the NOTRACK target inside the CT target and it now spots a warning.

---
 include/net/netns/x_tables.h |    1 +
 net/netfilter/Kconfig        |    4 ++++
 net/netfilter/xt_CT.c        |   50 +++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 54 insertions(+), 1 deletion(-)
include/net/netns/x_tables.h +1 -0
index 591db7d..c24060e 100644
@@ -8,6 +8,7 @@ struct ebt_table;
 
 struct netns_xt {
 	struct list_head tables[NFPROTO_NUMPROTO];
+	bool notrack_deprecated_warning;
 #if defined(CONFIG_BRIDGE_NF_EBTABLES) || \
     defined(CONFIG_BRIDGE_NF_EBTABLES_MODULE)
 	struct ebt_table *broute_table;
net/netfilter/Kconfig +4 -0
index fefa514..390f96c 100644
@@ -680,6 +680,10 @@ config NETFILTER_XT_TARGET_NFQUEUE
 
 	  To compile it as a module, choose M here.  If unsure, say N.
 
+config NETFILTER_XT_TARGET_NOTRACK
+	tristate  '"NOTRACK" target support (DEPRECATED)'
+	select NETFILTER_XT_TARGET_CT
+
 config NETFILTER_XT_TARGET_RATEEST
 	tristate '"RATEEST" target support'
 	depends on NETFILTER_ADVANCED
net/netfilter/xt_CT.c +49 -1

66 lines not on this page · raw message

Signature · 1 line
1.7.10.4
author maintainer
#2 lore raw
Quoted 7 lines · Pablo Neira Ayuso
Quoted 7 lines

commit 965505015beccc4ec900798070165875b8e8dccf
Author: Cong Wang <[email protected]>
Subject: netfilter: remove xt_NOTRACK

It breaks working netfilter configurations.
At the very least, NOTRACK should have printk'd

Quoted 6 lines
Quoted 3 lines

BIG FAT REMOVAL WARNING

for a year or so. Which it didn't do.

This was announced in Documentation/feature-removal-schedule.txt and the aliasing infrastructure was added to iptables

I know.

Quoted 2 lines

it was agressive since I think not many users have checked that file / they may no have upgrade iptables to latest.

Right.

Quoted 1 line

Can you see any problem with the patch attached?

No. The patch works.

[   21.870092] xt_CT: netfilter: NOTRACK target is deprecated, use CT instead or upgrade iptables

Even better than a revert.

Thanks,
Florian

#3 lore raw
Quoted 20 lines · Florian Westphal
Quoted 7 lines · Pablo Neira Ayuso
Quoted 7 lines

commit 965505015beccc4ec900798070165875b8e8dccf
Author: Cong Wang <[email protected]>
Subject: netfilter: remove xt_NOTRACK

It breaks working netfilter configurations.
At the very least, NOTRACK should have printk'd

Quoted 6 lines
Quoted 3 lines

BIG FAT REMOVAL WARNING

for a year or so. Which it didn't do.

This was announced in Documentation/feature-removal-schedule.txt and the aliasing infrastructure was added to iptables

I know.

Quoted 2 lines

it was agressive since I think not many users have checked that file / they may no have upgrade iptables to latest.

Quoted 8 lines

Right.

Quoted 1 line

Can you see any problem with the patch attached?

No. The patch works.

[   21.870092] xt_CT: netfilter: NOTRACK target is deprecated, use CT instead or upgrade iptables

Even better than a revert.

Thanks, I'll pass this to David in the next batch and then ask for -stable submission.