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 | |
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')
-rw-r--r-- | usr/local/pkg/miniupnpd.inc | 6 | ||||
-rw-r--r-- | usr/local/pkg/miniupnpd.xml | 7 |
2 files changed, 11 insertions, 2 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; diff --git a/usr/local/pkg/miniupnpd.xml b/usr/local/pkg/miniupnpd.xml index 9aa0239..d829210 100644 --- a/usr/local/pkg/miniupnpd.xml +++ b/usr/local/pkg/miniupnpd.xml @@ -35,7 +35,7 @@ <field> <name>UPnP & NAT-PMP Settings</name> <type>listtopic</type> - <enablefields>enable_upnp,enable_natpmp,iface_array,overridewanip,upnpqueue,logpackets,sysuptime,permdefault,permuser1,permuser2,permuser3,permuser4</enablefields> + <enablefields>enable_upnp,enable_natpmp,listen_on_iface,iface_array,overridewanip,upnpqueue,logpackets,sysuptime,permdefault,permuser1,permuser2,permuser3,permuser4</enablefields> </field> <field> <fielddescr>Enable UPnP & NAT-PMP</fielddescr> @@ -81,6 +81,11 @@ <required/> </field> <field> + <fielddescr>Listen on interface instead of interface's IPv4 address</fielddescr> + <fieldname>listen_on_iface</fieldname> + <type>checkbox</type> + </field> + <field> <fielddescr>Maximum Download Speed (Kbits/second)</fielddescr> <fieldname>download</fieldname> <type>input</type> |