netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nft] src: allow update of net base w. meta l4proto icmpv6
@ 2017-03-21 18:54 Florian Westphal
  2017-03-22 13:09 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 11+ messages in thread
From: Florian Westphal @ 2017-03-21 18:54 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Florian Westphal

nft add rule ip6 f i meta l4proto ipv6-icmp icmpv6 type nd-router-advert
<cmdline>:1:50-60: Error: conflicting protocols specified: unknown vs. icmpv6

add icmpv6 to nexthdr list so base gets updated correctly.

Reported-by: Thomas Woerner <twoerner@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
---
 NB: This is STILL not correct.
 nft add rule ip6 f i meta l4proto ipv6-icmp icmpv6 type nd-router-advert
 gets listed as
  icmpv6 type nd-router-advert

because post processing removes the l3 dependency.

However, "icmpv6 type nd-router-advert" uses dependency
ip6 nexthdr icmpv6
which isn't the same as meta l4proto icmpv6.

I suspect nft should always generate implicit l4 dependencies
via meta in the ipv6 case, what do others think
(and not autoremove 'nexthdr' check)?

diff --git a/src/proto.c b/src/proto.c
index 79e9dbf2b33e..fcdfbe73c735 100644
--- a/src/proto.c
+++ b/src/proto.c
@@ -779,6 +779,7 @@ const struct proto_desc proto_inet_service = {
 		PROTO_LINK(IPPROTO_TCP,		&proto_tcp),
 		PROTO_LINK(IPPROTO_DCCP,	&proto_dccp),
 		PROTO_LINK(IPPROTO_SCTP,	&proto_sctp),
+		PROTO_LINK(IPPROTO_ICMPV6,	&proto_icmp6),
 	},
 	.templates	= {
 		[0]	= PROTO_META_TEMPLATE("l4proto", &inet_protocol_type, NFT_META_L4PROTO, 8),
-- 
2.10.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-03-29 10:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-21 18:54 [PATCH nft] src: allow update of net base w. meta l4proto icmpv6 Florian Westphal
2017-03-22 13:09 ` Pablo Neira Ayuso
2017-03-22 13:44   ` Florian Westphal
2017-03-22 15:29     ` Pablo Neira Ayuso
2017-03-22 15:32       ` Pablo Neira Ayuso
2017-03-22 15:44         ` Florian Westphal
2017-03-22 16:07           ` Pablo Neira Ayuso
2017-03-22 19:22             ` Florian Westphal
2017-03-24 11:50               ` Pablo Neira Ayuso
2017-03-24 12:21                 ` Florian Westphal
2017-03-29 10:13                   ` 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).