$NetBSD: patch-ac,v 1.4 2011/02/09 22:51:38 rumko Exp $ $OpenBSD: patch-config_h,v 1.5 2009/11/30 09:56:39 sthen Exp $ Patches to support PF > 4.1 taken from OpenBSD's ports. --- config.h.old 2008-06-15 01:19:59.000000000 +0200 +++ config.h 2008-06-15 12:16:51.000000000 +0200 @@ -74,11 +74,24 @@ #define HAVE_PFSYNC_STATE #endif +#if OS_LEVEL > 43 +#define HAVE_PFSYNC_KEY +#define HAVE_NETWORK_ORDER +#endif + +/* #if OS_LEVEL > 46 */ +#undef HAVE_RULE_NATPASS +/* #endif */ + #ifdef HAVE_PFSYNC_STATE typedef struct pfsync_state pf_state_t; typedef struct pfsync_state_host pf_state_host_t; typedef struct pfsync_state_peer pf_state_peer_t; +#ifdef HAVE_NETWORK_ORDER +#define COUNTER(c) ((((u_int64_t) ntohl(c[0]))<<32) + ntohl(c[1])) +#else #define COUNTER(c) ((((u_int64_t) c[0])<<32) + c[1]) +#endif #define pfs_ifname ifname #else typedef struct pf_state pf_state_t;