Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328082
b: refs/heads/master
c: ba8d3b0
h: refs/heads/master
v: v3
  • Loading branch information
Pablo Neira Ayuso committed Sep 24, 2012
1 parent bb208fb commit ea76d68
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 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: 7be54ca4764bdead40bee7b645a72718c20ff2c8
refs/heads/master: ba8d3b0bf5900b9ee5354e7d73358867763a6766
10 changes: 7 additions & 3 deletions trunk/net/netfilter/nfnetlink_queue_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,9 +526,13 @@ nfqnl_set_mode(struct nfqnl_instance *queue,

case NFQNL_COPY_PACKET:
queue->copy_mode = mode;
/* we're using struct nlattr which has 16bit nla_len */
if (range > 0xffff)
queue->copy_range = 0xffff;
/* We're using struct nlattr which has 16bit nla_len. Note that
* nla_len includes the header length. Thus, the maximum packet
* length that we support is 65531 bytes. We send truncated
* packets if the specified length is larger than that.
*/
if (range > 0xffff - NLA_HDRLEN)
queue->copy_range = 0xffff - NLA_HDRLEN;
else
queue->copy_range = range;
break;
Expand Down

0 comments on commit ea76d68

Please sign in to comment.