I run openwrt 23.05.4 on a netgear R7450. I connect to wan via [OpenWrt Wiki] Connect to client Wi-Fi network. I also run openvpn(Mullvad) per OpenWrt routers and Mullvad VPN. Everything works as expected except for one issue which seems like a bug. I am trying to script the processes of connecting via wifi, connecting to the VPN, and bypassing or disabling the VPN. I have accomplished the first two but there seems to be a bug affecting my ability to disable the VPN. After configuring the wifi client, I back up my configuration via LuCI's generate archive function. I then configure the VPN and back up my configuration again. When I restore the first backup, I cannot regain WAN connectivity, even after rebooting, until I go to LuCI, OpenVPN, and disable and stop the VPN Instance.
/etc/config/openvpn
uci del openvpn.mullvad_client.enabled
It seems that maybe OpenWrt is hanging on to a setting or something and that connectivity should be restored regardless of the openvpn client status, after all, I can start it before configuring the interface and firewall and it does not interrupt connectivity.