summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/erec.c2
-rw-r--r--src/netlink.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/erec.c b/src/erec.c
index f62bc78c..174d1aeb 100644
--- a/src/erec.c
+++ b/src/erec.c
@@ -153,7 +153,7 @@ void erec_print(FILE *f, const struct error_record *erec,
fprintf(f, "%s\n", erec->msg);
for (l = 0; l < (int)erec->num_locations; l++) {
loc = &erec->locations[l];
- netlink_dump_expr(loc->nle, debug_mask);
+ netlink_dump_expr(loc->nle, f, debug_mask);
}
fprintf(f, "\n");
} else {
diff --git a/src/netlink.c b/src/netlink.c
index e414718b..3183a810 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -515,7 +515,8 @@ void netlink_dump_rule(const struct nftnl_rule *nlr, unsigned int debug_mask)
fprintf(stdout, "%s\n", buf);
}
-void netlink_dump_expr(const struct nftnl_expr *nle, unsigned int debug_mask)
+void netlink_dump_expr(const struct nftnl_expr *nle,
+ FILE *fp, unsigned int debug_mask)
{
char buf[4096];
@@ -523,7 +524,7 @@ void netlink_dump_expr(const struct nftnl_expr *nle, unsigned int debug_mask)
return;
nftnl_expr_snprintf(buf, sizeof(buf), nle, 0, 0);
- fprintf(stdout, "%s\n", buf);
+ fprintf(fp, "%s\n", buf);
}
static int list_rule_cb(struct nftnl_rule *nlr, void *arg)