summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-12-18 16:45:33 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-12-18 16:45:33 +0000
commit1b63de84b37f25e71a6cc165c122ca385b646a72 (patch)
treea2b2b49b0e73465f73fb32148248b54b24d2b2ca /sys
parente7748204231ab6276d03fd7fafefa2b760bdbcaf (diff)
Minor sanity check.
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_ipsp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/netinet/ip_ipsp.c b/sys/netinet/ip_ipsp.c
index ed7be168d5b..cf926af0fac 100644
--- a/sys/netinet/ip_ipsp.c
+++ b/sys/netinet/ip_ipsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipsp.c,v 1.102 2000/12/15 06:24:03 provos Exp $ */
+/* $OpenBSD: ip_ipsp.c,v 1.103 2000/12/18 16:45:32 angelos Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
@@ -332,6 +332,10 @@ gettdbbyaddr(union sockaddr_union *dst, u_int8_t proto, struct mbuf *m, int af)
(tdbp->tdb_dstid_type != SADB_IDENTTYPE_CONNECTION)))
continue;
+ /* Sanity */
+ if ((m == NULL) || (af == 0))
+ continue;
+
/* XXX Check the IDs ? */
break;
}