mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Mark Brown <broonie@kernel.org>
Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	David Miller <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Liu Chao <liuc63@xiaopeng.com>,
	Networking <netdev@vger.kernel.org>,
	Paolo Abeni <pabeni@redhat.com>, Piotr Kubik <piotr@kubik.pl>
Subject: Re: linux-next: manual merge of the bluetooth-fixes tree with the net tree
Date: Wed, 21 Oct 2026 13:55:40 +0200	[thread overview]
Message-ID: <atioPA8ofnC-PCGi@chamomile> (raw)
In-Reply-To: <atiblfL12VddJgjU@sirena.co.uk>

Hi,

@netdev maintainers: Please, see below.

On Wed, Oct 21, 2026 at 12:01:41PM +0100, Mark Brown wrote:
> Hi all,
> 
> Today's linux-next merge of the bluetooth-fixes tree got a conflict in:
> 
>   net/netfilter/nf_conntrack_netlink.c
> 
> between commit:
> 
>   cd37ab22a74e0 ("netfilter: nf_conntrack_netlink: fix inverted IPv6 tuple filter")
> 
> from the net tree and commit:
> 
>   1ae2d094b0200 ("netfilter: ctnetlink: fix inverted IPv6 address match in dump filter")
> 
> from the bluetooth-fixes tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.

Sorry for this: This patch is duplicated, one variant went into
net.git and another into net-next.git.

Two possibilities:

- Revert 1ae2d094b020 ("netfilter: ctnetlink: fix inverted IPv6
  address match in dump filter") in net-next.git

or

- Revert cd37ab22a74e ("netfilter: nf_conntrack_netlink: fix inverted
  IPv6 tuple filter")

before net-next.git gets merged into net.git, because these two
patches address the same issue.

Apologies for this.

> diff --combined net/netfilter/nf_conntrack_netlink.c
> index cc8695d5356d2,4b6abe36028e3..0000000000000
> --- a/net/netfilter/nf_conntrack_netlink.c
> +++ b/net/netfilter/nf_conntrack_netlink.c
> @@@ -911,6 -911,7 +911,7 @@@ struct ctnetlink_filter 
>   static const struct nla_policy cta_filter_nla_policy[CTA_FILTER_MAX + 1] = {
>   	[CTA_FILTER_ORIG_FLAGS]		= NLA_POLICY_MASK(NLA_U32, CTA_FILTER_F_ALL),
>   	[CTA_FILTER_REPLY_FLAGS]	= NLA_POLICY_MASK(NLA_U32, CTA_FILTER_F_ALL),
> + 	[CTA_FILTER_ZONE]		= { .type = NLA_FLAG },
>   };
>   
>   static int ctnetlink_parse_filter(const struct nlattr *attr,
> @@@ -930,6 -931,9 +931,9 @@@
>   	if (tb[CTA_FILTER_REPLY_FLAGS])
>   		filter->reply_flags = nla_get_u32(tb[CTA_FILTER_REPLY_FLAGS]);
>   
> + 	if (tb[CTA_FILTER_ZONE])
> + 		filter->zone_filter = true;
> + 
>   	return 0;
>   }
>   
> @@@ -1006,6 -1010,7 +1010,7 @@@ ctnetlink_alloc_filter(const struct nla
>   	if (err)
>   		goto err_filter;
>   
> + 	/* CTA_ZONE is allowed without CTA_FILTER_ZONE. */
>   	if (cda[CTA_ZONE]) {
>   		err = ctnetlink_parse_zone(cda[CTA_ZONE], &filter->zone);
>   		if (err < 0)
> @@@ -1020,6 -1025,12 +1025,12 @@@
>   	if (err < 0)
>   		goto err_filter;
>   
> + 	/* CTA_FILTER_ZONE cannot be set without CTA_ZONE. */
> + 	if (filter->zone_filter && !cda[CTA_ZONE]) {
> + 		err = -EINVAL;
> + 		goto err_filter;
> + 	}
> + 
>   	if (filter->orig_flags) {
>   		if (!cda[CTA_TUPLE_ORIG]) {
>   			err = -EINVAL;
> @@@ -1098,13 -1109,13 +1109,13 @@@ static int ctnetlink_filter_match_tuple
>   		break;
>   	case NFPROTO_IPV6:
>   		if ((flags & CTA_FILTER_FLAG(CTA_IP_SRC)) &&
> - 		    ipv6_addr_cmp(&filter_tuple->src.u3.in6,
> - 				  &ct_tuple->src.u3.in6))
> + 		    !ipv6_addr_equal(&filter_tuple->src.u3.in6,
> + 				     &ct_tuple->src.u3.in6))
>   			return 0;
>   
>   		if ((flags & CTA_FILTER_FLAG(CTA_IP_DST)) &&
> - 		    ipv6_addr_cmp(&filter_tuple->dst.u3.in6,
> - 				  &ct_tuple->dst.u3.in6))
> + 		    !ipv6_addr_equal(&filter_tuple->dst.u3.in6,
> + 				     &ct_tuple->dst.u3.in6))
>   			return 0;
>   		break;
>   	}



  reply	other threads:[~2026-10-21 11:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-21 11:01 Mark Brown
2026-10-21 11:55 ` Pablo Neira Ayuso [this message]
2026-10-21 13:00   ` Paolo Abeni
2026-10-21 18:36     ` Pablo Neira Ayuso

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=atioPA8ofnC-PCGi@chamomile \
    --to=pablo@netfilter.org \
    --cc=broonie@kernel.org \
    --cc=davem@davemloft.net \
    --cc=johan.hedberg@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=liuc63@xiaopeng.com \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=piotr@kubik.pl \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®