Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66827
b: refs/heads/master
c: 6b6ec99
h: refs/heads/master
i:
  66825: 8599369
  66823: 0803bda
v: v3
  • Loading branch information
Michal Miroslaw authored and David S. Miller committed Oct 10, 2007
1 parent 8d592c4 commit 6f5e532
Show file tree
Hide file tree
Showing 2 changed files with 6 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: aace57e054e9322e20af52cede7de46ade64a5e2
refs/heads/master: 6b6ec99a03601aba0419f34e17630f7aa8d68e5f
12 changes: 5 additions & 7 deletions trunk/net/netfilter/nfnetlink_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@
#endif

#define NFULNL_NLBUFSIZ_DEFAULT NLMSG_GOODSIZE
#define NFULNL_TIMEOUT_DEFAULT 100 /* every second */
#define NFULNL_TIMEOUT_DEFAULT HZ /* every second */
#define NFULNL_QTHRESH_DEFAULT 100 /* 100 packets */
#define NFULNL_COPY_RANGE_MAX 0xFFFF /* max packet size is limited by 16-bit struct nfattr nfa_len field */

#define PRINTR(x, args...) do { if (net_ratelimit()) \
printk(x, ## args); } while (0);
Expand Down Expand Up @@ -171,7 +172,7 @@ instance_create(u_int16_t group_num, int pid)
inst->flushtimeout = NFULNL_TIMEOUT_DEFAULT;
inst->nlbufsiz = NFULNL_NLBUFSIZ_DEFAULT;
inst->copy_mode = NFULNL_COPY_PACKET;
inst->copy_range = 0xffff;
inst->copy_range = NFULNL_COPY_RANGE_MAX;

hlist_add_head(&inst->hlist,
&instance_table[instance_hashfn(group_num)]);
Expand Down Expand Up @@ -235,11 +236,8 @@ nfulnl_set_mode(struct nfulnl_instance *inst, u_int8_t mode,

case NFULNL_COPY_PACKET:
inst->copy_mode = mode;
/* we're using struct nlattr which has 16bit nfa_len */
if (range > 0xffff)
inst->copy_range = 0xffff;
else
inst->copy_range = range;
inst->copy_range = min_t(unsigned int,
range, NFULNL_COPY_RANGE_MAX);
break;

default:
Expand Down

0 comments on commit 6f5e532

Please sign in to comment.