diff options
author | Manuel Munz <freifunk@somakoma.de> | 2011-09-22 13:14:22 +0000 |
---|---|---|
committer | Manuel Munz <freifunk@somakoma.de> | 2011-09-22 13:14:22 +0000 |
commit | c35bdaf847adcc309077a657d081e7343e3c1912 (patch) | |
tree | e6fc886debd49f452adebfe3afb1d43be082e35f /contrib/package/freifunk-policyrouting | |
parent | 9ffd17e9208ef7350a9fb5723f5517ffba4cdcad (diff) |
contrib/freifunk-policyrouting: Fix getting the name of interfaces
Diffstat (limited to 'contrib/package/freifunk-policyrouting')
-rw-r--r-- | contrib/package/freifunk-policyrouting/files/etc/hotplug.d/firewall/24-policyrouting | 6 |
1 files changed, 5 insertions, 1 deletions
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 |