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