The last few days I have had some odd problems with OpenWRT (18.06.02), the latest is that if the WAN connection goes down the route for the OpenVPN client I am running to the distant OpenVPN server gets deleted from the routing table and is not restored when WAN comes back up, resulting in OpenVPN spitting out:
daemon.notice openvpn(custom_config): Recursive routing detected, drop tun packet to [AF_INET](ip address of the server)
Based on OpenVPN's logs it kind of restarts itself (stating that it is using the same "TLS context") when this happens and then pausing before restarting again (but never removing or re-adding the routes) when it sees it still has a problem.
Manually restarting OpenVPN fixes the issue.
Does anyone know what is going on?
EDIT: I tried adding some static routes but OpenWRT deletes them when the WAN interface has to restart due to loss of PPPoE session, which points to it not being a problem with OpenVPN at all, but with OpenWRT not applying iptable rules when an interface restarts.