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

Use WG kernel module implementation if available #156

Merged
merged 1 commit into from
Apr 8, 2022

Conversation

DasSkelett
Copy link
Member

This bumps wg-embed to v0.7.0 to pull in freifunkMUC/wg-embed#9

See the linked pull request for more details.
To repeat the important things:

  • We try to use the kernel module, if something throws an error while creating the interface we log it and automatically fall back to the embedded userspace/Go implementation.
  • netlink will try to load the kernel module automatically, it only requires CAP_NET_ADMIN (already required for interface management), no CAP_SYS_MODULE or mount of /lib/modules into a Docker container.
    However 1-docker.md still says to load it on the host if possible, as this will be stabler and more future-proof.

You can check the running implementation either by checking for the falling back to embedded Go implementation log line, or running ip -details link show (inside the container). If created through the kernel module the link will show wireguard as first word in the third line, otherwise tun.

Bumps wg-embed to v0.7.0 to use the WireGuard kernel module whenever possible
@DasSkelett DasSkelett added enhancement New feature or request go Pull requests that update Go code labels Apr 8, 2022
@DasSkelett DasSkelett requested a review from awlx April 8, 2022 17:53
@mergeable
Copy link

mergeable bot commented Apr 8, 2022

Thanks for creating a pull request! A maintainer will review your changes shortly. Please don't be discouraged if it takes a while.

@DasSkelett DasSkelett changed the title Support WG kernel module implementation if available Use WG kernel module implementation if available Apr 8, 2022
@DasSkelett DasSkelett merged commit 26a0940 into freifunkMUC:master Apr 8, 2022
@DasSkelett DasSkelett deleted the feature/kernel-module branch April 8, 2022 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants