[packages] miniupnpd: Add uci option for manually specified external IP
authorDaniel Dickinson <crazycshore@gmail.com>
Sun, 6 Mar 2011 18:56:54 +0000 (18:56 +0000)
committerDaniel Dickinson <crazycshore@gmail.com>
Sun, 6 Mar 2011 18:56:54 +0000 (18:56 +0000)
SVN-Revision: 25896

net/miniupnpd/files/miniupnpd.init

index 12cb550e217e0017c8d1b1ce2f024dd557ed89c5..12404bd48f5e695f857291e7f7338a0922d8b2a3 100644 (file)
@@ -7,9 +7,11 @@ start() {
 
        config_load "upnpd"
        local extiface intiface upload download logging secure enabled natpmp
+       local extip
 
        config_get extiface config external_iface
        config_get intiface config internal_iface
+       config_get extip config external_ip
        config_get upload   config upload
        config_get download config download
        config_get_bool logging config log_output 0
@@ -27,6 +29,9 @@ start() {
                local args="-i $ifname"
                local iface
 
+               [ -n "$extip" ] && \
+                       append args "-o $extip"
+               
                for iface in ${intiface:-lan}; do
                        local ipaddr
                        config_get ipaddr "$iface" ipaddr