Hello, Hello,
On Thu, Apr 27, 2023 at 10:41:53AM +1000, David Gwynne wrote: </snip> > > t could be NULL here. just do the unit check inside the loop? > > > > > if (t->pft_unit != unit) > > return (NULL); > > > > return (t); > > } > > > > just return NULL on unit mismatch. updated diff is below. > > ok once you fix the nit above. > well spotted. This is the change I made to get 2/3 patch fixed: diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c index ebe1b912766..b527610737b 100644 --- a/sys/net/pf_ioctl.c +++ b/sys/net/pf_ioctl.c @@ -3291,13 +3291,10 @@ pf_find_trans(uint32_t unit, uint64_t ticket) rw_assert_anylock(&pfioctl_rw); LIST_FOREACH(t, &pf_ioctl_trans, pft_entry) { - if (t->pft_ticket == ticket) + if (t->pft_ticket == ticket && t->pft_unit == unit) break; } - if (t->pft_unit != unit) - return (NULL); - return (t); } thanks and regards sashan