summaryrefslogtreecommitdiffstats
path: root/proto/rip/auth.c
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>1999-10-02 12:44:48 +0200
committerPavel Machek <pavel@ucw.cz>1999-10-02 12:44:48 +0200
commitac40c888c21c72ae7f6c3d329dd2ba5417eec009 (patch)
tree028e6a4399941eef43afbbf68812aec7fbc92c59 /proto/rip/auth.c
parent7db7b7db603a2d852066c313da76c72673a204fa (diff)
downloadbird-ac40c888c21c72ae7f6c3d329dd2ba5417eec009.tar
bird-ac40c888c21c72ae7f6c3d329dd2ba5417eec009.zip
Obvious bugs in authentication fixed.
Diffstat (limited to 'proto/rip/auth.c')
-rw-r--r--proto/rip/auth.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/proto/rip/auth.c b/proto/rip/auth.c
index 9dd26da..7d09f27 100644
--- a/proto/rip/auth.c
+++ b/proto/rip/auth.c
@@ -61,8 +61,10 @@ rip_incoming_authentication( struct proto *p, struct rip_block_auth *block, stru
head = P_CF->passwords;
while (head) {
/* FIXME: should check serial numbers, somehow */
+ DBG( "time, " );
if ((head->from > now) || (head->to < now))
- continue;
+ goto skip;
+ DBG( "check, " );
if (head->id == block->keyid) {
struct MD5Context ctxt;
char md5sum_packet[16];
@@ -77,7 +79,9 @@ rip_incoming_authentication( struct proto *p, struct rip_block_auth *block, stru
if (memcmp(md5sum_packet, md5sum_computed, 16))
return 1;
+ return 0;
}
+ skip:
head = head->next;
}
return 1;