contrib/meshwizard: Add radvd config for interfaces, fix firewall rules for dhcpv6
This commit is contained in:
parent
27b7784cdd
commit
1b15e8f42c
3 changed files with 38 additions and 5 deletions
|
@ -101,11 +101,11 @@ done
|
||||||
# If we use auto-ipv6-dhcp then allow 547/udp on the freifunk zone
|
# If we use auto-ipv6-dhcp then allow 547/udp on the freifunk zone
|
||||||
if [ "$profile_ipv6_config" = "auto-ipv6-dhcpv6" ]; then
|
if [ "$profile_ipv6_config" = "auto-ipv6-dhcpv6" ]; then
|
||||||
uci batch <<- EOF
|
uci batch <<- EOF
|
||||||
firewall.dhcpv6=rule
|
set firewall.dhcpv6=rule
|
||||||
firewall.dhcpv6.src=freifunk
|
set firewall.dhcpv6.src=freifunk
|
||||||
firewall.dhcpv6.target=ACCEPT
|
set firewall.dhcpv6.target=ACCEPT
|
||||||
firewall.dhcpv6.dest_port=547
|
set firewall.dhcpv6.dest_port=547
|
||||||
firewall.dhcpv6.proto=udp
|
set firewall.dhcpv6.proto=udp
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -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
|
|
@ -100,8 +100,14 @@ for net in $networks; do
|
||||||
|
|
||||||
$dir/helpers/setup_splash.sh $net
|
$dir/helpers/setup_splash.sh $net
|
||||||
$dir/helpers/setup_firewall_interface.sh $net
|
$dir/helpers/setup_firewall_interface.sh $net
|
||||||
|
|
||||||
|
if [ "$profile_ipv6" == 1 ]; then
|
||||||
|
$dir/helpers/setup_radvd_interface.sh $net
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
##### Reboot the router (because simply restarting services gave errors)
|
##### Reboot the router (because simply restarting services gave errors)
|
||||||
|
|
||||||
|
echo "+ The wizard has finished and the router will reboot now."
|
||||||
|
|
||||||
reboot
|
reboot
|
||||||
|
|
Loading…
Reference in a new issue