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

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