Package: openvpn-dco-dkms
Version: 0.0+git20260519-1
Severity: important
Tags: ftbfs patch

Dear Maintainer,

After a system upgrade today, openvpn-dco-dkms failed to build against
the newly installed kernel with headers from the
linux-headers-7.1.5+deb14-amd64 package. It looks like the interface to
setup_udp_tunnel_sock has changed, with the second argument now being a
"struct sock *" instead of a "struct socket *", as per
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/include/net/udp_tunnel.h?id=v7.1.5&id2=v7.1.4

Here's the build log that backs that up:

--- Build log start ---
DKMS (dkms-3.2.2) make.log for ovpn-dco/0.0+git20260519 for kernel 
7.1.5+deb14-amd64 (x86_64)
Tue 28 Jul 07:17:39 BST 2026

Building module(s)
# command: make -j4 KERNELRELEASE=7.1.5+deb14-amd64 VER=7.1.5+deb14-amd64 
KERNEL_SRC=/lib/modules/7.1.5+deb14-amd64/build REVISION=0.0+git20260519
/var/lib/dkms/ovpn-dco/0.0+git20260519/build/gen-compat-autoconf.sh 
/var/lib/dkms/ovpn-dco/0.0+git20260519/build/compat-autoconf.h
make -C /lib/modules/7.1.5+deb14-amd64/build 
M=/var/lib/dkms/ovpn-dco/0.0+git20260519/build 
PWD=/var/lib/dkms/ovpn-dco/0.0+git20260519/build REVISION=0.0+git20260519 
CONFIG_OVPN_DCO_V2=m INSTALL_MOD_DIR=updates/     modules
make[1]: Entering directory '/usr/src/linux-headers-7.1.5+deb14-amd64'
make[2]: Entering directory '/var/lib/dkms/ovpn-dco/0.0+git20260519/build'
  CC [M]  drivers/net/ovpn-dco/main.o
  CC [M]  drivers/net/ovpn-dco/bind.o
  CC [M]  drivers/net/ovpn-dco/crypto.o
  CC [M]  drivers/net/ovpn-dco/ovpn.o
  CC [M]  drivers/net/ovpn-dco/peer.o
  CC [M]  drivers/net/ovpn-dco/sock.o
  CC [M]  drivers/net/ovpn-dco/stats.o
  CC [M]  drivers/net/ovpn-dco/netlink.o
  CC [M]  drivers/net/ovpn-dco/crypto_aead.o
  CC [M]  drivers/net/ovpn-dco/pktid.o
  CC [M]  drivers/net/ovpn-dco/tcp.o
  CC [M]  drivers/net/ovpn-dco/udp.o
drivers/net/ovpn-dco/udp.c: In function ‘ovpn_udp_socket_attach’:
drivers/net/ovpn-dco/udp.c:346:51: error: passing argument 2 of 
‘setup_udp_tunnel_sock’ from incompatible pointer type 
[-Wincompatible-pointer-types]
  346 |         setup_udp_tunnel_sock(sock_net(sock->sk), sock, &cfg);
      |                                                   ^~~~
      |                                                   |
      |                                                   struct socket *
In file included from drivers/net/ovpn-dco/udp.c:25:
/usr/src/linux-headers-7.1.5+deb14-common/include/net/udp_tunnel.h:97:58: note: 
expected ‘struct sock *’ but argument is of type ‘struct socket *’
   97 | void setup_udp_tunnel_sock(struct net *net, struct sock *sk,
      |                                             ~~~~~~~~~~~~~^~
drivers/net/ovpn-dco/udp.c: In function ‘ovpn_udp_socket_detach’:
drivers/net/ovpn-dco/udp.c:356:51: error: passing argument 2 of 
‘setup_udp_tunnel_sock’ from incompatible pointer type 
[-Wincompatible-pointer-types]
  356 |         setup_udp_tunnel_sock(sock_net(sock->sk), sock, &cfg);
      |                                                   ^~~~
      |                                                   |
      |                                                   struct socket *
/usr/src/linux-headers-7.1.5+deb14-common/include/net/udp_tunnel.h:97:58: note: 
expected ‘struct sock *’ but argument is of type ‘struct socket *’
   97 | void setup_udp_tunnel_sock(struct net *net, struct sock *sk,
      |                                             ~~~~~~~~~~~~~^~
make[5]: *** 
[/usr/src/linux-headers-7.1.5+deb14-common/scripts/Makefile.build:294: 
drivers/net/ovpn-dco/udp.o] Error 1
make[4]: *** 
[/usr/src/linux-headers-7.1.5+deb14-common/scripts/Makefile.build:553: 
drivers/net/ovpn-dco] Error 2
make[3]: *** [/usr/src/linux-headers-7.1.5+deb14-common/Makefile:2186: .] Error 
2
make[2]: *** [/usr/src/linux-headers-7.1.5+deb14-common/Makefile:260: 
__sub-make] Error 2
make[2]: Leaving directory '/var/lib/dkms/ovpn-dco/0.0+git20260519/build'
make[1]: *** [/usr/src/linux-headers-7.1.5+deb14-common/Makefile:260: 
__sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-7.1.5+deb14-amd64'
make: *** [Makefile:51: all] Error 2

# exit code: 2
# elapsed time: 00:00:04
--- Build log end ---

The solution feels like passing in sock->sk would do the trick if
compiling for >=7.1.5. I've tried this locally, and it seems to work.
I've attached the patch, but as I'm not a seasoned kernel developer it
might need a bit of cleaning or, or there could be better ways to do it,
but at least it unambiguously shows the path to the fix.

If I can be of any further assistance, just let me know.

-DH.


-- System Information:
Debian Release: forky/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 7.1.4+deb14-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages openvpn-dco-dkms depends on:
ii  dkms  3.2.2-1

openvpn-dco-dkms recommends no packages.

openvpn-dco-dkms suggests no packages.

-- no debconf information
Example to work with interface changes in 7.1.5
--- a/drivers/net/ovpn-dco/udp.c
+++ b/drivers/net/ovpn-dco/udp.c
@@ -18,12 +18,19 @@
 #include <linux/inetdevice.h>
 #include <linux/skbuff.h>
 #include <linux/socket.h>
+#include <linux/version.h>
 #include <net/addrconf.h>
 #include <net/dst_cache.h>
 #include <net/route.h>
 #include <net/ipv6.h>
 #include <net/udp_tunnel.h>
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(7,1,5)
+#define setup_socket sock
+#else
+#define setup_socket sock->sk
+#endif
+
 /**
  * ovpn_udp_encap_recv() - Start processing a received UDP packet.
  * If the first byte of the payload is DATA_V2, the packet is further 
processed,
@@ -343,7 +350,7 @@
                return -EBUSY;
        }
 
-       setup_udp_tunnel_sock(sock_net(sock->sk), sock, &cfg);
+       setup_udp_tunnel_sock(sock_net(sock->sk), setup_socket, &cfg);
 
        return 0;
 }
@@ -353,5 +360,5 @@
 {
        struct udp_tunnel_sock_cfg cfg = { };
 
-       setup_udp_tunnel_sock(sock_net(sock->sk), sock, &cfg);
+       setup_udp_tunnel_sock(sock_net(sock->sk), setup_socket, &cfg);
 }

Reply via email to