From d8368f76517c02f19960268052e1a79310e309e9 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Sun, 30 Jun 2019 21:50:55 +0200 Subject: [PATCH] test_nfct_get.c: openlog() --- miniupnpd/netfilter_nft/test_nfct_get.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/miniupnpd/netfilter_nft/test_nfct_get.c b/miniupnpd/netfilter_nft/test_nfct_get.c index af8c07d..860025a 100644 --- a/miniupnpd/netfilter_nft/test_nfct_get.c +++ b/miniupnpd/netfilter_nft/test_nfct_get.c @@ -1,3 +1,6 @@ +/* $Id: test_nfct_get.c,v 1.2 2019/06/30 19:49:18 nanard Exp $ */ +#include +#include #include "nfct_get.c" int main(int argc, char *argv[]) @@ -5,8 +8,12 @@ int main(int argc, char *argv[]) struct sockaddr_storage src, dst, ext; char buff[INET6_ADDRSTRLEN]; - if (argc!=5) - return 0; + if (argc!=5) { + fprintf(stderr, "Usage: %s SRC_IP SRC_PORT DST_IP DST_PORT\n", argv[0]); + return 1; + } + + openlog("test_nfct_get", LOG_PERROR|LOG_CONS, LOG_LOCAL0); if (1 != inet_pton(AF_INET, argv[1], &((struct sockaddr_in*)&src)->sin_addr)) {