From 992565201ba572b72ea34e8d70fef6384445b32d Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Tue, 29 Sep 2020 01:00:10 +0200 Subject: [PATCH] fix testnftnlrdr.c --- miniupnpd/netfilter_nft/testnftnlrdr.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/miniupnpd/netfilter_nft/testnftnlrdr.c b/miniupnpd/netfilter_nft/testnftnlrdr.c index a39247c..5de251e 100644 --- a/miniupnpd/netfilter_nft/testnftnlrdr.c +++ b/miniupnpd/netfilter_nft/testnftnlrdr.c @@ -50,6 +50,10 @@ main(int argc, char ** argv) return -1; } openlog("testnftnlrdr", LOG_PERROR|LOG_CONS, LOG_LOCAL0); + if (init_redirect() < 0) { + fprintf(stderr, "init_redirect() FAILED\n"); + return -1; + } eport = (unsigned short)atoi(argv[1]); iaddr = argv[2]; iport = (unsigned short)atoi(argv[3]); @@ -94,5 +98,6 @@ main(int argc, char ** argv) print_redirect_rules(argv[1]); printf("deleting\n"); delete_redirect_and_filter_rules(eport, IPPROTO_TCP); + shutdown_redirect(); return 0; }