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

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