Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144316
b: refs/heads/master
c: 37e55cf
h: refs/heads/master
v: v3
  • Loading branch information
Jan Engelhardt authored and Patrick McHardy committed Apr 24, 2009
1 parent cca3af8 commit eca2272
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 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: 71951b64a5a87c09eb6fde59ce51aaab2fdaeab2
refs/heads/master: 37e55cf0ceb8803256bf69a3e45bd668bf90b76f
9 changes: 4 additions & 5 deletions trunk/net/netfilter/xt_recent.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ static ssize_t recent_old_proc_write(struct file *file,
struct recent_table *t = pde->data;
struct recent_entry *e;
char buf[sizeof("+255.255.255.255")], *c = buf;
__be32 addr;
union nf_inet_addr addr = {};
int add;

if (size > sizeof(buf))
Expand Down Expand Up @@ -506,14 +506,13 @@ static ssize_t recent_old_proc_write(struct file *file,
add = 1;
break;
}
addr = in_aton(c);
addr.ip = in_aton(c);

spin_lock_bh(&recent_lock);
e = recent_entry_lookup(t, (const void *)&addr, NFPROTO_IPV4, 0);
e = recent_entry_lookup(t, &addr, NFPROTO_IPV4, 0);
if (e == NULL) {
if (add)
recent_entry_init(t, (const void *)&addr,
NFPROTO_IPV4, 0);
recent_entry_init(t, &addr, NFPROTO_IPV4, 0);
} else {
if (add)
recent_entry_update(t, e);
Expand Down

0 comments on commit eca2272

Please sign in to comment.