fixes OLSR 6and4 mode does not work if HNA entries are configured, closes #4803
git-svn-id: svn://svn.openwrt.org/openwrt/packages@19868 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
09aa8fc3cb
commit
8895c4d9d2
@ -364,7 +364,7 @@ olsrd_write_hna4() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
[ "$HNA4_COUNT" -le 0 ] && echo -n "${N}Hna4${N}{"
|
[ "$HNA4_COUNT" -le 0 ] && echo -n "${N}Hna4${N}{"
|
||||||
echo -n "${N}${T}$netaddr $netmask"
|
echo -n "${N}${T}${T}$netaddr $netmask"
|
||||||
HNA4_COUNT=$((HNA4_COUNT + 1))
|
HNA4_COUNT=$((HNA4_COUNT + 1))
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
@ -391,7 +391,7 @@ olsrd_write_hna6() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
[ "$HNA6_COUNT" -le 0 ] && echo -n "${N}Hna6${N}{"
|
[ "$HNA6_COUNT" -le 0 ] && echo -n "${N}Hna6${N}{"
|
||||||
echo -n "${N}${T}$netaddr $prefix"
|
echo -n "${N}${T}${T}$netaddr $prefix"
|
||||||
HNA6_COUNT=$((HNA6_COUNT + 1))
|
HNA6_COUNT=$((HNA6_COUNT + 1))
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
@ -567,15 +567,15 @@ start() {
|
|||||||
if [ "$OLSRD_IPVERSION_6AND4" -ne 0 ]; then
|
if [ "$OLSRD_IPVERSION_6AND4" -ne 0 ]; then
|
||||||
bindv6only="$(sysctl -n net.ipv6.bindv6only)"
|
bindv6only="$(sysctl -n net.ipv6.bindv6only)"
|
||||||
sysctl -w net.ipv6.bindv6only=1
|
sysctl -w net.ipv6.bindv6only=1
|
||||||
fi
|
sed -e 's/^\t\t[0-9.]*[ ][0-9.]*$//' < "$OLSRD_CONFIG_FILE" > /var/etc/olsrd.conf.ipv6
|
||||||
|
olsrd -f /var/etc/olsrd.conf.ipv6 -nofork < /dev/null > /dev/null &
|
||||||
|
|
||||||
olsrd -f "$OLSRD_CONFIG_FILE" -nofork < /dev/null > /dev/null &
|
sed -e 's/^IpVersion[ ][ ]*6$/IpVersion 4/' -e 's/^\t\t[A-Fa-f0-9.:]*[:][A-Fa-f0-9.:]*[ ][0-9]*$//' < "$OLSRD_CONFIG_FILE" > /var/etc/olsrd.conf.ipv4
|
||||||
|
|
||||||
if [ "$OLSRD_IPVERSION_6AND4" -ne 0 ]; then
|
|
||||||
sed -e 's/^IpVersion[ ][ ]*6$/IpVersion 4/' < "$OLSRD_CONFIG_FILE" > /var/etc/olsrd.conf.ipv4
|
|
||||||
olsrd -f /var/etc/olsrd.conf.ipv4 -nofork < /dev/null > /dev/null &
|
olsrd -f /var/etc/olsrd.conf.ipv4 -nofork < /dev/null > /dev/null &
|
||||||
sleep 3
|
sleep 3
|
||||||
sysctl -w net.ipv6.bindv6only="$bindv6only"
|
sysctl -w net.ipv6.bindv6only="$bindv6only"
|
||||||
|
else
|
||||||
|
olsrd -f "$OLSRD_CONFIG_FILE" -nofork < /dev/null > /dev/null &
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user