diff options
| author | Felix Fietkau | 2026-02-13 17:16:28 +0000 |
|---|---|---|
| committer | Felix Fietkau | 2026-02-15 12:45:06 +0000 |
| commit | 52e504192ea746632e99abd75f07438c0237ff1a (patch) | |
| tree | fa46bc5c3c4ae830302e2a1b90399fb0cc244480 | |
| parent | 35c182b74fa4f9002fba6f8b1808b29e3106bdcb (diff) | |
| download | unetd-master.tar.gz | |
When the local node is a gateway for a peer, network_host_uses_peer_route()
incorrectly added all other hosts' IPs to that peer's allowed IPs. This
caused WireGuard to steal IP assignments from other peers, leaving them
with no allowed IPs and breaking routing.
The faulty condition checked if the peer uses the local host as its gateway
and if so, routed all other hosts through that peer. This is wrong: a peer
using us as a gateway should only have its own IPs in its allowed IPs, not
every other host's.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
| -rw-r--r-- | host.h | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -109,10 +109,6 @@ network_host_uses_peer_route(struct network_host *host, struct network *net, !strcmp(net->net_config.local_host->gateway, network_peer_name(peer))) return true; - if (peer_host->gateway && - !strcmp(peer_host->gateway, network_host_name(net->net_config.local_host))) - return true; - if (!host->gateway) return false; |