From: Patrick McHardy Date: Wed, 15 Nov 2006 03:47:09 +0000 (-0800) Subject: [NETFILTER]: nfnetlink_log: fix byteorder of NFULA_SEQ_GLOBAL X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7fdeaf68a16f8102659cf1b30f57247d8ccbeef0;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [NETFILTER]: nfnetlink_log: fix byteorder of NFULA_SEQ_GLOBAL NFULA_SEQ_GLOBAL should be in network byteorder. Spotted by Al Viro. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index b2bf8f2e01da..1e5207b80fe5 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c @@ -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); }