diff options
author | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2002-11-02 16:56:51 +0000 |
---|---|---|
committer | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2002-11-02 16:56:51 +0000 |
commit | a56820c18669b5dde96befe999cf79d216986a65 (patch) | |
tree | ad0256b5963042f4ffd51298f7e8a9cac1f88dcc /sys/net | |
parent | 4ffaf01929081795d0a4922f4999f9d4b437d96d (diff) |
Make PF_ANEQ(), PF_ANEQ() and PF_AZERO() check the whole address if af
is not set to AF_INET6 or AF_INET
ok dhartmei@ henning@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/pfvar.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index e3343b020a9..59e1ccb00bb 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfvar.h,v 1.100 2002/10/22 12:23:35 mcbride Exp $ */ +/* $OpenBSD: pfvar.h,v 1.101 2002/11/02 16:56:50 mcbride Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -119,23 +119,22 @@ struct pf_addr_dyn { #define PF_AEQ(a, b, c) \ ((c == AF_INET && (a)->addr32[0] == (b)->addr32[0]) || \ - (c == AF_INET6 && (a)->addr32[0] == (b)->addr32[0] && \ + ((a)->addr32[0] == (b)->addr32[0] && \ (a)->addr32[1] == (b)->addr32[1] && \ (a)->addr32[2] == (b)->addr32[2] && \ (a)->addr32[3] == (b)->addr32[3])) \ #define PF_ANEQ(a, b, c) \ ((c == AF_INET && (a)->addr32[0] != (b)->addr32[0]) || \ - (c == AF_INET6 && ((a)->addr32[0] != (b)->addr32[0] || \ + ((a)->addr32[0] != (b)->addr32[0] || \ (a)->addr32[1] != (b)->addr32[1] || \ (a)->addr32[2] != (b)->addr32[2] || \ - (a)->addr32[3] != (b)->addr32[3]))) \ + (a)->addr32[3] != (b)->addr32[3])) \ #define PF_AZERO(a, c) \ ((c == AF_INET && !(a)->addr32[0]) || \ - (c == AF_INET6 && !(a)->addr32[0] && \ - !(a)->addr32[1] && !(a)->addr32[2] && \ - !(a)->addr32[3] )) \ + (!(a)->addr32[0] && !(a)->addr32[1] && \ + !(a)->addr32[2] && !(a)->addr32[3] )) \ #define PF_MATCHA(n, a, m, b, f) \ pf_match_addr(n, a, m, b, f) |