Patchwork [3.5.yuz,extended,stable] Patch "netfilter: nfnetlink_log: fix NLA_PUT macro removal bug" has been added to staging queue

mail settings
Submitter Herton Ronaldo Krzesinski
Date Nov. 13, 2012, 8:35 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/198784/
State New
Headers show


Herton Ronaldo Krzesinski - Nov. 13, 2012, 8:35 p.m.
This is a note to let you know that I have just added a patch titled

    netfilter: nfnetlink_log: fix NLA_PUT macro removal bug

to the linux-3.5.y-queue branch of the 3.5.yuz extended stable tree 
which can be found at:;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.yuz tree, see



From 1aaaf2a38140c29c0cc84c991b81bd1281bca3d6 Mon Sep 17 00:00:00 2001
From: Patrick McHardy <>
Date: Sun, 19 Aug 2012 10:16:08 +0000
Subject: [PATCH] netfilter: nfnetlink_log: fix NLA_PUT macro removal bug

commit 2dba62c30ec3040ef1b647a8976fd7e6854cc7a7 upstream.

Commit 1db20a52 (nfnetlink_log: Stop using NLA_PUT*().) incorrectly
converted a NLA_PUT_BE16 macro to nla_put_be32() in nfnetlink_log:

-               NLA_PUT_BE16(inst->skb, NFULA_HWTYPE, htons(skb->dev->type));
+               if (nla_put_be32(inst->skb, NFULA_HWTYPE, htons(skb->dev->type))

Signed-off-by: Patrick McHardy <>
Signed-off-by: Pablo Neira Ayuso <>
Acked-by: David S. Miller <>
Signed-off-by: Herton Ronaldo Krzesinski <>
 net/netfilter/nfnetlink_log.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index 3c3cfc0..bbc1d91 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -476,7 +476,7 @@  __build_packet_message(struct nfulnl_instance *inst,

 	if (indev && skb_mac_header_was_set(skb)) {
-		if (nla_put_be32(inst->skb, NFULA_HWTYPE, htons(skb->dev->type)) ||
+		if (nla_put_be16(inst->skb, NFULA_HWTYPE, htons(skb->dev->type)) ||
 		    nla_put_be16(inst->skb, NFULA_HWLEN,
 				 htons(skb->dev->hard_header_len)) ||
 		    nla_put(inst->skb, NFULA_HWHEADER, skb->dev->hard_header_len,