[NETFILTER]: nfnetlink_log: fix byteorder of NFULA_SEQ_GLOBAL
authorPatrick McHardy <kaber@trash.net>
Wed, 15 Nov 2006 03:47:09 +0000 (19:47 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 16 Nov 2006 05:18:47 +0000 (21:18 -0800)
NFULA_SEQ_GLOBAL should be in network byteorder.

Spotted by Al Viro.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netfilter/nfnetlink_log.c

index b2bf8f2e01da5cb32bcb7ebb0d2dde47eb877bd9..1e5207b80fe54413cc3bd802574b16daafa55ffc 100644 (file)
@@ -544,7 +544,7 @@ __build_packet_message(struct nfulnl_instance *inst,
        }
        /* global sequence number */
        if (inst->flags & NFULNL_CFG_F_SEQ_GLOBAL) {
-               tmp_uint = atomic_inc_return(&global_seq);
+               tmp_uint = htonl(atomic_inc_return(&global_seq));
                NFA_PUT(inst->skb, NFULA_SEQ_GLOBAL, sizeof(tmp_uint), &tmp_uint);
        }