wireguard: adding routes fails with fib 0: Invalid argument

From: Florian Smeets <flo_at_smeets.xyz>
Date: Sat, 09 Sep 2023 06:51:55 UTC
Hi,

maybe I'm missing something, but I cannot get wireguard working on 
stable/14 or main.

This used to work on main a couple of month back.

root@xx:~ # wg
interface: wg0
   public key: xx
   private key: (hidden)
   listening port: 51820

peer: xx
   endpoint: x.x.x.x:51820
   allowed ips: 10.30.6.0/24, 172.30.6.0/24, 10.10.10.103/32
   latest handshake: 1 minute, 24 seconds ago
   transfer: 11.33 MiB received, 164.46 KiB sent

root@xx:~ # ifconfig wg0
wg0: flags=10080c1<UP,RUNNING,NOARP,MULTICAST,LOWER_UP> metric 0 mtu 1420
	options=80000<LINKSTATE>
	groups: wg
	nd6 options=101<PERFORMNUD,NO_DAD>

root@xx:~ # route add -inet 172.30.6.0/24 -iface wg0
add net 172.30.6.0: gateway wg0 fib 0: Invalid argument

I can add -iface routes to e.g. igb0, so it seems to be related to the 
wg0 virtual/cloned interface. I don't do anything special regarding 
fibs, i.e. I don't use them besides what's used by default.

The tests were run on 14.0-ALPHA4, with a stock GENERIC kernel and userland.

Is anybody successfully running wireguard on 14.0 or 15?

Thanks
Florian