Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66824
b: refs/heads/master
c: d63b043
h: refs/heads/master
v: v3
  • Loading branch information
Michal Miroslaw authored and David S. Miller committed Oct 10, 2007
1 parent 0803bda commit 986fbd2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 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: e35670614d10588fb9c6ed32ecd55b8242e98872
refs/heads/master: d63b043d955c261f4f413eecf6e0488d7459acd4
9 changes: 5 additions & 4 deletions trunk/net/netfilter/nfnetlink_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,9 +644,8 @@ nfulnl_log_packet(unsigned int pf,
goto unlock_and_release;
}

if (inst->qlen >= qthreshold ||
(inst->skb && size >
skb_tailroom(inst->skb) - sizeof(struct nfgenmsg))) {
if (inst->skb &&
size > skb_tailroom(inst->skb) - sizeof(struct nfgenmsg)) {
/* either the queue len is too high or we don't have
* enough room in the skb left. flush to userspace. */
UDEBUG("flushing old skb\n");
Expand All @@ -666,9 +665,11 @@ nfulnl_log_packet(unsigned int pf,
__build_packet_message(inst, skb, data_len, pf,
hooknum, in, out, li, prefix, plen);

if (inst->qlen >= qthreshold)
__nfulnl_flush(inst);
/* timer_pending always called within inst->lock, so there
* is no chance of a race here */
if (!timer_pending(&inst->timer)) {
else if (!timer_pending(&inst->timer)) {
instance_get(inst);
inst->timer.expires = jiffies + (inst->flushtimeout*HZ/100);
add_timer(&inst->timer);
Expand Down

0 comments on commit 986fbd2

Please sign in to comment.