It turned out to be a configuration error in the firewall.
I had a pass in rule on the WAN interface with a gateway set. This caused the packet to be rerouted to the gateway *before* it went into the wg interface.
The solution was to remove the gateway.
The route-to case is described here which also warns about the above:
https://docs.opnsense.org/manual/how-tos/multiwan.html#step-4-policy-based-routing
The snippet from dmesg made me think this is a kernel issue, in particular the error code 47:
> wg1: Handshake for peer 1 did not complete after 5 seconds, retrying (retry 15)
> wg1: Sending handshake initiation to peer 1
> wg1: Unable to send packet: 47
#define EAFNOSUPPORT 47 /* Address family not supported by protocol family */
I had a pass in rule on the WAN interface with a gateway set. This caused the packet to be rerouted to the gateway *before* it went into the wg interface.
The solution was to remove the gateway.
The route-to case is described here which also warns about the above:
https://docs.opnsense.org/manual/how-tos/multiwan.html#step-4-policy-based-routing
The snippet from dmesg made me think this is a kernel issue, in particular the error code 47:
> wg1: Handshake for peer 1 did not complete after 5 seconds, retrying (retry 15)
> wg1: Sending handshake initiation to peer 1
> wg1: Unable to send packet: 47
#define EAFNOSUPPORT 47 /* Address family not supported by protocol family */
"