summaryrefslogtreecommitdiff
path: root/sys/net/pfvar.h
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2009-06-08 02:39:16 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2009-06-08 02:39:16 +0000
commit441ab46c5e3608bddf66e824246295cbc02f52bf (patch)
tree1c4e094e5868aa3b76575af513661a95b3115a77 /sys/net/pfvar.h
parent130407b9fc8e463aebf8eea8ccff1e6e078dc4bd (diff)
bring back the fixed PF_AEQ/ANEQ/AZERO macros, the offending use has been
found by sthen and fixed, all other callers of these macros checked by both of us
Diffstat (limited to 'sys/net/pfvar.h')
-rw-r--r--sys/net/pfvar.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h
index 55fe9d5f7c1..4bf74c75c94 100644
--- a/sys/net/pfvar.h
+++ b/sys/net/pfvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfvar.h,v 1.288 2009/06/08 01:55:42 henning Exp $ */
+/* $OpenBSD: pfvar.h,v 1.289 2009/06/08 02:39:15 henning Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -220,21 +220,24 @@ struct pfi_dynaddr {
#define PF_AEQ(a, b, c) \
((c == AF_INET && (a)->addr32[0] == (b)->addr32[0]) || \
- ((a)->addr32[3] == (b)->addr32[3] && \
+ (c == AF_INET6 && \
+ (a)->addr32[3] == (b)->addr32[3] && \
(a)->addr32[2] == (b)->addr32[2] && \
(a)->addr32[1] == (b)->addr32[1] && \
(a)->addr32[0] == (b)->addr32[0])) \
#define PF_ANEQ(a, b, c) \
((c == AF_INET && (a)->addr32[0] != (b)->addr32[0]) || \
+ (c == AF_INET6 && \
((a)->addr32[3] != (b)->addr32[3] || \
(a)->addr32[2] != (b)->addr32[2] || \
(a)->addr32[1] != (b)->addr32[1] || \
- (a)->addr32[0] != (b)->addr32[0])) \
+ (a)->addr32[0] != (b)->addr32[0]))) \
#define PF_AZERO(a, c) \
((c == AF_INET && !(a)->addr32[0]) || \
- (!(a)->addr32[0] && !(a)->addr32[1] && \
+ (c == AF_INET6 && \
+ !(a)->addr32[0] && !(a)->addr32[1] && \
!(a)->addr32[2] && !(a)->addr32[3] )) \
#define PF_MATCHA(n, a, m, b, f) \