From 390893513a988df8e65ea3cde51524ab9b2806c8 Mon Sep 17 00:00:00 2001 From: "Arnaud G. GIBERT" Date: Sun, 10 Aug 2025 00:08:45 +0200 Subject: [PATCH] - Add network_route_other_init() function to fix missing other routes. --- usr/local/lib/network.bash | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/usr/local/lib/network.bash b/usr/local/lib/network.bash index 6bfc6b7..6cf7f7b 100644 --- a/usr/local/lib/network.bash +++ b/usr/local/lib/network.bash @@ -698,7 +698,7 @@ network_tab_dump() #-------------------------------------------------------------------------------------------------------------------------- -# network_route_init +# network_route_dst_init #-------------------------------------------------------------------------------------------------------------------------- network_route_dst_init() @@ -750,6 +750,35 @@ network_route_dst_init() +#-------------------------------------------------------------------------------------------------------------------------- +# network_route_other_init +#-------------------------------------------------------------------------------------------------------------------------- + +network_route_other_init() +{ + local dst_id="$1" + + + network_dst_tab_get ${dst_id} + + log_trace "Network" "Add other routes in Rx3 VPN table: [${dst_table}]" + + for ip_route_id in ${NETWORK_IP_ROUTE_ID_LIST} + do + network_ip_route_tab_get ${ip_route_id} + network_dst_tab_dev_lookup ${ip_route_device} + + if [[ "${dst_id}" == "" ]] + then + ${DEBUG} ip route add ${ip_route_ip}/${ip_route_mask} table ${dst_table} dev ${ip_route_device} + fi + done +} + + + + + #-------------------------------------------------------------------------------------------------------------------------- # network_route_init #-------------------------------------------------------------------------------------------------------------------------- @@ -758,7 +787,8 @@ network_route_init() { for dst_id in ${NETWORK_DST_ID_LIST} do - network_route_dst_init ${dst_id} + network_route_dst_init ${dst_id} + network_route_other_init ${dst_id} done }