fff-babeld: redistribute all peer_ip and peer_ip6 addresses #87

Closed
jkimmel wants to merge 2 commits from jkimmel/firmware:babel_peer_ip into master
2 changed files with 20 additions and 0 deletions
Showing only changes of commit 60051fb4a7 - Show all commits

View File

@ -22,6 +22,11 @@ config filter
option local 'true'
option ip 'fd43:5602:29bd::/48'
config filter
option type 'redistribute'
option local 'true'
option interface 'lo'
config filter
option type 'redistribute'
option local 'true'

View File

@ -90,6 +90,21 @@ configure() {
for prefix in $(uci -q get gateway.@client[0].ip6addr); do
babel_add_redistribute_filter "$prefix"
done
# clean up old peer ips
uci -q del network.loopback.ipaddr
uci -q del network.loopback.ip6addr
# remove netmask entry that ships by default
uci -q del network.loopback.netmask
# re-add loopback addresses
uci -q add_list network.loopback.ipaddr="127.0.0.1/8"
uci -q add_list network.loopback.ip6addr="::1/128"
# add peer ips to lo to be redistributed
peerip=$(uci -q get gateway.@gateway[0].peer_ip) && uci -q add_list network.loopback.ipaddr="${peerip}/32"
peerip6=$(uci -q get gateway.@gateway[0].peer_ip6) && uci -q add_list network.loopback.ip6addr="${peerip6}/128"
}
apply() {