# If we use auto-ipv6-dhcp then allow 547/udp on the freifunk zone
if [ "$profile_ipv6_config" = "auto-ipv6-dhcpv6" ]; then
uci batch <<- EOF
- firewall.dhcpv6=rule
- firewall.dhcpv6.src=freifunk
- firewall.dhcpv6.target=ACCEPT
- firewall.dhcpv6.dest_port=547
- firewall.dhcpv6.proto=udp
+ set firewall.dhcpv6=rule
+ set firewall.dhcpv6.src=freifunk
+ set firewall.dhcpv6.target=ACCEPT
+ set firewall.dhcpv6.dest_port=547
+ set firewall.dhcpv6.proto=udp
EOF
fi
--- /dev/null
+#!/bin/sh
+# Sets up olsrd interfaces
+# arg $1 = net
+
+net=$1
+
+. /lib/functions.sh
+. $dir/functions.sh
+
+uci batch << EOF
+ set radvd.${net}_iface=interface
+ set radvd.${net}_iface.interface="${net}"
+ set radvd.${net}_iface.AdvSendAdvert=1
+ set radvd.${net}_iface.ignore=0
+ set radvd.${net}_prefix=prefix
+ set radvd.${net}_prefix.interface="$net"
+ set radvd.${net}_prefix.ignore=0
+EOF
+
+if [ "$profile_ipv6_config" = "auto-ipv6-dhcpv6" ]; then
+ uci batch <<- EOF
+ set radvd.${net}_iface.AdvManagedFlag=1
+ set radvd.${net}_prefix.AdvOnLink=0
+ EOF
+fi
+
+uci_commitverbose "Setup radvd for interface $net" radvd
$dir/helpers/setup_splash.sh $net
$dir/helpers/setup_firewall_interface.sh $net
+
+ if [ "$profile_ipv6" == 1 ]; then
+ $dir/helpers/setup_radvd_interface.sh $net
+ fi
done
##### Reboot the router (because simply restarting services gave errors)
+echo "+ The wizard has finished and the router will reboot now."
+
reboot