From: Manuel Munz Date: Thu, 22 Sep 2011 13:56:02 +0000 (+0000) Subject: luci-0.10: Merge r7521 X-Git-Tag: 0.10.0~70 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f3b64b4eda6b93208ff2f3e0224d4170b8310590;p=oweals%2Fluci.git luci-0.10: Merge r7521 --- diff --git a/contrib/package/freifunk-policyrouting/files/etc/hotplug.d/firewall/24-policyrouting b/contrib/package/freifunk-policyrouting/files/etc/hotplug.d/firewall/24-policyrouting index 3e6f8155c..014803a7d 100644 --- a/contrib/package/freifunk-policyrouting/files/etc/hotplug.d/firewall/24-policyrouting +++ b/contrib/package/freifunk-policyrouting/files/etc/hotplug.d/firewall/24-policyrouting @@ -46,7 +46,11 @@ if [ "$ACTION" = "add" ] && [ "$INTERFACE" = "wan" ]; then if [ "`uci -q get network.$int.type`" == "bridge" ]; then dev="br-$int" else - dev=`uci get network.$int.ifname` + if [ -n "`uci -p /var/state get network.$int.ifname`" ]; then + dev=`uci -p /var/state get network.$int.ifname` + else + dev=`uci -p /var/state get network.$int.device` + fi fi logger -t policyrouting "Add mark 1 to packages coming in via interface $dev" iptables -t mangle -I prerouting_policy -i $dev -j MARK --set-mark 1