summaryrefslogtreecommitdiff
path: root/proto/rip/auth.c
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>1999-11-25 15:03:12 +0000
committerPavel Machek <pavel@ucw.cz>1999-11-25 15:03:12 +0000
commit1a509a6310cb2a5211bf3ac9fd963f06d9109cb1 (patch)
tree20f0c934acd44acd6ec17df927ef326bdb5c4c6f /proto/rip/auth.c
parentd3702d57fd5357e9a11ada6c46769a79da8e547a (diff)
md5 authentication seems to work.
Diffstat (limited to 'proto/rip/auth.c')
-rw-r--r--proto/rip/auth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/proto/rip/auth.c b/proto/rip/auth.c
index ccdcd56f..17c8d3a6 100644
--- a/proto/rip/auth.c
+++ b/proto/rip/auth.c
@@ -56,7 +56,7 @@ rip_incoming_authentication( struct proto *p, struct rip_block_auth *block, stru
struct password_item *head;
struct rip_md5_tail *tail;
- if (block->packetlen != PACKETLEN(num) + 20) {
+ if (block->packetlen != PACKETLEN(num)) {
log( L_ERR "packetlen in md5 does not match computed value\n" );
return 1;
}
@@ -145,7 +145,7 @@ rip_outgoing_authentication( struct proto *p, struct rip_block_auth *block, stru
MD5Init(&ctxt);
MD5Update(&ctxt, (char *) packet, block->packetlen );
MD5Final((char *) (&tail->md5), &ctxt);
- return block->packetlen;
+ return PACKETLEN(num) + block->authlen;
}
default:
bug( "Uknown authtype in outgoing authentication?\n" );