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 3e5e84c870a635caab36bf271ed1e3d00f32c9e1..390900ba3badc1d2d00990a54e0f5984b4221f90 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"