diff --git a/server/fw_util_ipfw.c b/server/fw_util_ipfw.c index 2134d469..6dd5d158 100644 --- a/server/fw_util_ipfw.c +++ b/server/fw_util_ipfw.c @@ -848,7 +848,9 @@ ipfw_purge_expired_rules(const fko_srv_options_t *opts) snprintf(cmd_buf, CMD_BUFSIZE-1, "%s " IPFW_DEL_RULE_ARGS, opts->fw_config->fw_command, +#ifndef __APPLE__ fwc.expire_set_num, +#endif curr_rule ); diff --git a/server/fw_util_ipfw.h b/server/fw_util_ipfw.h index d574ce9d..aceb4ada 100644 --- a/server/fw_util_ipfw.h +++ b/server/fw_util_ipfw.h @@ -45,13 +45,22 @@ enum { #define IPFW_MOVE_RULE_ARGS "set move rule %u to %u" #define IPFW_MOVE_SET_ARGS "set move %u to %u" #define IPFW_DISABLE_SET_ARGS "set disable %u" -#define IPFW_DEL_RULE_ARGS "set %u delete %u" -#define IPFW_DEL_RULE_SET_ARGS "delete set %u" -#define IPFW_LIST_RULES_ARGS "-d -S -T set %u list" #define IPFW_LIST_ALL_RULES_ARGS "list" -#define IPFW_LIST_SET_RULES_ARGS "set %u list" -#define IPFW_LIST_EXP_SET_RULES_ARGS "-S set %u list" -#define IPFW_LIST_SET_DYN_RULES_ARGS "-d set %u list" +#define IPFW_DEL_RULE_SET_ARGS "delete set %u" + +#ifdef __APPLE__ + #define IPFW_DEL_RULE_ARGS "delete %u" //--DSS diff args + #define IPFW_LIST_RULES_ARGS "-d -S -T list | grep 'set %u'" + #define IPFW_LIST_SET_RULES_ARGS "-S list | grep 'set %u'" + #define IPFW_LIST_EXP_SET_RULES_ARGS "-S list | grep 'set %u'" + #define IPFW_LIST_SET_DYN_RULES_ARGS "-d list | grep 'set %u'" +#else + #define IPFW_DEL_RULE_ARGS "set %u delete %u" + #define IPFW_LIST_RULES_ARGS "-d -S -T set %u list" + #define IPFW_LIST_SET_RULES_ARGS "set %u list" + #define IPFW_LIST_EXP_SET_RULES_ARGS "-S set %u list" + #define IPFW_LIST_SET_DYN_RULES_ARGS "-d set %u list" +#endif void ipfw_purge_expired_rules(const fko_srv_options_t *opts); diff --git a/server/pcap_capture.h b/server/pcap_capture.h index 7ac4453a..8a324079 100644 --- a/server/pcap_capture.h +++ b/server/pcap_capture.h @@ -41,7 +41,7 @@ * mode to on unless it is a FreeBSD system. --DSS XXX: What we really need * to do is figure out what the difference is and address it correctly. */ -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined(__APPLE__) #define DEF_PCAP_NONBLOCK 0 #else #define DEF_PCAP_NONBLOCK 1