Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314642
b: refs/heads/master
c: c2bd4ba
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Jun 27, 2012
1 parent a28d085 commit d100570
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d106352d9f527fe336749ad89de7e07e5af91a68
refs/heads/master: c2bd4baf410dafeba6aff8ca1cae94344551b0a3
15 changes: 8 additions & 7 deletions trunk/net/ipv4/netfilter/ipt_ULOG.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,15 @@ static void ipt_ulog_packet(unsigned int hooknum,

pr_debug("qlen %d, qthreshold %Zu\n", ub->qlen, loginfo->qthreshold);

/* NLMSG_PUT contains a hidden goto nlmsg_failure !!! */
nlh = NLMSG_PUT(ub->skb, 0, ub->qlen, ULOG_NL_EVENT,
sizeof(*pm)+copy_len);
nlh = nlmsg_put(ub->skb, 0, ub->qlen, ULOG_NL_EVENT,
sizeof(*pm)+copy_len, 0);
if (!nlh) {
pr_debug("error during nlmsg_put\n");
goto out_unlock;
}
ub->qlen++;

pm = NLMSG_DATA(nlh);
pm = nlmsg_data(nlh);

/* We might not have a timestamp, get one */
if (skb->tstamp.tv64 == 0)
Expand Down Expand Up @@ -261,13 +264,11 @@ static void ipt_ulog_packet(unsigned int hooknum,
nlh->nlmsg_type = NLMSG_DONE;
ulog_send(groupnum);
}

out_unlock:
spin_unlock_bh(&ulog_lock);

return;

nlmsg_failure:
pr_debug("error during NLMSG_PUT\n");
alloc_failure:
pr_debug("Error building netlink message\n");
spin_unlock_bh(&ulog_lock);
Expand Down

0 comments on commit d100570

Please sign in to comment.