openwrt route_allowed_ips is inprecise

Jason A. Donenfeld Jason at
Mon Dec 19 14:09:33 CET 2016

On Mon, Dec 19, 2016 at 2:06 PM, Baptiste Jonglez
<baptiste at> wrote:
> Please provide numbers.  I would be very surprised if a few redundant
> routes have any performance impact, given that the kernel can handle 600k
> routes without major issues.

I'm thinking about the case in which a server has a 10/8 of clients,
each of which gets a /32. In this case quite a few routes wind up in
the table...

Fortunately the change is pretty easy. Instead of running
`proto_add_ipv4_route ...` you run:

[[ $(ip route get "$i") != *dev\ $INTERFACE\ * ]] && proto_add_ipv4_route ...

More information about the WireGuard mailing list