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