# Remove too much spaces.
routes=$(echo ${routes})
+ # Reload bird configuration
+ [[ "${proto}" = "ipv6" ]] && bird_update
+
# Remove all default routes.
if [ -z "${routes}" ]; then
cmd ${cmd} del default
cmd ${cmd} replace default ${routes}
assert [ $? -eq 0 ]
- case "${proto}" in
- ipv6)
- # Apply radvd configuration.
- radvd_update
- ;;
- esac
-
triggers_execute_all "online"
done
}
case "${proto}" in
ipv4)
- local net_address=$(ipv4_get_netaddress ${local_ip_address})
+ local network=$(ipv4_get_network "${local_ip_address}")
log DEBUG "Adding route for subnet ${local_ip_address} to table ${table}"
- cmd ${ip_cmd} route add table ${table} ${net_address} dev ${zone}
+ cmd ${ip_cmd} route add table "${table}" "${network}" dev "${zone}"
;;
esac