( proto_add_host_dependency "$cfg" "::" "$tunlink" )
+ # fixme: handle RA/DHCPv6 address race for LW
+ [ "$type" = lw4o6 ] && sleep 5
+
if [ -z "$rule" ]; then
rule="type=$type,ipv6prefix=$ip6prefix,prefix6len=$ip6prefixlen,ipv4prefix=$ipaddr,prefix4len=$ip4prefixlen"
[ -n "$psid" ] && rule="$rule,psid=$psid"
if [ "$type" = "lw4o6" -o "$type" = "map-e" ]; then
json_init
- json_add_string name "${cfg}_local"
+ json_add_string name "${cfg}_"
json_add_string ifname "@$(eval "echo \$RULE_${k}_PD6IFACE")"
json_add_string proto "static"
json_add_array ip6addr
proto_map_teardown() {
local cfg="$1"
- ifdown "${cfg}_local"
+ ifdown "${cfg}_"
rm -f /tmp/map-$cfg.rules
}