[th/wireguard-default-route-fixes]
Minor fix of WireGuard, when the user sets an explicit ipv4.gateway
.
Usually, setting an explicit "ipv4.gateway" is likely wrong anyway, and isn't going to work (unless special care is taken to avoid routing loops). By default, an explicit gateway goes together badly with wireguard.peer-routes=yes
, ipv4.ip4-auto-default-route
and a peer with AllowedIPs ::/0
/0.0.0.0/0
.
Still, while the setting is probably conflicting, don't suppress the automatism because that makes it harder to understand why there this wrong default route there (the one with the gateway).