diff options
author | Nikolay Sturm <sturm@cvs.openbsd.org> | 2005-06-30 20:52:21 +0000 |
---|---|---|
committer | Nikolay Sturm <sturm@cvs.openbsd.org> | 2005-06-30 20:52:21 +0000 |
commit | 31bd9ec4606eba4b156dd600ed8bc479f4b1e1e7 (patch) | |
tree | 9a4a8289b9ae6eae45e6e3cdcd544ca31644245a /sys | |
parent | 3912fd30e96aeec8ba6f45bae610692b9c859f92 (diff) |
in order for pfvar.h not to conflict with openssl's crypto.h, use
PF_MD5_DIGEST_LENGTH instead of including crypto/md5.h
ok markus@, henning@, mpf@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/pf_ioctl.c | 5 | ||||
-rw-r--r-- | sys/net/pfvar.h | 12 |
2 files changed, 12 insertions, 5 deletions
diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c index d202aac1f38..5778dddf3cd 100644 --- a/sys/net/pf_ioctl.c +++ b/sys/net/pf_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_ioctl.c,v 1.144 2005/06/13 20:17:25 henning Exp $ */ +/* $OpenBSD: pf_ioctl.c,v 1.145 2005/06/30 20:52:20 sturm Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -63,6 +63,7 @@ #include <netinet/ip_icmp.h> #include <dev/rndvar.h> +#include <crypto/md5.h> #include <net/pfvar.h> #if NPFSYNC > 0 @@ -1091,7 +1092,7 @@ pf_calc_chksum(struct pf_ruleset *rs) MD5_CTX ctx; struct pf_rule *rule; int rs_cnt; - u_int8_t digest[MD5_DIGEST_LENGTH]; + u_int8_t digest[PF_MD5_DIGEST_LENGTH]; MD5Init(&ctx); for (rs_cnt = 0; rs_cnt < PF_RULESET_MAX; rs_cnt++) { diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index e768b369842..35813d6ed2f 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfvar.h,v 1.224 2005/06/13 20:54:50 henning Exp $ */ +/* $OpenBSD: pfvar.h,v 1.225 2005/06/30 20:52:20 sturm Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -42,13 +42,19 @@ #include <net/route.h> #include <netinet/ip_ipsp.h> #include <netinet/tcp_fsm.h> -#include <crypto/md5.h> struct ip; #define PF_TCPS_PROXY_SRC ((TCP_NSTATES)+0) #define PF_TCPS_PROXY_DST ((TCP_NSTATES)+1) +#define PF_MD5_DIGEST_LENGTH 16 +#ifdef MD5_DIGEST_LENGTH +#if PF_MD5_DIGEST_LENGTH != MD5_DIGEST_LENGTH +#error +#endif +#endif + enum { PF_INOUT, PF_IN, PF_OUT }; enum { PF_LAN_EXT, PF_EXT_GWY, PF_ID }; enum { PF_PASS, PF_DROP, PF_SCRUB, PF_NOSCRUB, PF_NAT, PF_NONAT, @@ -1048,7 +1054,7 @@ struct pf_status { u_int32_t debug; u_int32_t hostid; char ifname[IFNAMSIZ]; - u_int8_t pf_chksum[MD5_DIGEST_LENGTH]; + u_int8_t pf_chksum[PF_MD5_DIGEST_LENGTH]; }; struct cbq_opts { |