Blob Blame History Raw
From 7a2546c151233aceb7cb8628b234e2a7d2d7620f Mon Sep 17 00:00:00 2001
From: Phil Sutter <phil@nwl.cc>
Date: Thu, 11 Oct 2018 17:48:57 +0200
Subject: [PATCH] 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>
(cherry picked from commit 2194a76ed46a2f097c5ca5955e44544418866cc2)
Signed-off-by: Phil Sutter <psutter@redhat.com>
---
 src/monitor.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/src/monitor.c b/src/monitor.c
index 4310c3b8dc434..d75410888e3d0 100644
--- a/src/monitor.c
+++ b/src/monitor.c
@@ -203,7 +203,6 @@ static int netlink_events_table_cb(const struct nlmsghdr *nlh, int type,
 				      nftnl_table_get_u64(nlt, NFTNL_TABLE_HANDLE));
 		nft_mon_print(monh, "\n");
 		break;
-	case NFTNL_OUTPUT_XML:
 	case NFTNL_OUTPUT_JSON:
 		nftnl_table_fprintf(monh->ctx->octx->output_fp, nlt,
 				    monh->format, netlink_msg2nftnl_of(type));
@@ -245,7 +244,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));
@@ -292,7 +290,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));
@@ -441,7 +438,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));
@@ -486,7 +482,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));
@@ -542,7 +537,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));
-- 
2.21.0