summaryrefslogtreecommitdiffstats
path: root/sys/netpfil
diff options
context:
space:
mode:
authorkevlo <kevlo@FreeBSD.org>2014-08-08 01:57:15 +0000
committerkevlo <kevlo@FreeBSD.org>2014-08-08 01:57:15 +0000
commit7727a3c21521a720a63dfae179944a2c6272e150 (patch)
treeb8a22569ba8e281cdf06effd47986cf8fb592118 /sys/netpfil
parent71993ad111538df7d3ea090e597413a9bbc198a5 (diff)
downloadFreeBSD-src-7727a3c21521a720a63dfae179944a2c6272e150.zip
FreeBSD-src-7727a3c21521a720a63dfae179944a2c6272e150.tar.gz
Merge 'struct ip6protosw' and 'struct protosw' into one. Now we have
only one protocol switch structure that is shared between ipv4 and ipv6. Phabric: D476 Reviewed by: jhb
Diffstat (limited to 'sys/netpfil')
-rw-r--r--sys/netpfil/pf/if_pfsync.c11
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
OpenPOWER on IntegriCloud