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

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