summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>2001-08-15 09:50:13 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>2001-08-15 09:50:13 +0000
commitcf2c55efac4edd0ddee07ecc3ea939a000d05fdb (patch)
tree7cbeee52140b0fb50172816f3c94e3abe592cc8d
parentf9b6fa26ddd0e5f251f9a35af1b7efbf5baef6e0 (diff)
bcmp done wrong, detected at bakeoff. Hint: always use
relational operators when using *cmp APIs in conditional expressions.
-rw-r--r--sys/netinet/ip_spd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/ip_spd.c b/sys/netinet/ip_spd.c
index 6fff8c842e2..930633021c7 100644
--- a/sys/netinet/ip_spd.c
+++ b/sys/netinet/ip_spd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_spd.c,v 1.37 2001/08/06 18:46:16 angelos Exp $ */
+/* $OpenBSD: ip_spd.c,v 1.38 2001/08/15 09:50:12 niklas Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
*
@@ -284,7 +284,7 @@ ipsp_spd_lookup(struct mbuf *m, int af, int hlen, int *error, int direction,
case AF_INET6:
if ((IN6_IS_ADDR_UNSPECIFIED(&ipo->ipo_dst.sin6.sin6_addr)) ||
(bcmp(&ipo->ipo_dst.sin6.sin6_addr, &in6mask128,
- sizeof(in6mask128))))
+ sizeof(in6mask128)) == 0))
dignore = 1;
break;
#endif /* INET6 */