From d3635faeede349135c2a2d2cbb5f38d1ae8ba791 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Tue, 26 Jan 2016 16:59:04 +0100 Subject: [PATCH] add upnp_nat_postrouting_chain .conf option fixes #190 MINIUPNPD-PCP-PEER has also been renamed to MINIUPNPD-POSTROUTING ( 1ba4362910a071919682fd78a88a9530c27548eb ) --- miniupnpd/miniupnpd.c | 3 +++ miniupnpd/miniupnpd.conf | 1 + miniupnpd/options.c | 1 + miniupnpd/options.h | 1 + 4 files changed, 6 insertions(+) diff --git a/miniupnpd/miniupnpd.c b/miniupnpd/miniupnpd.c index 28fc67c..939bba1 100644 --- a/miniupnpd/miniupnpd.c +++ b/miniupnpd/miniupnpd.c @@ -1193,6 +1193,9 @@ init(int argc, char * * argv, struct runtime_vars * v) case UPNPNATCHAIN: miniupnpd_nat_chain = ary_options[i].value; break; + case UPNPNATPOSTCHAIN: + miniupnpd_nat_postrouting_chain = ary_options[i].value; + break; #endif /* USE_NETFILTER */ case UPNPNOTIFY_INTERVAL: v->notify_interval = atoi(ary_options[i].value); diff --git a/miniupnpd/miniupnpd.conf b/miniupnpd/miniupnpd.conf index 75e911f..338b33d 100644 --- a/miniupnpd/miniupnpd.conf +++ b/miniupnpd/miniupnpd.conf @@ -47,6 +47,7 @@ # default is MINIUPNPD for both #upnp_forward_chain=forwardUPnP #upnp_nat_chain=UPnP +#upnp_nat_postrouting_chain=UPnP-Postrouting # Lease file location #lease_file=/var/log/upnp.leases diff --git a/miniupnpd/options.c b/miniupnpd/options.c index 1234f2d..bdeb244 100644 --- a/miniupnpd/options.c +++ b/miniupnpd/options.c @@ -61,6 +61,7 @@ static const struct { #ifdef USE_NETFILTER { UPNPFORWARDCHAIN, "upnp_forward_chain"}, { UPNPNATCHAIN, "upnp_nat_chain"}, + { UPNPNATPOSTCHAIN, "upnp_nat_postrouting_chain"}, #endif #ifdef ENABLE_NATPMP { UPNPENABLENATPMP, "enable_natpmp"}, diff --git a/miniupnpd/options.h b/miniupnpd/options.h index 5c57713..ae5b884 100644 --- a/miniupnpd/options.h +++ b/miniupnpd/options.h @@ -51,6 +51,7 @@ enum upnpconfigoptions { #ifdef USE_NETFILTER UPNPFORWARDCHAIN, UPNPNATCHAIN, + UPNPNATPOSTCHAIN, #endif #ifdef USE_PF UPNPANCHOR, /* anchor */