Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194892
b: refs/heads/master
c: 606a9a0
h: refs/heads/master
v: v3
  • Loading branch information
Tim Gardner authored and Patrick McHardy committed Mar 17, 2010
1 parent 732ce77 commit 027710d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0079c5aee34880bcee7feee9960f0502c73dc5fa
refs/heads/master: 606a9a02633c02d0e09fc96706f041053dbc57ee
3 changes: 3 additions & 0 deletions trunk/include/linux/netfilter/xt_recent.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ enum {
/* Only allowed with --rcheck and --update */
#define XT_RECENT_MODIFIERS (XT_RECENT_TTL|XT_RECENT_REAP)

#define XT_RECENT_VALID_FLAGS (XT_RECENT_CHECK|XT_RECENT_SET|XT_RECENT_UPDATE|\
XT_RECENT_REMOVE|XT_RECENT_TTL|XT_RECENT_REAP)

struct xt_recent_mtinfo {
__u32 seconds;
__u32 hit_count;
Expand Down
5 changes: 5 additions & 0 deletions trunk/net/netfilter/xt_recent.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,11 @@ static bool recent_mt_check(const struct xt_mtchk_param *par)
get_random_bytes(&hash_rnd, sizeof(hash_rnd));
hash_rnd_inited = true;
}
if (info->check_set & ~XT_RECENT_VALID_FLAGS) {
pr_info(KBUILD_MODNAME ": Unsupported user space flags "
"(%08x)\n", info->check_set);
return false;
}
if (hweight8(info->check_set &
(XT_RECENT_SET | XT_RECENT_REMOVE |
XT_RECENT_CHECK | XT_RECENT_UPDATE)) != 1)
Expand Down

0 comments on commit 027710d

Please sign in to comment.