On Wed, Aug 04, 2021 at 08:36:07PM +1000, Matt Dunwoodie wrote: > On Tue, 3 Aug 2021 13:02:15 -0500 > "Matt P." <hybrid...@gmail.com> wrote: > > > Hi Stuart! > > > > Your advice lead me to discover, the issue happens only with the > > "PersistantKeepalive = 25" option I had enabled on each wg-quick > > peer. Looks like you could recreate it by making a few no-address > > peers with this option enabled. > > Hi Matt, > > This insight was very helpful. It looks like mbufs are not freed if > we're sending to a peer with no endpoint. Specifically, "wg_send" is > expected to free the mbuf if there is an error sending. This (untested) > patch should fix it. > > Cheers, > Matt > > diff --git if_wg.c if_wg.c > index 18333eda4cb..5f4319558ab 100644 > --- if_wg.c > +++ if_wg.c > @@ -810,6 +810,7 @@ wg_send(struct wg_softc *sc, struct wg_endpoint *e, > struct mbuf *m) > IPPROTO_IPV6); > #endif > } else { > + m_freem(m); > return EAFNOSUPPORT; > } > >
Diff looks sensible. OK claudio@ -- :wq Claudio