summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/raw_ip6.c
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2004-02-17 14:02:37 +0000
committerume <ume@FreeBSD.org>2004-02-17 14:02:37 +0000
commit92aaace6046096db0cee26a2d09ade66657e9b41 (patch)
tree303603fd5ead37b54a0b79fac7c02061fb5e5222 /sys/netinet6/raw_ip6.c
parent180ac35cac1b391fa9fb698f9b690a29311b3132 (diff)
downloadFreeBSD-src-92aaace6046096db0cee26a2d09ade66657e9b41.zip
FreeBSD-src-92aaace6046096db0cee26a2d09ade66657e9b41.tar.gz
IPSEC and FAST_IPSEC have the same internal API now;
so merge these (IPSEC has an extra ipsecstat) Submitted by: "Bjoern A. Zeeb" <bzeeb+freebsd@zabbadoz.net>
Diffstat (limited to 'sys/netinet6/raw_ip6.c')
-rw-r--r--sys/netinet6/raw_ip6.c27
1 files changed, 6 insertions, 21 deletions
diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c
index 00205ff..03b9a41 100644
--- a/sys/netinet6/raw_ip6.c
+++ b/sys/netinet6/raw_ip6.c
@@ -176,25 +176,18 @@ rip6_input(mp, offp, proto)
if (last) {
struct mbuf *n = m_copy(m, 0, (int)M_COPYALL);
-#ifdef IPSEC
+#if defined(IPSEC) || defined(FAST_IPSEC)
/*
* Check AH/ESP integrity.
*/
if (n && ipsec6_in_reject(n, last)) {
m_freem(n);
+#ifdef IPSEC
ipsec6stat.in_polvio++;
- /* do not inject data into pcb */
- } else
#endif /*IPSEC*/
-#ifdef FAST_IPSEC
- /*
- * Check AH/ESP integrity.
- */
- if (n && ipsec6_in_reject(n, last)) {
- m_freem(n);
/* do not inject data into pcb */
} else
-#endif /*FAST_IPSEC*/
+#endif /*IPSEC || FAST_IPSEC*/
if (n) {
if (last->in6p_flags & IN6P_CONTROLOPTS ||
last->in6p_socket->so_options & SO_TIMESTAMP)
@@ -215,27 +208,19 @@ rip6_input(mp, offp, proto)
}
last = in6p;
}
-#ifdef IPSEC
+#if defined(IPSEC) || defined(FAST_IPSEC)
/*
* Check AH/ESP integrity.
*/
if (last && ipsec6_in_reject(m, last)) {
m_freem(m);
+#ifdef IPSEC
ipsec6stat.in_polvio++;
- ip6stat.ip6s_delivered--;
- /* do not inject data into pcb */
- } else
#endif /*IPSEC*/
-#ifdef FAST_IPSEC
- /*
- * Check AH/ESP integrity.
- */
- if (last && ipsec6_in_reject(m, last)) {
- m_freem(m);
ip6stat.ip6s_delivered--;
/* do not inject data into pcb */
} else
-#endif /*FAST_IPSEC*/
+#endif /*IPSEC || FAST_IPSEC*/
if (last) {
if (last->in6p_flags & IN6P_CONTROLOPTS ||
last->in6p_socket->so_options & SO_TIMESTAMP)
OpenPOWER on IntegriCloud