Blame SOURCES/0003-monitor-Drop-update-table-and-update-chain-cases.patch

9ff721
From 12169cc4179429a88fcc4ffab3e52adb0daf95fc Mon Sep 17 00:00:00 2001
9ff721
From: Phil Sutter <phil@nwl.cc>
9ff721
Date: Thu, 11 Oct 2018 17:48:58 +0200
9ff721
Subject: [PATCH] monitor: Drop 'update table' and 'update chain' cases
9ff721
9ff721
There seems to be no situation where this comes to play. Also, since
9ff721
there is no 'nft update table/chain' command, this is inconsistent with
9ff721
input.
9ff721
9ff721
Signed-off-by: Phil Sutter <phil@nwl.cc>
9ff721
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
9ff721
(cherry picked from commit 62cea2e4ca9d6bc781ced6518810144a8d697275)
9ff721
Signed-off-by: Phil Sutter <psutter@redhat.com>
9ff721
---
9ff721
 src/monitor.c | 10 ++--------
9ff721
 1 file changed, 2 insertions(+), 8 deletions(-)
9ff721
9ff721
diff --git a/src/monitor.c b/src/monitor.c
9ff721
index d75410888e3d0..3e70b89f0b2ab 100644
9ff721
--- a/src/monitor.c
9ff721
+++ b/src/monitor.c
9ff721
@@ -186,10 +186,7 @@ static int netlink_events_table_cb(const struct nlmsghdr *nlh, int type,
9ff721
 	switch (monh->format) {
9ff721
 	case NFTNL_OUTPUT_DEFAULT:
9ff721
 		if (type == NFT_MSG_NEWTABLE) {
9ff721
-			if (nlh->nlmsg_flags & NLM_F_EXCL)
9ff721
-				nft_mon_print(monh, "update table ");
9ff721
-			else
9ff721
-				nft_mon_print(monh, "add table ");
9ff721
+			nft_mon_print(monh, "add table ");
9ff721
 		} else {
9ff721
 			nft_mon_print(monh, "delete table ");
9ff721
 		}
9ff721
@@ -227,10 +224,7 @@ static int netlink_events_chain_cb(const struct nlmsghdr *nlh, int type,
9ff721
 	case NFTNL_OUTPUT_DEFAULT:
9ff721
 		switch (type) {
9ff721
 		case NFT_MSG_NEWCHAIN:
9ff721
-			if (nlh->nlmsg_flags & NLM_F_EXCL)
9ff721
-				nft_mon_print(monh, "update ");
9ff721
-			else
9ff721
-				nft_mon_print(monh, "add ");
9ff721
+			nft_mon_print(monh, "add ");
9ff721
 
9ff721
 			c = netlink_delinearize_chain(monh->ctx, nlc);
9ff721
 			chain_print_plain(c, monh->ctx->octx);
9ff721
-- 
bacbc8
2.21.0
9ff721