[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210712164904.GA16733@salvia>
Date: Mon, 12 Jul 2021 18:49:04 +0200
From: Pablo Neira Ayuso <pablo@...filter.org>
To: Yajun Deng <yajun.deng@...ux.dev>
Cc: davem@...emloft.net, yoshfuji@...ux-ipv6.org, dsahern@...nel.org,
kuba@...nel.org, mathew.j.martineau@...ux.intel.com,
matthieu.baerts@...sares.net, kadlec@...filter.org, fw@...len.de,
vyasevich@...il.com, nhorman@...driver.com,
marcelo.leitner@...il.com, johannes.berg@...el.com, ast@...nel.org,
yhs@...com, 0x7f454c46@...il.com, aahringo@...hat.com,
rdunlap@...radead.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, mptcp@...ts.linux.dev,
netfilter-devel@...r.kernel.org, coreteam@...filter.org,
linux-sctp@...r.kernel.org
Subject: Re: [PATCH] net: Use nlmsg_unicast() instead of netlink_unicast()
On Mon, Jul 12, 2021 at 08:53:01PM +0800, Yajun Deng wrote:
> diff --git a/net/netfilter/nft_compat.c b/net/netfilter/nft_compat.c
> index 639c337c885b..aa3397eec330 100644
> --- a/net/netfilter/nft_compat.c
> +++ b/net/netfilter/nft_compat.c
> @@ -683,10 +683,8 @@ static int nfnl_compat_get_rcu(struct sk_buff *skb,
> goto out_put;
> }
>
> - ret = netlink_unicast(info->sk, skb2, NETLINK_CB(skb).portid,
> - MSG_DONTWAIT);
> - if (ret > 0)
> - ret = 0;
> + ret = nlmsg_unicast(info->sk, skb2, NETLINK_CB(skb).portid);
netfilter needs nfnetlink_unicast to deal with EAGAIN, see e0241ae6ac59
So either:
a) use nfnetlink_unicast.
b) remove this chunk and I'll route a patch to fix this in the
netfilter tree.
Pick one at your choice.
Thanks.
> out_put:
> rcu_read_lock();
> module_put(THIS_MODULE);
Powered by blists - more mailing lists