From 0d8e98dbfd6458ac718e872845ad416f17da9987 Mon Sep 17 00:00:00 2001 From: Daniel Dickinson Date: Thu, 17 Mar 2011 19:06:27 +0000 Subject: [PATCH] IP Addresses and Names: Fixed using single IP addresses instead of always required n.n.n.n/n even for single IP's. SVN-Revision: 26206 --- net/miniupnpd/files/miniupnpd.init | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/miniupnpd/files/miniupnpd.init b/net/miniupnpd/files/miniupnpd.init index b4eb16767..1cf3fc15e 100644 --- a/net/miniupnpd/files/miniupnpd.init +++ b/net/miniupnpd/files/miniupnpd.init @@ -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 } -- 2.30.2