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:
Luigi Rizzo 2002-07-18 05:18:41 +00:00
parent dacf6a1e22
commit 90780c4b05
2 changed files with 60 additions and 64 deletions

View File

@ -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;
}
}

View File

@ -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;
}
}