From: Tommi Rantala <tt.rantala@gmail.com>
To: netfilter-devel@vger.kernel.org
Cc: Tommi Rantala <tommi.rantala@cujo.com>
Subject: [PATCH iptables] extensions: libipt_REJECT: Drop ancient kernel compat hack
Date: Wed, 15 Apr 2026 18:57:20 +0300 [thread overview]
Message-ID: <20260415155720.313166-1-tt.rantala@gmail.com> (raw)
From: Tommi Rantala <tommi.rantala@cujo.com>
The IPT_ICMP_ADMIN_PROHIBITED fallback define and associated
compatibility notes were relevant for 2.4 kernels. The INCOMPATIBILITIES
file referencing these was already dropped in commit 92ce78d04677
("Drop INCOMPATIBILITIES file"), so clean up the remaining leftovers in
the REJECT extension source and man page.
Signed-off-by: Tommi Rantala <tommi.rantala@cujo.com>
---
extensions/libipt_REJECT.c | 14 +-------------
extensions/libipt_REJECT.man | 4 +---
2 files changed, 2 insertions(+), 16 deletions(-)
diff --git a/extensions/libipt_REJECT.c b/extensions/libipt_REJECT.c
index 743dfffc..8bfe0fd7 100644
--- a/extensions/libipt_REJECT.c
+++ b/extensions/libipt_REJECT.c
@@ -6,16 +6,6 @@
#include <string.h>
#include <xtables.h>
#include <linux/netfilter_ipv4/ipt_REJECT.h>
-#include <linux/version.h>
-
-/* If we are compiling against a kernel that does not support
- * IPT_ICMP_ADMIN_PROHIBITED, we are emulating it.
- * The result will be a plain DROP of the packet instead of
- * reject. -- Maciej Soltysiak <solt@dns.toxicfilms.tv>
- */
-#ifndef IPT_ICMP_ADMIN_PROHIBITED
-#define IPT_ICMP_ADMIN_PROHIBITED IPT_TCP_RESET + 1
-#endif
struct reject_names {
const char *name;
@@ -73,7 +63,7 @@ static const struct reject_names reject_table[] = {
},
[IPT_ICMP_ADMIN_PROHIBITED] = {
"icmp-admin-prohibited", "admin-prohib",
- "ICMP administratively prohibited (*)",
+ "ICMP administratively prohibited",
"admin-prohibited",
},
};
@@ -102,8 +92,6 @@ static void REJECT_help(void)
" a reply packet according to type:\n");
print_reject_types();
-
- printf("(*) See man page or read the INCOMPATIBILITES file for compatibility issues.\n");
}
static const struct xt_option_entry REJECT_opts[] = {
diff --git a/extensions/libipt_REJECT.man b/extensions/libipt_REJECT.man
index a7196cdc..ea4d92e6 100644
--- a/extensions/libipt_REJECT.man
+++ b/extensions/libipt_REJECT.man
@@ -19,7 +19,7 @@ The type given can be
\fBicmp\-proto\-unreachable\fP,
\fBicmp\-net\-prohibited\fP,
\fBicmp\-host\-prohibited\fP, or
-\fBicmp\-admin\-prohibited\fP (*),
+\fBicmp\-admin\-prohibited\fP,
which return the appropriate ICMP error message (\fBicmp\-port\-unreachable\fP is
the default). The option
\fBtcp\-reset\fP
@@ -28,8 +28,6 @@ TCP RST packet to be sent back. This is mainly useful for blocking
.I ident
(113/tcp) probes which frequently occur when sending mail to broken mail
hosts (which won't accept your mail otherwise).
-.IP
-(*) Using icmp\-admin\-prohibited with kernels that do not support it will result in a plain DROP instead of REJECT
.PP
\fIWarning:\fP You should not indiscriminately apply the REJECT target to
packets whose connection state is classified as INVALID; instead, you should
--
2.53.0
reply other threads:[~2026-04-15 15:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260415155720.313166-1-tt.rantala@gmail.com \
--to=tt.rantala@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=tommi.rantala@cujo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.