diff options
| author | 2013-08-16 15:37:26 -0700 | |
|---|---|---|
| committer | 2013-08-16 15:37:26 -0700 | |
| commit | 2ff1cf12c9fe70e75e600404e6a4274b19d293ed (patch) | |
| tree | beafddac0a8098e3f07d2ec60e44a2a7d006e605 /net/netfilter/nfnetlink_log.c | |
| parent | netlink: Eliminate kmalloc in netlink dump operation. (diff) | |
| parent | Merge tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mturquette/linux (diff) | |
| download | linux-dev-2ff1cf12c9fe70e75e600404e6a4274b19d293ed.tar.xz linux-dev-2ff1cf12c9fe70e75e600404e6a4274b19d293ed.zip | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/netfilter/nfnetlink_log.c')
| -rw-r--r-- | net/netfilter/nfnetlink_log.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index 962e9792e317..d92cc317bf8b 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c @@ -419,6 +419,7 @@ __build_packet_message(struct nfnl_log_net *log, nfmsg->version = NFNETLINK_V0; nfmsg->res_id = htons(inst->group_num); + memset(&pmsg, 0, sizeof(pmsg)); pmsg.hw_protocol = skb->protocol; pmsg.hook = hooknum; @@ -498,7 +499,10 @@ __build_packet_message(struct nfnl_log_net *log, if (indev && skb->dev && skb->mac_header != skb->network_header) { struct nfulnl_msg_packet_hw phw; - int len = dev_parse_header(skb, phw.hw_addr); + int len; + + memset(&phw, 0, sizeof(phw)); + len = dev_parse_header(skb, phw.hw_addr); if (len > 0) { phw.hw_addrlen = htons(len); if (nla_put(inst->skb, NFULA_HWADDR, sizeof(phw), &phw)) |
