Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wireguard-tools: add netifd protocol helper #3512

Closed
wants to merge 2 commits into from
Closed

wireguard-tools: add netifd protocol helper #3512

wants to merge 2 commits into from

Conversation

danrl
Copy link
Contributor

@danrl danrl commented Nov 13, 2016

Maintainer: Baptiste Jonglez @zorun
Run tested: OpenWRT snapshot Nov 11 2016 x86

Description: Helper script for upcoming luci-proto-wireguard

Signed-off-by: Dan Lüdtke <mail@danrl.com>
Signed-off-by: Dan Lüdtke <mail@danrl.com>
@danrl
Copy link
Contributor Author

danrl commented Nov 13, 2016

FYI: LuCi pull request is over here: openwrt/luci#848

@zorun
Copy link

zorun commented Nov 13, 2016

Thanks for the pull request. I was actually testing your script this afternoon, but apparently a bit too late :) General comments are in https://github.com/danrl/luci-proto-wireguard/issues/5

Regarding the pull request, you can merge the two commits. Also, can you add +resolveip to the dependency list? Otherwise, the script fails to run because of the missing command. See other packages like xl2tpd.

# ensure endpoint reachability
if [ "${endpoint_host}" ]; then
added_dependency="false"
for ip in $(resolveip -t 5 "${endpoint_host}"); do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last I checked, resolveip requires a separate package. If this bit of logic is actually needed in the code, then probably the makefile should depend on having that package. I hit this snag twice when setting up my OpenWRT router a few days ago. The first time I just removed this block, and things worked fine. The second time I just installed resolveip, and things worked fine. Probably @zorun is the right man to make the call on what to do.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, yes, it is needed. Dependency is required for tunnels that add a default route. It is said to take care of creating a route to the endpoint(s) so they remain reachable in case of a new default route (if one endpoint has allowed_ips ::/0 and we create a route for ::/0 through the wg interface).

@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=wireguard

PKG_VERSION:=0.0.20161105
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might as well be bumped, while we're at it.

@danrl
Copy link
Contributor Author

danrl commented Nov 14, 2016

Will PR with updated version. This one is closed.

@danrl danrl closed this Nov 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants