diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2014-10-24 10:27:21 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2014-10-24 11:07:38 +0200 |
commit | f8fefde318c6248ad94e7b6d60155deed9ab8eed (patch) | |
tree | 4edd3eb9b152f016afc2482555fb62b04f96eeb2 /proto/rip | |
parent | 78342404ff573e85e396f0611014b90cea9b4c0a (diff) |
Refactoring of OSPF messages.
Diffstat (limited to 'proto/rip')
-rw-r--r-- | proto/rip/auth.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/proto/rip/auth.c b/proto/rip/auth.c index b7b0611e..5634547a 100644 --- a/proto/rip/auth.c +++ b/proto/rip/auth.c @@ -95,7 +95,7 @@ rip_incoming_authentication( struct proto *p, struct rip_block_auth *block, stru } memcpy(md5sum_packet, tail->md5, 16); - password_cpy(tail->md5, pass->password, 16); + strncpy(tail->md5, pass->password, 16); MD5Init(&ctxt); MD5Update(&ctxt, (char *) packet, ntohs(block->packetlen) + sizeof(struct rip_block_auth) ); @@ -131,7 +131,7 @@ rip_outgoing_authentication( struct proto *p, struct rip_block_auth *block, stru block->mustbeFFFF = 0xffff; switch (P_CF->authtype) { case AT_PLAINTEXT: - password_cpy( (char *) (&block->packetlen), passwd->password, 16); + strncpy( (char *) (&block->packetlen), passwd->password, 16); return PACKETLEN(num); case AT_MD5: { @@ -156,7 +156,7 @@ rip_outgoing_authentication( struct proto *p, struct rip_block_auth *block, stru tail->mustbeFFFF = 0xffff; tail->mustbe0001 = 0x0100; - password_cpy(tail->md5, passwd->password, 16); + strncpy(tail->md5, passwd->password, 16); MD5Init(&ctxt); MD5Update(&ctxt, (char *) packet, PACKETLEN(num) + sizeof(struct rip_md5_tail)); MD5Final(tail->md5, &ctxt); |