summaryrefslogtreecommitdiff
path: root/src/odhcp6c.c
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2013-10-29 14:52:16 +0100
committerSteven Barth <steven@midlink.org>2013-10-29 14:52:16 +0100
commit6f0b2d5f806a73ae6464bc6904d0494d8204cd0d (patch)
tree8ef0bc4f217f03558eba7cc9fb5571e71a353625 /src/odhcp6c.c
parent0cff1df7566363e869979df49ec17292c2b1b986 (diff)
downloadodhcp6c-6f0b2d5f806a73ae6464bc6904d0494d8204cd0d.tar.gz
Fix RA spam filter logic
Diffstat (limited to 'src/odhcp6c.c')
-rw-r--r--src/odhcp6c.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/odhcp6c.c b/src/odhcp6c.c
index 2063935..506239d 100644
--- a/src/odhcp6c.c
+++ b/src/odhcp6c.c
@@ -466,7 +466,6 @@ bool odhcp6c_update_entry_safe(enum odhcp6c_state state, struct odhcp6c_entry *n
size_t len;
struct odhcp6c_entry *x = odhcp6c_find_entry(state, new);
struct odhcp6c_entry *start = odhcp6c_get_state(state, &len);
- bool changed = true;
if (x && x->valid > new->valid && new->valid < safe)
new->valid = safe;
@@ -477,7 +476,7 @@ bool odhcp6c_update_entry_safe(enum odhcp6c_state state, struct odhcp6c_entry *n
new->preferred >= x->preferred &&
new->preferred - x->preferred < 60 &&
x->class == new->class)
- changed = false;
+ return false;
x->valid = new->valid;
x->preferred = new->preferred;
x->t1 = new->t1;
@@ -489,7 +488,7 @@ bool odhcp6c_update_entry_safe(enum odhcp6c_state state, struct odhcp6c_entry *n
} else if (x) {
odhcp6c_remove_state(state, (x - start) * sizeof(*x), sizeof(*x));
}
- return changed;
+ return true;
}