diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -3860,7 +3860,7 @@ struct pf_keth_ruleset *ruleset = NULL; struct pf_mtag *mtag; struct pf_keth_ruleq *rules; - struct pf_addr *src, *dst; + struct pf_addr *src = NULL, *dst = NULL; sa_family_t af = 0; uint16_t proto; int asd = 0, match = 0; @@ -3958,13 +3958,13 @@ "dst"); r = TAILQ_NEXT(r, entries); } - else if (af != 0 && PF_MISMATCHAW(&r->ipsrc.addr, src, af, + else if (src != NULL && PF_MISMATCHAW(&r->ipsrc.addr, src, af, r->ipsrc.neg, kif, M_GETFIB(m))) { SDT_PROBE3(pf, eth, test_rule, mismatch, r->nr, r, "ip_src"); r = TAILQ_NEXT(r, entries); } - else if (af != 0 && PF_MISMATCHAW(&r->ipdst.addr, dst, af, + else if (dst != NULL && PF_MISMATCHAW(&r->ipdst.addr, dst, af, r->ipdst.neg, kif, M_GETFIB(m))) { SDT_PROBE3(pf, eth, test_rule, mismatch, r->nr, r, "ip_dst");