summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/rule.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/rule.c b/src/rule.c
index 1bb7b475..8f0e752f 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -1690,7 +1690,14 @@ static int do_command_monitor(struct netlink_ctx *ctx, struct cmd *cmd)
{
struct table *t;
struct set *s;
- struct netlink_mon_handler monhandler;
+ struct netlink_mon_handler monhandler = {
+ .monitor_flags = cmd->monitor->flags,
+ .format = cmd->monitor->format,
+ .ctx = ctx,
+ .loc = &cmd->location,
+ .cache = ctx->cache,
+ .debug_mask = ctx->debug_mask,
+ };
monhandler.cache_needed = need_cache(cmd);
if (monhandler.cache_needed) {
@@ -1725,12 +1732,6 @@ static int do_command_monitor(struct netlink_ctx *ctx, struct cmd *cmd)
}
}
- monhandler.monitor_flags = cmd->monitor->flags;
- monhandler.format = cmd->monitor->format;
- monhandler.ctx = ctx;
- monhandler.loc = &cmd->location;
- monhandler.cache = ctx->cache;
-
return netlink_monitor(&monhandler, ctx->nf_sock);
}