diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2015-10-05 12:14:50 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2015-10-05 13:18:10 +0200 |
commit | 8465dccb06afffed171dc1e224e4eb5f67cc3326 (patch) | |
tree | 9e5209b312ba8b7eabd0f5a22aea4a0888cd8c9f /nest/password.c | |
parent | c7b99a932cab1873042e356143ab71755920157a (diff) |
Major RIP redesign
The new RIP implementation fixes plenty of old bugs and also adds support
for many new features: ECMP support, link state support, BFD support,
configurable split horizon and more. Most options are now per-interface.
Diffstat (limited to 'nest/password.c')
-rw-r--r-- | nest/password.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/nest/password.c b/nest/password.c index 21e42e0e..91aaa418 100644 --- a/nest/password.c +++ b/nest/password.c @@ -51,3 +51,18 @@ password_find_by_id(list *l, int id) return NULL; } +struct password_item * +password_find_by_value(list *l, char *pass, uint size) +{ + struct password_item *pi; + + if (!l) + return NULL; + + WALK_LIST(pi, *l) + if (password_verify(pi, pass, size) && (pi->accfrom <= now_real) && (now_real < pi->accto)) + return pi; + + return NULL; +} + |