summaryrefslogtreecommitdiffstats
path: root/src/rule.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2018-10-29 12:11:09 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2018-10-29 15:07:35 +0100
commit48636e1fe6f6d3141de735f9faf4c359938b837c (patch)
tree261623cb4aa26de34f1432fd2b6964f9a57ae789 /src/rule.c
parent7a6f12d75034fed940ce635e76a13123430f088e (diff)
src: add nft_ctx_output_{get,set}_echo() to nft_ctx_output_{get,set}_flags
Add NFT_CTX_OUTPUT_ECHO flag and echo the command that has been send to the kernel. Acked-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/rule.c')
-rw-r--r--src/rule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rule.c b/src/rule.c
index 86b68cb8..33cbf0e2 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -1388,7 +1388,7 @@ static int do_command_add(struct netlink_ctx *ctx, struct cmd *cmd, bool excl)
{
uint32_t flags = excl ? NLM_F_EXCL : 0;
- if (ctx->nft->output.echo) {
+ if (nft_output_echo(&ctx->nft->output)) {
int ret;
ret = cache_update(ctx->nft, cmd->obj, ctx->msgs);
@@ -1439,7 +1439,7 @@ static int do_command_insert(struct netlink_ctx *ctx, struct cmd *cmd)
{
uint32_t flags = 0;
- if (ctx->nft->output.echo) {
+ if (nft_output_echo(&ctx->nft->output)) {
int ret;
ret = cache_update(ctx->nft, cmd->obj, ctx->msgs);