diff options
author | Manuel Munz <freifunk@somakoma.de> | 2012-06-05 23:13:46 +0000 |
---|---|---|
committer | Manuel Munz <freifunk@somakoma.de> | 2012-06-05 23:13:46 +0000 |
commit | 1b15e8f42c52652441fc9d8abf75139ff97ed33f (patch) | |
tree | c032c1544abc86711abc162284a23a7af0adb4f9 /contrib/package | |
parent | 27b7784cddaf4d001375b267dfe4c3f739565b2c (diff) |
contrib/meshwizard: Add radvd config for interfaces, fix firewall rules for dhcpv6
Diffstat (limited to 'contrib/package')
3 files changed, 38 insertions, 5 deletions
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_firewall.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_firewall.sh index fb2232e99..33ff9a2bd 100755 --- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_firewall.sh +++ b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_firewall.sh @@ -101,11 +101,11 @@ done # 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 diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_radvd_interface.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_radvd_interface.sh new file mode 100755 index 000000000..2e13bb7e8 --- /dev/null +++ b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_radvd_interface.sh @@ -0,0 +1,27 @@ +#!/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 diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh index 4bdc2c88f..8c9088f07 100755 --- a/contrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh +++ b/contrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh @@ -100,8 +100,14 @@ for net in $networks; do $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 |