Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upwireguard-tools: Add netifd protocol helper #3514
Conversation
danrl
referenced this pull request
Nov 15, 2016
Merged
luci-proto-wireguard: WireGuard VPN Protocol (New) #852
This comment has been minimized.
This comment has been minimized.
p4yne
commented
Nov 15, 2016
This comment has been minimized.
This comment has been minimized.
zorun
commented
Nov 15, 2016
|
Looks good to me! |
stintel
merged commit 13f9c9d
into
openwrt:master
Nov 15, 2016
This comment has been minimized.
This comment has been minimized.
|
Merged, thanks! |
This comment has been minimized.
This comment has been minimized.
|
Thank you very much! |
danrl
deleted the
danrl:proto-wg
branch
Nov 15, 2016
This comment has been minimized.
This comment has been minimized.
|
Can you make proto_add_host_dependency work again? What issue were you facing with v6? It works quite well with v4. |
This comment has been minimized.
This comment has been minimized.
I'd love to, but it doesn't work reliably. I asked at the openwrt and lede mailing lists for advice. No response so far. |
This comment has been minimized.
This comment has been minimized.
|
What goes wrong specifically? |
This comment has been minimized.
This comment has been minimized.
What happened in my tests is, that the interface did not came up, because the |
This comment has been minimized.
This comment has been minimized.
|
So it seems like the solution, then, is for resolveip to use getaddrinfo's AI_ADDRCONFIG flag, so that it only returns v4 IPs if there's an interface with a v4 address and v6 IPs if there's an interface with a v6 address. |
This comment has been minimized.
This comment has been minimized.
|
Maybe better to s/if there is an interface with/if there is a default route for $ip_version/, but yes, that's the basic idea. I wish proto_add_host_dependency would just accept hostnames and do the resolving. Would remove clutter from many scripts, not only wireguard.sh |
This comment has been minimized.
This comment has been minimized.
|
Well here, instead of having to patch resolveip, there's actually a more robust way of doing this: |
This comment has been minimized.
This comment has been minimized.
|
I don't think it is a good idea for protocol helper scripts to implement features that are available via netifd. I will run another test when the code hits the snapshots. Was away from my lab the whole week, so testing capabilites were limited. |
This comment has been minimized.
This comment has been minimized.
That's fair. I guess if you're not getting any responses on the mailing list about the issue, you could just submit a patch for netifd that fixes it in the way you see being most straightforward. At least on LKML, I've found this to be an effective strategy. Either I did it correctly, and people are happy and merge it, or it's wrong, in which case people start chiming in with a view of how they'd like to see things. |
danrl commentedNov 15, 2016
Maintainer: @zorun
Run tested: x86, latest snapshot
Description: Adds netifd protocol helper for WireGuard, which is used by luci-proto-wireguard.
Signed-off-by: Dan Luedtke mail@danrl.com