Skip to contentSkip to conversation

netfilter: nft_compat: use nfnetlink_unicast()

PATCH Superseded Pablo Neira Ayuso 1 participant 1 message Jul 13, 2021

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 netfilter: nft_compat: use nfnetlink_unicast()

nfnetlink_unicast() translates EAGAIN to ENOBUFS, since EAGAIN is reserved to report missing module dependencies to the nfnetlink core.

Fixes e0241ae6ac59 ("netfilter: use nfnetlink_unicast()")
---
 net/netfilter/nft_compat.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
net/netfilter/nft_compat.c +1 -4
index 639c337c885b..60f234df4e1d 100644
@@ -683,10 +683,7 @@ 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 = nfnetlink_unicast(skb2, info->net, NETLINK_CB(skb).portid);
 out_put:
 	rcu_read_lock();
 	module_put(THIS_MODULE);
Signature · 1 line
2.20.1