diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libnftables.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libnftables.c b/src/libnftables.c index 9b2f65ae..6e271209 100644 --- a/src/libnftables.c +++ b/src/libnftables.c @@ -313,6 +313,9 @@ int nft_run_cmd_from_filename(struct nft_ctx *nft, const char *filename) if (rc < 0) return -1; + if (!strcmp(filename, "-")) + filename = "/dev/stdin"; + parser_init(nft->nf_sock, &nft->cache, &state, &msgs, nft->debug_mask, &nft->output); scanner = scanner_init(&state); |