2010/11/16 Vadim Zhukov <persg...@gmail.com>:
> 2010/11/16 Stuart Henderson <s...@spacehopper.org>:
>> On 2010/11/16 04:50, Vadim Zhukov wrote:
>> [..]
>>
>> Great stuff, this has annoyed me for a while :) I can't test today but
>> will try and do that soon. I won't be able to really test pfsync though..
>>
>>> B  - More style(9) compliance. Not sure about struct pf_state change,
>>> B  B  though: will it ever break on architectures with 4-byte pointers
>>> B  B  but 64-bit alignment requirements, if there are any?.. Sorry for
>>> B  B  possibly stupid question.
>>
>> Afaik the strictest requirements on any arch we support is that
>> a data type must be aligned to the size of that data type. 32-bit
>> aligned for 4-byte types, 64-bit aligned for 8-byte types, etc.

Then the snippet should become:

@@ -807,6 +808,8 @@ struct pf_state {
        struct pf_state_key     *key[2];        /* addresses stack and wire
*/
        struct pfi_kif          *kif;
        struct pfi_kif          *rt_kif;
+       struct pf_rule          *rt_rule;
+       caddr_t                  align;
        u_int64_t                packets[2];
        u_int64_t                bytes[2];
        u_int32_t                creation;

Am I right?

--
  WBR,
  Vadim Zhukov

Reply via email to