PIVPN / Wireguard not starting after reboot - Kernelupdate-Problem?

Hi,
after last reboot my Wireguard Server doesn’t seem to be starting, might bee a problem with the “new” kernel.

#systemctl status wg-quick@wg0.service
Apr 03 21:20:26 DietRpi3 wg-quick[97907]: [#] wg setconf wg0 /dev/fd/63
Apr 03 21:20:26 DietRpi3 wg-quick[97907]: [#] ip -4 address add 10.6.0.1/24 dev wg0
Apr 03 21:20:26 DietRpi3 wg-quick[97907]: [#] ip link set mtu 1420 up dev wg0
Apr 03 21:20:26 DietRpi3 wg-quick[97907]: [#] wg set wg0 fwmark 51820
Apr 03 21:20:26 DietRpi3 wg-quick[97907]: [#] ip -6 route add ::/0 dev wg0 table 51820
Apr 03 21:20:26 DietRpi3 wg-quick[97950]: Error: IPv6 is disabled on nexthop device.
Apr 03 21:20:26 DietRpi3 wg-quick[97907]: [#] ip link delete dev wg0
Apr 03 21:20:27 DietRpi3 systemd[1]: wg-quick@wg0.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Apr 03 21:20:27 DietRpi3 systemd[1]: wg-quick@wg0.service: Failed with result 'exit-code'.
Apr 03 21:20:27 DietRpi3 systemd[1]: Failed to start WireGuard via wg-quick(8) for wg0.

Now I’m running
Linux DietRpi3 5.15.30-v8+ / DietPi v8.3.1 / Debian 11.3 and I don’t need IPv6. It is disabled in dietpi-config and only IPv4 forwarding is enabled.

dietpi@DietRpi3:~$ sudo modinfo wireguard | grep ‘filename:’
filename: /lib/modules/5.15.30-v8+/kernel/drivers/net/wireguard/wireguard.ko

Internet research let me install wireguard-dkms and kernel headers, but that don’t seem to be necessary on dietpi with pivpn, right? At least it was missing all time and installing it doesn’t solve the problem because auto-compiling failes too.

Compared to other users my SetupVars.conf misses entries for
IPv4addr=
IPv4gw=
but the file has not been changed since last year so it seems to be ok.

Debug:

::::		[4mPiVPN debug[0m		 ::::
=============================================
::::		[4mLatest commit[0m		 ::::
Branch: master
Commit: 50798ccd42ef7a2b67f14b801b84f425805a40ed
Author: Orazio
Date: Wed Sep 15 17:52:17 2021 +0200
Summary: Important change to custom MTU handling (mainly to fix issue #1357)
=============================================
::::	    [4mInstallation settings[0m    	 ::::
PLAT=Debian
OSCN=bullseye
USING_UFW=0
IPv4dev=eth0
install_user=dietpi
install_home=/home/dietpi
VPN=wireguard
pivpnPORT=51820
pivpnDNS1=10.6.0.1
pivpnDNS2=
pivpnHOST=REDACTED
INPUT_CHAIN_EDITED=0
FORWARD_CHAIN_EDITED=0
pivpnPROTO=udp
pivpnMTU=1420
pivpnDEV=wg0
pivpnNET=10.6.0.0
subnetClass=24
ALLOWED_IPS="0.0.0.0/0, ::0/0"
UNATTUPG=0
INSTALLED_PACKAGES=(wireguard-tools qrencode)
=============================================
::::  [4mServer configuration shown below[0m   ::::
[Interface]
PrivateKey = server_priv
Address = 10.6.0.1/24
MTU = 1420
ListenPort = 51820
### begin Notebook ###
[Peer]
PublicKey = Notebook_pub
PresharedKey = Notebook_psk
AllowedIPs = 10.6.0.2/32, 0.0.0.0/0, ::/0
### end Notebook ###

=============================================
::::  [4mClient configuration shown below[0m   ::::
[Interface]
PrivateKey = Notebook_priv
Address = 10.6.0.2/24
DNS = 10.6.0.1

[Peer]
PublicKey = server_pub
PresharedKey = Notebook_psk
Endpoint = REDACTED:51820
AllowedIPs = 0.0.0.0/0, ::0/0
=============================================
:::: 	[4mRecursive list of files in[0m	 ::::
::::	[4m/etc/wireguard shown below[0m	 ::::
/etc/wireguard:
configs
eth0.conf
keys
wg0.conf

/etc/wireguard/configs:
Notebook.conf
Tablet.conf
clients.txt

/etc/wireguard/keys:
Notebook_priv
Notebook_psk
Notebook_pub
server_priv
server_pub
=============================================
::::		[4mSelf check[0m		 ::::
:: [OK] IP forwarding is enabled
:: [OK] Iptables MASQUERADE rule set
Done
:: [OK] WireGuard is enabled (it will automatically start on reboot)
Done
[INFO] Run [1mpivpn -d[0m again to see if we detect issues

I read somewhere earlier about this, but can’t remember where.
For testing I deactivated IPv6 on my device and got the same error.
The solutions is to remove the v6 addresses from the peer config: (default: /etc/wireguard/wg0.conf)

AllowedIPs = 10.6.0.2/32, 0.0.0.0/0
### end Notebook ###

The following is the server config and you could try to remove ::/0 from AllowedIPs

### begin Notebook ###
[Peer]
PublicKey = Notebook_pub
PresharedKey = Notebook_psk
AllowedIPs = 10.6.0.2/32, 0.0.0.0/0, ::/0
### end Notebook ###

Thank you, that worked.
This was easy and I am glad that I was on the wrong way with kernelupdate.

for testing, create another client configuration and check if it is working. If ::/0 is added again, it might be an issue of PIVPN application and would need to be reported there.