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