* iptables: considers incomplete rule in -C and finds an erroneous match
@ 2024-02-04 23:45 Roman Mamedov
2024-02-04 23:59 ` Roman Mamedov
2024-02-06 15:07 ` Phil Sutter
0 siblings, 2 replies; 3+ messages in thread
From: Roman Mamedov @ 2024-02-04 23:45 UTC (permalink / raw)
To: netfilter-devel
Hello,
According to my ip6tables, a rule like this already exists:
# ip6tables -C INPUT -p tcp -m multiport --dports 80,443 -j ACCEPT && echo Exists
Exists
Except that it doesn't, and an extra IP filter is present:
# ip6tables-save | grep 80,443
-A INPUT -s fd39::/16 -p tcp -m multiport --dports 80,443 -j ACCEPT
Is that the expected behaviour?
ip6tables v1.8.9 (legacy)
Thanks
--
With respect,
Roman
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: iptables: considers incomplete rule in -C and finds an erroneous match
2024-02-04 23:45 iptables: considers incomplete rule in -C and finds an erroneous match Roman Mamedov
@ 2024-02-04 23:59 ` Roman Mamedov
2024-02-06 15:07 ` Phil Sutter
1 sibling, 0 replies; 3+ messages in thread
From: Roman Mamedov @ 2024-02-04 23:59 UTC (permalink / raw)
To: netfilter-devel
On Mon, 5 Feb 2024 04:45:19 +0500
Roman Mamedov <rm@romanrm.net> wrote:
> # ip6tables-save | grep 80,443
> -A INPUT -s fd39::/16 -p tcp -m multiport --dports 80,443 -j ACCEPT
Actually the 2nd rule doesn't matter at all, it just returns success (rule
exists) on anything.
# ip6tables -C INPUT -p udp --dport 12345 -j ACCEPT && echo Exists
Exists
# ip6tables-save | grep 12345
#
--
With respect,
Roman
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: iptables: considers incomplete rule in -C and finds an erroneous match
2024-02-04 23:45 iptables: considers incomplete rule in -C and finds an erroneous match Roman Mamedov
2024-02-04 23:59 ` Roman Mamedov
@ 2024-02-06 15:07 ` Phil Sutter
1 sibling, 0 replies; 3+ messages in thread
From: Phil Sutter @ 2024-02-06 15:07 UTC (permalink / raw)
To: Roman Mamedov; +Cc: netfilter-devel
Hi,
On Mon, Feb 05, 2024 at 04:45:19AM +0500, Roman Mamedov wrote:
> Hello,
>
> According to my ip6tables, a rule like this already exists:
>
> # ip6tables -C INPUT -p tcp -m multiport --dports 80,443 -j ACCEPT && echo Exists
> Exists
>
> Except that it doesn't, and an extra IP filter is present:
>
> # ip6tables-save | grep 80,443
> -A INPUT -s fd39::/16 -p tcp -m multiport --dports 80,443 -j ACCEPT
>
> Is that the expected behaviour?
>
> ip6tables v1.8.9 (legacy)
This is already fixed in v1.8.10 by commit 78850e7dba64a ("ip6tables:
Fix checking existence of rule").
Cheers, Phil
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-06 15:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-04 23:45 iptables: considers incomplete rule in -C and finds an erroneous match Roman Mamedov
2024-02-04 23:59 ` Roman Mamedov
2024-02-06 15:07 ` Phil Sutter
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).