Hello Moritz, I like your change. There is just one nit see comment below.
</snip> > > > Index: sys/net/pf_if.c > =================================================================== > RCS file: /cvs/src/sys/net/pf_if.c,v > retrieving revision 1.103 > diff -u -p -r1.103 pf_if.c > --- sys/net/pf_if.c 26 Dec 2021 01:00:32 -0000 1.103 > +++ sys/net/pf_if.c 28 Apr 2022 16:36:49 -0000 > @@ -755,7 +755,7 @@ pfi_update_status(const char *name, stru > } > } > > -int > +void > pfi_get_ifaces(const char *name, struct pfi_kif *buf, int *size) > { > struct pfi_kif *p, *nextp; > @@ -769,16 +769,12 @@ pfi_get_ifaces(const char *name, struct > if (!p->pfik_tzero) > p->pfik_tzero = gettime(); > pfi_kif_ref(p, PFI_KIF_REF_RULE); > - if (copyout(p, buf++, sizeof(*buf))) { > - pfi_kif_unref(p, PFI_KIF_REF_RULE); > - return (EFAULT); > - } > + memcpy(buf++, p, sizeof(*buf)); > nextp = RB_NEXT(pfi_ifhead, &pfi_ifs, p); > pfi_kif_unref(p, PFI_KIF_REF_RULE); > } > } I think pfi_kif_ref()/pfi_kif_unref() are no longer needed and both can get removed. apart from nit above your diff reads OK to me. thanks and regards sashan