* [PATCH] iptables: spurious error in load_extension
@ 2013-10-08 16:20 Phil Oester
2013-11-03 20:26 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Phil Oester @ 2013-10-08 16:20 UTC (permalink / raw)
To: netfilter-devel; +Cc: pablo
[-- Attachment #1: Type: text/plain, Size: 944 bytes --]
In commit 927385017047d (iptables: improve error reporting with extension
loading troubles), a new error message was added in an attempt to handle
the case where a match does not support a particular protocol family.
For instance, attempting to use the osf match on IPv6.
Unfortunately, this error message now triggers when creating a new chain
which has the same name as a match extension, because iptables calls
xtables_find_target with the name of the new chain to verify it does not
clash with an existing target. For example:
# iptables -N tcp
/usr/lib/xtables/libxt_tcp.so: no "tcp" extension found for this protocol
I attempted to resolve this by adding a new XTF flag, but that required changes
in many different places (including -j handling). It seems easiest just to
remove this warning and stick with the original error message of ENOENT, even
if less than precise.
Signed-off-by: Phil Oester <kernel@linuxace.com>
[-- Attachment #2: patch-iptables-load_extension --]
[-- Type: text/plain, Size: 413 bytes --]
diff --git a/libxtables/xtables.c b/libxtables/xtables.c
index 8437baf..fb60c01 100644
--- a/libxtables/xtables.c
+++ b/libxtables/xtables.c
@@ -578,8 +578,6 @@ static void *load_extension(const char *search_path, const char *af_prefix,
if (ptr != NULL)
return ptr;
- fprintf(stderr, "%s: no \"%s\" extension found for "
- "this protocol\n", path, name);
errno = ENOENT;
return NULL;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iptables: spurious error in load_extension
2013-10-08 16:20 [PATCH] iptables: spurious error in load_extension Phil Oester
@ 2013-11-03 20:26 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2013-11-03 20:26 UTC (permalink / raw)
To: Phil Oester; +Cc: netfilter-devel
On Tue, Oct 08, 2013 at 09:20:15AM -0700, Phil Oester wrote:
> In commit 927385017047d (iptables: improve error reporting with extension
> loading troubles), a new error message was added in an attempt to handle
> the case where a match does not support a particular protocol family.
> For instance, attempting to use the osf match on IPv6.
>
> Unfortunately, this error message now triggers when creating a new chain
> which has the same name as a match extension, because iptables calls
> xtables_find_target with the name of the new chain to verify it does not
> clash with an existing target. For example:
>
> # iptables -N tcp
> /usr/lib/xtables/libxt_tcp.so: no "tcp" extension found for this protocol
>
> I attempted to resolve this by adding a new XTF flag, but that required changes
> in many different places (including -j handling). It seems easiest just to
> remove this warning and stick with the original error message of ENOENT, even
> if less than precise.
Also applied, thanks Phil.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-03 20:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-08 16:20 [PATCH] iptables: spurious error in load_extension Phil Oester
2013-11-03 20:26 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).