And then rebuild and install a new kernel:
KK=`sysctl -n kern.osversion | cut -d# -f1`
cd /usr/src/sys/arch/`machine`/compile/$KK
make obj
make config
make
make install
Index: sys/net/if_wg.c
===================================================================
RCS file: /cvs/src/sys/net/if_wg.c,v
diff -u -p -r1.37 if_wg.c
--- sys/net/if_wg.c 5 Mar 2024 17:48:01 -0000 1.37
+++ sys/net/if_wg.c 7 Jan 2025 09:23:19 -0000
@@ -859,11 +859,15 @@ wg_send_buf(struct wg_softc *sc, struct
{
struct mbuf *m;
int ret = 0;
+ size_t mlen = len + max_hdr;
/*
* For the time being we allocate a new packet with sufficient size to
@@ -1521,8 +1523,9 @@ wg_encap(struct wg_softc *sc, struct mbu
* noise_remote_encrypt about mbufs, but we would need to sort out the
* p_encap_queue situation first.
*/
- if ((mc = m_clget(NULL, M_NOWAIT, out_len)) == NULL)
+ if ((mc = m_clget(NULL, M_NOWAIT, out_len + max_hdr)) == NULL)
goto error;
+ m_align(mc, out_len);
data = mtod(mc, struct wg_pkt_data *);
m_copydata(m, 0, m->m_pkthdr.len, data->buf);
@@ -1559,8 +1562,7 @@ wg_encap(struct wg_softc *sc, struct mbu