From abc1782912c0316a2bc28e8a3aa028319de1b818 Mon Sep 17 00:00:00 2001 From: Theo Buehler Date: Thu, 14 Jan 2021 09:44:34 +0000 Subject: Fix build without carp: ifp0 is only used within #if NCARP > 0. ok kn mvs --- sys/net/pf.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sys/net/pf.c') diff --git a/sys/net/pf.c b/sys/net/pf.c index de6b0381901..e93e2b50dba 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.1097 2021/01/04 12:48:27 bluhm Exp $ */ +/* $OpenBSD: pf.c,v 1.1098 2021/01/14 09:44:33 tb Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -3081,7 +3081,10 @@ pf_match_tag(struct mbuf *m, struct pf_rule *r, int *tag) int pf_match_rcvif(struct mbuf *m, struct pf_rule *r) { - struct ifnet *ifp, *ifp0; + struct ifnet *ifp; +#if NCARP > 0 + struct ifnet *ifp0; +#endif struct pfi_kif *kif; ifp = if_get(m->m_pkthdr.ph_ifidx); @@ -6841,7 +6844,9 @@ pf_counters_inc(int action, struct pf_pdesc *pd, struct pf_state *s, int pf_test(sa_family_t af, int fwdir, struct ifnet *ifp, struct mbuf **m0) { +#if NCARP > 0 struct ifnet *ifp0; +#endif struct pfi_kif *kif; u_short action, reason = 0; struct pf_rule *a = NULL, *r = &pf_default_rule; -- cgit v1.2.3