Commit d67fce35 authored by chrissi^'s avatar chrissi^
Browse files

noderoute: stop gluon-uradvd before reconfiguring network

It seems OpenWRT has a problem when reconfiguring the network with
``/etc/init.d/network reload``:

Sometimes when switching from online/server mode (with gluon-uradvd running) to
offline/mesh mode (with gluon-uradvd stopped) it seems gluon-uradvd
is stopped after IPv6 has been configured to accept RAs.
This leads to the router having an IPv6 address inside it's own segment.
When the router is reconfigured to online mode (while it has an IPv6
address in it's own segment) it ends up without a IPv6 route into it's
own segment (on br-client).
(It's not clear if the kernel does not accept the new route or if the
route is removed by ``/etc/init.d/network`` (or even something else
happens...).)

In this mode the router is not able to forward and IPv6 traffic to the
clients in it's segent.

With this change we make sure that gluon-uradvd is stopped before we
reconfigure networking. If needed ``/etc/init.d/network`` will start
gluon-uradvd.
parent 6c55f19d
......@@ -177,6 +177,10 @@ function apply_network(conf, target_state)
uci_commit('network')
uci_commit('batman-adv')
util.log("Reconfiguring network...")
util.log("HACK: stoppping gluon-radvd")
os.execute("/etc/init.d/gluon-radvd stop")
util.sleep(1)
util.log("HACK: continuing with network reload")
os.execute("/etc/init.d/network reload")
util.log("Network reload finished. Wait another 60s for the config to settle...")
util.sleep(60)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment