Move IPFW2 definition before including ip_fw.h
Make indentation of new parts consistent with the style used for this file.
This commit is contained in:
parent
dacf6a1e22
commit
90780c4b05
@ -2635,16 +2635,16 @@ PacketAliasCheckNewLink(void)
|
||||
file, but making variables global is evil too.
|
||||
****************/
|
||||
|
||||
#ifndef IPFW2
|
||||
#define IPFW2 1 /* use new ipfw code */
|
||||
#endif
|
||||
|
||||
/* Firewall include files */
|
||||
#include <net/if.h>
|
||||
#include <netinet/ip_fw.h>
|
||||
#include <string.h>
|
||||
#include <err.h>
|
||||
|
||||
#ifndef IPFW2
|
||||
#define IPFW2 1 /* use new ipfw code */
|
||||
#endif
|
||||
|
||||
#if IPFW2 /* support for new firewall code */
|
||||
/*
|
||||
* helper function, updates the pointer to cmd with the length
|
||||
@ -2668,8 +2668,7 @@ fill_cmd(ipfw_insn *cmd, enum ipfw_opcodes opcode, int size,
|
||||
int flags, u_int16_t arg)
|
||||
{
|
||||
cmd->opcode = opcode;
|
||||
cmd->len = ((cmd->len | flags) & (F_NOT | F_OR)) |
|
||||
(size & F_LEN_MASK);
|
||||
cmd->len = ((cmd->len | flags) & (F_NOT | F_OR)) | (size & F_LEN_MASK);
|
||||
cmd->arg1 = arg;
|
||||
return next_cmd(cmd);
|
||||
}
|
||||
@ -2894,7 +2893,6 @@ ClearFWHole(struct alias_link *link) {
|
||||
;
|
||||
#endif /* !IPFW2 */
|
||||
fw_clrfield(fireWallField, fwhole);
|
||||
|
||||
link->data.tcp->fwhole = -1;
|
||||
}
|
||||
}
|
||||
|
@ -2635,16 +2635,16 @@ PacketAliasCheckNewLink(void)
|
||||
file, but making variables global is evil too.
|
||||
****************/
|
||||
|
||||
#ifndef IPFW2
|
||||
#define IPFW2 1 /* use new ipfw code */
|
||||
#endif
|
||||
|
||||
/* Firewall include files */
|
||||
#include <net/if.h>
|
||||
#include <netinet/ip_fw.h>
|
||||
#include <string.h>
|
||||
#include <err.h>
|
||||
|
||||
#ifndef IPFW2
|
||||
#define IPFW2 1 /* use new ipfw code */
|
||||
#endif
|
||||
|
||||
#if IPFW2 /* support for new firewall code */
|
||||
/*
|
||||
* helper function, updates the pointer to cmd with the length
|
||||
@ -2668,8 +2668,7 @@ fill_cmd(ipfw_insn *cmd, enum ipfw_opcodes opcode, int size,
|
||||
int flags, u_int16_t arg)
|
||||
{
|
||||
cmd->opcode = opcode;
|
||||
cmd->len = ((cmd->len | flags) & (F_NOT | F_OR)) |
|
||||
(size & F_LEN_MASK);
|
||||
cmd->len = ((cmd->len | flags) & (F_NOT | F_OR)) | (size & F_LEN_MASK);
|
||||
cmd->arg1 = arg;
|
||||
return next_cmd(cmd);
|
||||
}
|
||||
@ -2894,7 +2893,6 @@ ClearFWHole(struct alias_link *link) {
|
||||
;
|
||||
#endif /* !IPFW2 */
|
||||
fw_clrfield(fireWallField, fwhole);
|
||||
|
||||
link->data.tcp->fwhole = -1;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user