RHEL 7.8, Kernel 3.10: ratelimiter.c:25:1: error: unknown type name 'hsiphash_key_t'

Christian Weiss cwei at gmx.net
Sat Apr 11 20:21:01 CEST 2020


Hello Dear Mailinglist,

with RHEL 7.8, kernel 3.10 and current Wireguard 1.0.20191226 make
throws the obove error:

# rpm -qa "wireguard*"
wireguard-tools-1.0.20191226-1.el7.x86_64
wireguard-dkms-1.0.20200401-1.el7.noarch

# cat /etc/oracle-release
Oracle Linux Server release 7.8

# uname -a
Linux xxxxxxxx 3.10.0-1127.el7.x86_64 #1 SMP Wed Apr 1 10:20:09 PDT 2020
x86_64 x86_64 x86_64 GNU/Linux

# make
  CC [M]  /var/lib/dkms/wireguard/1.0.20200401/build/main.o
  CC [M]  /var/lib/dkms/wireguard/1.0.20200401/build/noise.o
  CC [M]  /var/lib/dkms/wireguard/1.0.20200401/build/device.o
  CC [M]  /var/lib/dkms/wireguard/1.0.20200401/build/peer.o
  CC [M]  /var/lib/dkms/wireguard/1.0.20200401/build/timers.o
  CC [M]  /var/lib/dkms/wireguard/1.0.20200401/build/queueing.o
  CC [M]  /var/lib/dkms/wireguard/1.0.20200401/build/send.o
  CC [M]  /var/lib/dkms/wireguard/1.0.20200401/build/receive.o
  CC [M]  /var/lib/dkms/wireguard/1.0.20200401/build/socket.o
  CC [M]  /var/lib/dkms/wireguard/1.0.20200401/build/peerlookup.o
  CC [M]  /var/lib/dkms/wireguard/1.0.20200401/build/allowedips.o
  CC [M]  /var/lib/dkms/wireguard/1.0.20200401/build/ratelimiter.o
/var/lib/dkms/wireguard/1.0.20200401/build/ratelimiter.c:25:1: error:
unknown type name ‘hsiphash_key_t’
 static hsiphash_key_t key;
 ^
/var/lib/dkms/wireguard/1.0.20200401/build/ratelimiter.c: In function
‘wg_ratelimiter_allow’:
/var/lib/dkms/wireguard/1.0.20200401/build/ratelimiter.c:109:3: error:
implicit declaration of function ‘hsiphash_2u32’
[-Werror=implicit-function-declaration]
   bucket = &table_v4[hsiphash_2u32(net_word, ip, &key) &
   ^
/var/lib/dkms/wireguard/1.0.20200401/build/ratelimiter.c:116:3: error:
implicit declaration of function ‘hsiphash_3u32’
[-Werror=implicit-function-declaration]
   bucket = &table_v6[hsiphash_3u32(net_word, ip >> 32, ip, &key) &
   ^
cc1: some warnings being treated as errors
make[2]: *** [/var/lib/dkms/wireguard/1.0.20200401/build/ratelimiter.o]
Error 1
make[1]: *** [_module_/var/lib/dkms/wireguard/1.0.20200401/build] Error 2
make: *** [module] Error 2


The following change works for me; make succeeds:
--- compat/compat.h.bak 2020-04-11 20:04:15.077425108 +0200
+++ compat/compat.h     2020-04-11 20:06:39.279397118 +0200
@@ -1034,7 +1034,7 @@
 }
 #endif

-#if defined(ISUBUNTU1604)
+#if defined(ISUBUNTU1604) || defined(ISRHEL7)
 #include <linux/siphash.h>
 #ifndef _WG_LINUX_SIPHASH_H
 #define hsiphash_2u32 siphash_2u32

Kind regards,
Christian


More information about the WireGuard mailing list