[net] IP Addresses and Names: Fixed using single IP addresses instead of always requi...
authorDaniel Dickinson <crazycshore@gmail.com>
Thu, 17 Mar 2011 19:06:27 +0000 (19:06 +0000)
committerDaniel Dickinson <crazycshore@gmail.com>
Thu, 17 Mar 2011 19:06:27 +0000 (19:06 +0000)
SVN-Revision: 26206

net/miniupnpd/files/miniupnpd.init

index b4eb167672dcb13dd41c22dab11eaa2ca500dbbe..1cf3fc15ecd5010bd1e7fd4c7d7baa932ae1e911 100644 (file)
@@ -28,6 +28,11 @@ conf_rule_add() {
     upnpd_get_port_range "ext" "$cfg" ext_ports "0-65535" # external ports: x, x-y, x:y
     config_get int_addr "$cfg" int_addr "0.0.0.0/0"       # ip or network and subnet mask (internal)
     upnpd_get_port_range "int" "$cfg" int_ports "0-65535" # internal ports: x, x-y, x:y or range
+    # Make a single IP IP/32 so that miniupnpd.conf can use it.
+    case "$int_addr" in
+       */*) ;;
+       *) int_addr="$int_addr/32"  ;;
+    esac
     echo "${action} ${ext_start}${ext_end:+-}${ext_end} ${int_addr} ${int_start}${int_end:+-}${int_end}" >>$tmpconf   
 }