mirror of
https://github.com/openwrt/packages.git
synced 2026-12-01 00:55:33 +04:00
The host dependency for the server endpoint was guarded by route_net_gateway (IPv4) and net_gateway_ipv6 (IPv6). Neither is a reliable signal: - OpenVPN only exports route_net_gateway when it builds a route list, i.e. when route, redirect-gateway/redirect-private or pushed routes are present. A client using route-nopull, or one that filters out the pushed redirect-gateway, gets no host route at all. When another VPN then holds the default route, the server endpoint is routed through that VPN and the tunnel breaks. - OpenVPN looks up net_gateway_ipv6 for the default destination without a source address, which fails when source routing is enabled on wan6 (the default), so the IPv6 host route was rarely added. netifd resolves the gateway for a host dependency itself, so the guards are not needed. Add the host dependency whenever trusted_ip or trusted_ip6 is set, unless nohostroute is set, as WireGuard does. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Erik Conijn <egc112@msn.com>