Blame SOURCES/0021-nfnl_osf-Fix-broken-conversion-to-nfnl_query.patch

e8e25e
From b29b3a215b9cbec20ea633e6a861accfc48b59bb Mon Sep 17 00:00:00 2001
e8e25e
From: Phil Sutter <phil@nwl.cc>
e8e25e
Date: Sat, 9 May 2020 13:36:49 +0200
e8e25e
Subject: [PATCH] nfnl_osf: Fix broken conversion to nfnl_query()
e8e25e
e8e25e
Due to missing NLM_F_ACK flag in request, nfnetlink code in kernel
e8e25e
didn't create an own ACK message but left it upon subsystem to ACK or
e8e25e
not. Since nfnetlink_osf doesn't ACK by itself, nfnl_query() got stuck
e8e25e
waiting for a reply.
e8e25e
e8e25e
Whoever did the conversion from deprecated nfnl_talk() obviously didn't
e8e25e
even test basic functionality of the tool.
e8e25e
e8e25e
Fixes: 52aa15098ebd6 ("nfnl_osf: Replace deprecated nfnl_talk() by nfnl_query()")
e8e25e
Signed-off-by: Phil Sutter <phil@nwl.cc>
e8e25e
(cherry picked from commit c8332553caf48132403895bae750b3cd09a2efd8)
e8e25e
Signed-off-by: Phil Sutter <psutter@redhat.com>
e8e25e
---
e8e25e
 utils/nfnl_osf.c | 6 ++++--
e8e25e
 1 file changed, 4 insertions(+), 2 deletions(-)
e8e25e
e8e25e
diff --git a/utils/nfnl_osf.c b/utils/nfnl_osf.c
e8e25e
index 15d531975e11d..922d90ac135b7 100644
e8e25e
--- a/utils/nfnl_osf.c
e8e25e
+++ b/utils/nfnl_osf.c
e8e25e
@@ -378,9 +378,11 @@ static int osf_load_line(char *buffer, int len, int del)
e8e25e
 	memset(buf, 0, sizeof(buf));
e8e25e
 
e8e25e
 	if (del)
e8e25e
-		nfnl_fill_hdr(nfnlssh, nmh, 0, AF_UNSPEC, 0, OSF_MSG_REMOVE, NLM_F_REQUEST);
e8e25e
+		nfnl_fill_hdr(nfnlssh, nmh, 0, AF_UNSPEC, 0, OSF_MSG_REMOVE,
e8e25e
+			      NLM_F_ACK | NLM_F_REQUEST);
e8e25e
 	else
e8e25e
-		nfnl_fill_hdr(nfnlssh, nmh, 0, AF_UNSPEC, 0, OSF_MSG_ADD, NLM_F_REQUEST | NLM_F_CREATE);
e8e25e
+		nfnl_fill_hdr(nfnlssh, nmh, 0, AF_UNSPEC, 0, OSF_MSG_ADD,
e8e25e
+			      NLM_F_ACK | NLM_F_REQUEST | NLM_F_CREATE);
e8e25e
 
e8e25e
 	nfnl_addattr_l(nmh, sizeof(buf), OSF_ATTR_FINGER, &f, sizeof(struct xt_osf_user_finger));
e8e25e
 
e8e25e
-- 
e8e25e
2.26.2
e8e25e