cvs commit: src/sbin/ipfw ipfw2.c
gurney_j at resnet.uoregon.edu
Sat Sep 11 16:54:02 PDT 2004
Christian S.J. Peron wrote this message on Sat, Sep 11, 2004 at 19:44 +0000:
> Currently when ipfw(8) generates the micro-instructions for rules which
> contain O_UID, O_GID and O_JAIL opcodes, the F_NOT or F_OR logical
> operator bits get clobbered. Making it impossible to use the ``NOT'' or
> ``OR'' operators with uid, gid and jail based constraints.
> The ipfw_insn instruction template contains a ``len'' element which
> stores two pieces of information, the size of the instruction
> (in 32-bit words) in the low 6 bits of "len" with the 2 remaining
> bits to implement OR and NOT.
Why don't we use the bit field?
u_int8_t logic : 2;
u_int8_t len : 8;
considering this is already used by the enum.. It'd make bugs like
these less likely...
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
More information about the cvs-src