Added tweaks to ipfw command for Mac OS X
This commit is contained in:
parent
f06c775654
commit
2a5bc7ed14
@ -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
|
||||
);
|
||||
|
||||
|
||||
@ -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_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);
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user