contrib/meshwizard: Enable connection tracking for the interfaces when masquerading is disabled because the dhcp subnet is inside the mesh subnet. this fixes the plash in this kind of setup.

This commit is contained in:
Manuel Munz 2013-01-29 23:34:01 +00:00
parent 13a7013acd
commit d9d70629c4

View file

@ -72,7 +72,12 @@ if [ -n "$dhcprange" ]; then
meshnet="$(uci get profile_$community.profile.mesh_network)"
# check if the dhcprange is inside meshnet
dhcpinmesh="$($dir/helpers/check-range-in-range.sh $dhcprange $meshnet)"
if [ ! "$dhcpinmesh" == 1 ]; then
if [ "$dhcpinmesh" == 1 ]; then
# needed or splash will not work
if [ "$has_luci_splash" == TRUE ]; then
uci set firewall.zone_freifunk.contrack="1"
fi
else
uci set firewall.zone_freifunk.masq=1
[ -z "$(echo $currms |grep ${netrenamed}dhcp)" ] && uci add_list firewall.zone_freifunk.masq_src="${netrenamed}dhcp"
fi