summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorangelos <angelos@openbsd.org>2001-10-03 02:08:41 +0000
committerangelos <angelos@openbsd.org>2001-10-03 02:08:41 +0000
commitd79fed2dac4ac610e60a1ba16c17248387ef0930 (patch)
treed7f08450dbddd0c1ba89fa1bc1040d66cf53eccd
parentsimple keynote module for apache and mod_ssl (diff)
downloadwireguard-openbsd-d79fed2dac4ac610e60a1ba16c17248387ef0930.tar.xz
wireguard-openbsd-d79fed2dac4ac610e60a1ba16c17248387ef0930.zip
If the TDB doesn't have an attached src/dst ID, it can be used for any
type of traffic.
-rw-r--r--sys/netinet/ip_ipsp.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/sys/netinet/ip_ipsp.c b/sys/netinet/ip_ipsp.c
index 22f35e55247..315d058671d 100644
--- a/sys/netinet/ip_ipsp.c
+++ b/sys/netinet/ip_ipsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipsp.c,v 1.142 2001/09/05 19:22:23 deraadt Exp $ */
+/* $OpenBSD: ip_ipsp.c,v 1.143 2001/10/03 02:08:41 angelos Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr),
@@ -330,8 +330,7 @@ gettdbbyaddr(union sockaddr_union *dst, struct ipsec_policy *ipo,
tdbp->tdb_srcid))
continue;
/* Otherwise, this is fine. */
- } else if (ipo->ipo_srcid != NULL)
- continue;
+ }
if (tdbp->tdb_dstid != NULL) {
if (ipo->ipo_dstid != NULL &&
@@ -339,8 +338,7 @@ gettdbbyaddr(union sockaddr_union *dst, struct ipsec_policy *ipo,
tdbp->tdb_dstid))
continue;
/* Otherwise, this is fine. */
- } else if (ipo->ipo_dstid != NULL)
- continue;
+ }
/* Check for credential matches. */
if (tdbp->tdb_local_cred != NULL) {
@@ -397,8 +395,7 @@ gettdbbysrc(union sockaddr_union *src, struct ipsec_policy *ipo,
tdbp->tdb_srcid))
continue;
/* Otherwise, this is fine. */
- } else if (ipo->ipo_dstid != NULL)
- continue;
+ }
if (tdbp->tdb_dstid != NULL) {
if (ipo->ipo_srcid != NULL &&
@@ -406,8 +403,7 @@ gettdbbysrc(union sockaddr_union *src, struct ipsec_policy *ipo,
tdbp->tdb_dstid))
continue;
/* Otherwise, this is fine. */
- } else if (ipo->ipo_srcid != NULL)
- continue;
+ }
/* XXX Check for filter matches. */
break;