diff options
Diffstat (limited to 'sys/netpfil/pf')
-rw-r--r-- | sys/netpfil/pf/if_pfsync.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c index 7cb75ed..d5a6ffa 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -570,11 +570,12 @@ cleanup_state: /* pf_state_insert() frees the state keys. */ return (error); } -static void -pfsync_input(struct mbuf *m, __unused int off) +static int +pfsync_input(struct mbuf **mp, int *offp __unused, int proto __unused) { struct pfsync_softc *sc = V_pfsyncif; struct pfsync_pkt pkt; + struct mbuf *m = *mp; struct ip *ip = mtod(m, struct ip *); struct pfsync_header *ph; struct pfsync_subheader subh; @@ -583,6 +584,7 @@ pfsync_input(struct mbuf *m, __unused int off) int rv; uint16_t count; + *mp = NULL; V_pfsyncstats.pfsyncs_ipackets++; /* Verify that we have a sync interface configured. */ @@ -613,7 +615,7 @@ pfsync_input(struct mbuf *m, __unused int off) if (offset + sizeof(*ph) > m->m_len) { if (m_pullup(m, offset + sizeof(*ph)) == NULL) { V_pfsyncstats.pfsyncs_hdrops++; - return; + return (IPPROTO_DONE); } ip = mtod(m, struct ip *); } @@ -660,7 +662,7 @@ pfsync_input(struct mbuf *m, __unused int off) rv = (*pfsync_acts[subh.action])(&pkt, m, offset, count); if (rv == -1) { PF_RULES_RUNLOCK(); - return; + return (IPPROTO_DONE); } offset += rv; @@ -669,6 +671,7 @@ pfsync_input(struct mbuf *m, __unused int off) done: m_freem(m); + return (IPPROTO_DONE); } static int |