openwrt route_allowed_ips is inprecise

Jason A. Donenfeld Jason at zx2c4.com
Tue Dec 20 14:33:06 CET 2016


Hi Dan,

On Tue, Dec 20, 2016 at 11:15 AM, Dan Lüdtke <mail at danrl.com> wrote:
> New environment, build from latest sources this morning. Can't reproduce. I can't see duplicate routes. Static routes were added via LuCI to represent a typical user's approach.
>
> Can we drop this discussion until we can reproduce the problem?

That's a weird way of putting it, because you != we.

config wireguard_wg
       option public_key '0Nz4n2wdhDJtFbkdIFqlJ4vkKIGFgBVQPxyJ0XWE31o='
       list allowed_ips '10.200.100.1/32'
       option route_allowed_ips '1'
config interface 'wgnet'
       option proto 'static'
       option ifname 'wg'
       option ipaddr '10.200.100.4/24'
-->
root at mipsnet:~# ip r
10.200.100.0/24 dev wg  src 10.200.100.4
10.200.100.1 dev wg


We can drop the discussion, though, because Baptiste, the downstream
package maintainer, doesn't want to maintain that kind of logic and
evidently finds Linux's v4 LC-trie and v6 radix trie to be fast enough
for his purposes. I don't find the duplicated entries very desirable,
but I'm totally fine deferring to his judgement.

>> I am on it. First version did add dependency for both protocols if the endpoint name had A and AAAA records. However, I find it cleaner to check which endpoint wg chose to use and only add that IP address as an depedency. Patch/PR comes when I am satisfied with stability.

I think calling `wg show $if endpoints` like you do is the correct
solution. Good thinking. I'll put some comments on the PR.

Jason


More information about the WireGuard mailing list