Re: [PATCH] Warn people that ipchains and ipfwadm are going away.

From: Marc Ballarin
Date: Wed Sep 22 2004 - 08:33:36 EST


On Wed, 22 Sep 2004 02:16:08 +0200
Patrick McHardy <kaber@xxxxxxxxx> wrote:

> Fixed by this patch.

Yes, works fine. Does this mean that ipchains was broken for a while, but
no one complained?

Anyway, here is another trivial patch against -bk7 that adds runtime
warnings. IMO most users are going to miss compile time warnings, or
won't even compile kernels themselves.

Regards

diff -Nurp tmp/linux-2.6.9/net/ipv4/netfilter/ipchains_core.c
linux-2.6.9/net/ipv4/netfilter/ipchains_core.c
--- tmp/linux-2.6.9/net/ipv4/netfilter/ipchains_core.c 2004-09-22 14:45:26.398827000 +0200
+++ linux-2.6.9/net/ipv4/netfilter/ipchains_core.c 2004-09-22 14:51:20.017069184 +0200
@@ -1800,6 +1800,9 @@ int ipfw_init_or_cleanup(int init)

if (!init) goto cleanup;

+ printk(KERN_WARNING
+ "Warning: ipchains is obsolete, and will be removed soon!\n");
+
#ifdef DEBUG_IP_FIREWALL_LOCKING
fwc_wlocks = fwc_rlocks = 0;
#endif
diff -Nurp tmp/linux-2.6.9/net/ipv4/netfilter/ipfwadm_core.c
linux-2.6.9/net/ipv4/netfilter/ipfwadm_core.c
--- tmp/linux-2.6.9/net/ipv4/netfilter/ipfwadm_core.c 2004-09-22 14:45:53.545700000 +0200
+++ linux-2.6.9/net/ipv4/netfilter/ipfwadm_core.c 2004-09-22 14:51:37.780368752 +0200
@@ -1420,6 +1420,9 @@ int ipfw_init_or_cleanup(int init)
if (!init)
goto cleanup;

+ printk(KERN_WARNING
+ "Warning: ipfwadm is obsolete, and will be removed soon!\n");
+
ret = register_firewall(PF_INET, &ipfw_ops);
if (ret < 0)
goto cleanup_nothing;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/