network: prevent adding endpoint routes for addresses on the network
authorFelix Fietkau <nbd@nbd.name>
Fri, 17 Feb 2023 11:32:52 +0000 (12:32 +0100)
committerFelix Fietkau <nbd@nbd.name>
Fri, 17 Feb 2023 12:47:11 +0000 (13:47 +0100)
commit412d03012f13ca1de7b16e2b73960df4cbb6279f
treedcd011a6bab7b5f0910024654774acf5f1627070
parent6c888f897862b152e2cfae735faafc9cdcb07336
network: prevent adding endpoint routes for addresses on the network

Sometimes a peer might be reachable only over another peer. In that case
PEX could announce an endpoint address already covered by the network routes.
When connecting, asking netifd to route that address breaks access, since
it's only reachable over unet.
Detect this case and skip the netifd host route request.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
host.c
network.c
network.h