diff options
author | Daniel Becker <razzfazz@gmail.com> | 2014-05-06 17:27:36 -0700 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-05-09 14:56:46 -0300 |
commit | 81acbdd7a3ef6ffae724a73f745c9a523294b8fc (patch) | |
tree | 66b8bd027a768aab3bfee9fb56438d5f422dad57 /usr/local/pkg/miniupnpd.inc | |
parent | 9abaa8f7d572f4f253122f42834cc9dec36d7283 (diff) | |
download | pfsense-81acbdd7a3ef6ffae724a73f745c9a523294b8fc.zip pfsense-81acbdd7a3ef6ffae724a73f745c9a523294b8fc.tar.gz |
make listening on interface rather than IP optional for miniupnp
Diffstat (limited to 'usr/local/pkg/miniupnpd.inc')
-rw-r--r-- | usr/local/pkg/miniupnpd.inc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr/local/pkg/miniupnpd.inc b/usr/local/pkg/miniupnpd.inc index e50a18d..31067d0 100644 --- a/usr/local/pkg/miniupnpd.inc +++ b/usr/local/pkg/miniupnpd.inc @@ -156,9 +156,13 @@ /* above function returns iface if fail */ if($if!=$iface) { $addr = find_interface_ip($if); + $bits = find_interface_subnet($if); /* check that the interface has an ip address before adding parameters */ if (is_ipaddr($addr)) { - $config_text .= "listening_ip={$if}\n"; + if ($upnp_config['listen_on_iface']) + $config_text .= "listening_ip={$if}\n"; + else + $config_text .= "listening_ip={$addr}/{$bits}\n"; if(!$ifaces_active) { $webgui_ip = $addr; $ifaces_active = $iface; |