cancel
Showing results for 
Search instead for 
Did you mean: 

getting error in installing wireguard interface

stack_shailesh
Associate III

HI There,

I am getting error installing wireguard in STM32mp135s. I have added wireguard-tool by adding in local.conf, its successfully builts. but when I add wireguard-module I get compilation error. So I skipped it wireguard-module. Some kernel setting also done for Wireguard by following this site https://www.wireguard.com/compilation/#kernel-requirements When I try create inteface I get following error. What is the solution for this, how can I add wireguard in my build?
Error-
wg-quick up wg0
[#] ip link add wg0 type wireguard
[ 129.799785] wireguard: Unknown symbol curve25519_null_point (err -2)
[ 129.799834] wireguard: Unknown symbol udp_sock_create4 (err -2)
[ 129.799858] wireguard: Unknown symbol udp_tunnel6_xmit_skb (err -2)
Error: Unknown device type.
[ 129.799894] wireguard: Unknown symbol chacha20poly1305_encrypt_sg_inplace (er r -2)
[ 129.799939] wireguard: Unknown symbol chacha20poly1305_encrypt (err -2)
[ 129.800041] wireguard: Unknown symbol chacha20poly1305_decrypt_sg_inplace (er r -2)
[ 129.800076] wireguard: Unknown symbol xchacha20poly1305_encrypt (err -2)
[ 129.800084] wireguard: Unknown symbol xchacha20poly1305_decrypt (err -2)
[ 129.800105] wireguard: Unknown symbol udp_tunnel_sock_release (err -2)
Unable to access interface: Protocol not supported
[#] ip [ 129.800131] wireguard: Unknown symbol setup_udp_tunnel_sock (err -2)
link delete dev wg0
[ 129.800140] wireguard: Unknown symbol udp_sock_create6 (err -2)
[ 129.800171] wireguard: Unknown symbol curve25519_arch (err -2)
[ 129.800195] wireguard: Unknown symbol chacha20poly1305_decrypt (err -2)
[ 129.800220] wireguard: Unknown symbol curve25519_base_arch (err -2)
[ 129.800236] wireguard: Unknown symbol udp_tunnel_xmit_skb (err -2)
[ 129.871716] wireguard: Unknown symbol curve25519_null_point (err -2)
[ 129.871764] wireguard: Unknown symbol udp_sock_create4 (err -2)
Cannot find device "wg0"
root@stm32[ 129.871789] wireguard: Unknown symbol udp_tunnel6_xmit_skb (err -2)
[ 129.871826] wireguard: Unknown symbol chacha20poly1305_encrypt_sg_inplace (er r -2)
[ 129.871871] wireguard: Unknown symbol chacha20poly1305_encrypt (err -2)
[ 129.871972] wireguard: Unknown symbol chacha20poly1305_decrypt_sg_inplace (er r -2)
[ 129.872006] wireguard: Unknown symbol xchacha20poly1305_encrypt (err -2)
[ 129.872014] wireguard: Unknown symbol xchacha20poly1305_decrypt (err -2)
[ 129.872035] wireguard: Unknown symbol udp_tunnel_sock_release (err -2)
[ 129.872060] wireguard: Unknown symbol setup_udp_tunnel_sock (err -2)
[ 129.872069] wireguard: Unknown symbol udp_sock_create6 (err -2)
[ 129.872101] wireguard: Unknown symbol curve25519_arch (err -2)
[ 129.872126] wireguard: Unknown symbol chacha20poly1305_decrypt (err -2)
[ 129.872150] wireguard: Unknown symbol curve25519_base_arch (err -2)
[ 129.872167] wireguard: Unknown symbol udp_tunnel_xmit_skb (err -2)
mp13-rt:/etc/wireguard# modinfo chacha20poly1305
modinfo: ERROR: Module chacha20poly1305 not found.
root@stm32mp13-rt:/etc/wireguard#

2 REPLIES 2
stack_shailesh
Associate III

Hello,

If anyone have specific solution for that? Kindly provide any solution for the same ASAP.

STea
ST Employee

Hello @stack_shailesh ,

The errors you're encountering indicate that the WireGuard kernel module is missing several dependencies, which are essential for its operation. These dependencies include cryptographic functions and UDP tunnel functions. Here’s some point to look for:

-Ensure Kernel Configuration:

[*] Networking support (NET) -->
    Networking options -->
        [*] TCP/IP networking (INET)
        [*]   IP: Foo (IP protocols) over UDP (NET_FOU)
[*] Cryptographic API (CRYPTO) -->
    [*] Cryptographic algorithm manager (CRYPTO_MANAGER)

-rebuild the kernel and the module then bake the image again you can also try to add it as a built-in module by following the "Building Directly In Tree" in the link you shared this can be done to ensure that it's baked into the kernel, but it will not be removable.

-Ensure that the required modules are loaded. You can do this manually or add them to your system's module load configuration:

modprobe udp_tunnel

modprobe ip6_udp_tunnel

modprobe chacha20poly1305

modprobe curve25519

modprobe wireguard

-Check if the modules are correctly installed and loaded:

lsmod | grep wireguard
lsmod | grep chacha20poly1305
lsmod | grep curve25519

Now, try to create the WireGuard interface again:

wg-quick up wg0

Regards

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.