[package] relayd: map "ipaddr" option to local ip (-L)
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 27 Apr 2011 19:16:35 +0000 (19:16 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 27 Apr 2011 19:16:35 +0000 (19:16 +0000)
SVN-Revision: 26773

package/relayd/files/relay.sh

index 3e5e84c..390900b 100644 (file)
@@ -48,6 +48,10 @@ setup_interface_relay() {
                resolve_ifname "$ifn"
        done
 
+       local ipaddr
+       config_get ipaddr "$cfg" ipaddr
+       [ -n "$ipaddr" ] && append args "-L $ipaddr"
+
        local gateway
        config_get gateway "$cfg" gateway
        [ -n "$gateway" ] && append args "-G $gateway"