summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_spd.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2004-04-14 20:10:05 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2004-04-14 20:10:05 +0000
commit7ec57e725e45f82e2adefdc6b568217a39cf0aba (patch)
treea2ed389313b1dc8bcd073aafe52db889b6c9785d /sys/netinet/ip_spd.c
parent4687d940feb1d5604031e67a52ab93c976d4c87c (diff)
simpler ipsp_aux_match() API; ok henning, hshoexer
Diffstat (limited to 'sys/netinet/ip_spd.c')
-rw-r--r--sys/netinet/ip_spd.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/sys/netinet/ip_spd.c b/sys/netinet/ip_spd.c
index e6fc4b951d1..4928b0d9bb4 100644
--- a/sys/netinet/ip_spd.c
+++ b/sys/netinet/ip_spd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_spd.c,v 1.47 2002/11/12 13:38:41 dhartmei Exp $ */
+/* $OpenBSD: ip_spd.c,v 1.48 2004/04/14 20:10:04 markus Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
*
@@ -355,12 +355,10 @@ ipsp_spd_lookup(struct mbuf *m, int af, int hlen, int *error, int direction,
ipo->ipo_tdb->tdb_dst.sa.sa_len))
goto nomatchout;
- if (!ipsp_aux_match(ipo->ipo_tdb->tdb_srcid,
- ipo->ipo_srcid, ipo->ipo_tdb->tdb_dstid,
- ipo->ipo_dstid, ipo->ipo_tdb->tdb_local_cred,
- ipo->ipo_local_cred, NULL, NULL,
- &ipo->ipo_tdb->tdb_filter, &ipo->ipo_addr,
- &ipo->ipo_tdb->tdb_filtermask, &ipo->ipo_mask))
+ if (!ipsp_aux_match(ipo->ipo_tdb,
+ ipo->ipo_srcid, ipo->ipo_dstid,
+ ipo->ipo_local_cred, NULL,
+ &ipo->ipo_addr, &ipo->ipo_mask))
goto nomatchout;
/* Cached entry is good. */
@@ -966,12 +964,11 @@ ipsp_spd_inp(struct mbuf *m, int af, int hlen, int *error, int direction,
if (tdbp->tdb_sproto == inp->inp_ipo->ipo_sproto &&
!bcmp(&tdbp->tdb_src, &inp->inp_ipo->ipo_dst,
SA_LEN(&tdbp->tdb_src.sa)) &&
- ipsp_aux_match(tdbp->tdb_srcid,
- inp->inp_ipo->ipo_srcid, tdbp->tdb_dstid,
- inp->inp_ipo->ipo_dstid, NULL, NULL,
- NULL, NULL, &tdbp->tdb_filter,
+ ipsp_aux_match(tdbp,
+ inp->inp_ipo->ipo_srcid,
+ inp->inp_ipo->ipo_dstid,
+ NULL, NULL,
&inp->inp_ipo->ipo_addr,
- &tdbp->tdb_filtermask,
&inp->inp_ipo->ipo_mask))
goto justreturn;
else {
@@ -992,11 +989,11 @@ ipsp_spd_inp(struct mbuf *m, int af, int hlen, int *error, int direction,
tdbp->tdb_sproto == inp->inp_ipo->ipo_sproto &&
!bcmp(&tdbp->tdb_src, &inp->inp_ipo->ipo_dst,
SA_LEN(&tdbp->tdb_src.sa)) &&
- ipsp_aux_match(tdbp->tdb_srcid,
- inp->inp_ipo->ipo_srcid, tdbp->tdb_dstid,
- inp->inp_ipo->ipo_dstid, NULL, NULL,
- NULL, NULL, &tdbp->tdb_filter,
- &inp->inp_ipo->ipo_addr, &tdbp->tdb_filtermask,
+ ipsp_aux_match(tdbp,
+ inp->inp_ipo->ipo_srcid,
+ inp->inp_ipo->ipo_dstid,
+ NULL, NULL,
+ &inp->inp_ipo->ipo_addr,
&inp->inp_ipo->ipo_mask))
goto justreturn;