I upgraded to 23.05 rc2 on my WRT1900ACS.
I noticed that I now get this error message (that I didn't have with OpenWRT 22.03)
openvpn(custom_config): Multiple --route-up scripts defined. The previously configured script is overridden.
package openvpn config openvpn custom_config option enable 1 option config /etc/openvpn/client.conf
and my /etc/openvpn/client.conf:
client dev tun proto udp4 remote my.server 1194 resolv-retry infinite nobind persist-key persist-tun ca /etc/openvpn/ca.crt cert /etc/openvpn/client.crt key /etc/openvpn/client.key remote-cert-tls server tls-auth /etc/openvpn/ta.key 1 verb 1 mute 4 route-up '/sbin/ip route add default via 10.8.0.1 dev tun0 table 10' user openvpn group openvpn
The problem is that my custom "route-up" is no longer executed.
It appears that the function openvpn_add_instance() in /etc/init.d/openvpn now contains some --route-up argument which overrides what is in my client.conf file.
Any idea how to fix this the clean OpenWRT way? I know I could probably edit /etc/init.d/openvpn, but I'd prefer a solution which would survive accross updates.
I only want that route to be added once the OpenVPN tunnel is up.