Fixes: #1359
Signed-off-by: Jonatan Schlag jonatan.schlag@ipfire.org --- src/hooks/zones/6to4-tunnel | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/src/hooks/zones/6to4-tunnel b/src/hooks/zones/6to4-tunnel index 2a200e0..f550741 100644 --- a/src/hooks/zones/6to4-tunnel +++ b/src/hooks/zones/6to4-tunnel @@ -48,6 +48,8 @@ hook_check_settings() { assert isset SERVER_ADDRESS assert isset LOCAL_ADDRESS assert isset LOCAL_ADDRESS6 + # LOCAL_ADDRESS6 needs to have a prefix + assert ipv6_net_is_valid LOCAL_ADDRESS6
if enabled AUTO_UPDATE_ENDPOINT; then assert isset TUNNEL_ID
The static routes can only be applied when the network has a valid layer 3 connectivity. So it is not useful to have a route_init which is called before we have any layer 3 connectivity. We now call the route_apply every time we set new routes for a zone. We do this every time we get a new layer 3 connectivity so all routes are applied correctly.
Signed-off-by: Jonatan Schlag jonatan.schlag@ipfire.org --- src/functions/functions.route | 7 ------- src/functions/functions.routing | 3 +++ 2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/functions/functions.route b/src/functions/functions.route index 026656c..72f8c51 100644 --- a/src/functions/functions.route +++ b/src/functions/functions.route @@ -22,13 +22,6 @@ # Functions for static routing. #
-route_init() { - # Apply configured static routes. - route_apply -} - -init_register route_init - route_add() { local ${NETWORK_CONFIG_ROUTES_PARAMS}
diff --git a/src/functions/functions.routing b/src/functions/functions.routing index c7aac09..2436585 100644 --- a/src/functions/functions.routing +++ b/src/functions/functions.routing @@ -181,4 +181,7 @@ routing_update() { cmd ${routing_cmd}
cmd ${ip_cmd} rule add from ${local_ip_address} lookup ${table} + + # Apply all static routes + route_apply }