From ac40c888c21c72ae7f6c3d329dd2ba5417eec009 Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Sat, 2 Oct 1999 10:44:48 +0000 Subject: Obvious bugs in authentication fixed. --- proto/rip/auth.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'proto/rip/auth.c') 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; -- cgit v1.2.3