From 1dbcbe1ae24756b7b7a7fe8a02626f58604ca2fd Mon Sep 17 00:00:00 2001
From: Phil Sutter <psutter@redhat.com>
Date: Fri, 15 Mar 2019 13:08:03 +0100
Subject: [PATCH] monitor: Drop fake XML support
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1646336
Upstream Status: nftables commit 2194a76ed46a2
Conflicts: Adjusted changes to missing commit fbcb888b311a9
("src: move monitor code to src/monitor.c").
commit 2194a76ed46a2f097c5ca5955e44544418866cc2
Author: Phil Sutter <phil@nwl.cc>
Date: Thu Oct 11 17:48:57 2018 +0200
monitor: Drop fake XML support
Since libnftnl doesn't support XML formatting, pretending to do so in
nft monitor is pointless.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
src/netlink.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/src/netlink.c b/src/netlink.c
index ebfad18..09d483d 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -2014,7 +2014,6 @@ static int netlink_events_table_cb(const struct nlmsghdr *nlh, int type,
nft_mon_print(monh, "%s %s\n", family2str(family),
nftnl_table_get_str(nlt, NFTNL_TABLE_NAME));
break;
- case NFTNL_OUTPUT_XML:
case NFTNL_OUTPUT_JSON:
nftnl_table_fprintf(monh->ctx->octx->output_fp, nlt,
monh->format, netlink_msg2nftnl_of(type));
@@ -2056,7 +2055,6 @@ static int netlink_events_chain_cb(const struct nlmsghdr *nlh, int type,
break;
}
break;
- case NFTNL_OUTPUT_XML:
case NFTNL_OUTPUT_JSON:
nftnl_chain_fprintf(monh->ctx->octx->output_fp, nlc,
monh->format, netlink_msg2nftnl_of(type));
@@ -2103,7 +2101,6 @@ static int netlink_events_set_cb(const struct nlmsghdr *nlh, int type,
break;
}
break;
- case NFTNL_OUTPUT_XML:
case NFTNL_OUTPUT_JSON:
nftnl_set_fprintf(monh->ctx->octx->output_fp, nls,
monh->format, netlink_msg2nftnl_of(type));
@@ -2252,7 +2249,6 @@ static int netlink_events_setelem_cb(const struct nlmsghdr *nlh, int type,
set_free(dummyset);
break;
- case NFTNL_OUTPUT_XML:
case NFTNL_OUTPUT_JSON:
nftnl_set_fprintf(monh->ctx->octx->output_fp, nls,
monh->format, netlink_msg2nftnl_of(type));
@@ -2297,7 +2293,6 @@ static int netlink_events_obj_cb(const struct nlmsghdr *nlh, int type,
break;
}
break;
- case NFTNL_OUTPUT_XML:
case NFTNL_OUTPUT_JSON:
nftnl_obj_fprintf(monh->ctx->octx->output_fp, nlo,
monh->format, netlink_msg2nftnl_of(type));
@@ -2353,7 +2348,6 @@ static int netlink_events_rule_cb(const struct nlmsghdr *nlh, int type,
break;
}
break;
- case NFTNL_OUTPUT_XML:
case NFTNL_OUTPUT_JSON:
nftnl_rule_fprintf(monh->ctx->octx->output_fp, nlr,
monh->format, netlink_msg2nftnl_of(type));
--
1.8.3.1