summaryrefslogtreecommitdiffstats
path: root/proto/rip/auth.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2008-11-08 17:24:23 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2008-11-08 17:24:23 +0100
commitb21f68b4cd4794c84e5f0eb2c34204c87ccf0e9a (patch)
tree2bbf675877333084f912c5b18eae34eb247851b3 /proto/rip/auth.c
parent08cca48a149bd6d5210659daf220b6dae87a43b3 (diff)
downloadbird-b21f68b4cd4794c84e5f0eb2c34204c87ccf0e9a.tar
bird-b21f68b4cd4794c84e5f0eb2c34204c87ccf0e9a.zip
Fix bugs in OSPF MD5 authentication. First bug is that default
values for MD5 password ID changed during reconfigure, Second bug is that BIRD chooses password in first-fit manner, but RFC says that it should use the one with the latest generate-from. It also modifies the syntax for multiple passwords. Now it is possible to just add more 'password' statements to the interface section and it is not needed to use 'passwords' section. Old syntax can be used too.
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 1f7050f..b7b0611 100644
--- a/proto/rip/auth.c
+++ b/proto/rip/auth.c
@@ -39,7 +39,7 @@ rip_incoming_authentication( struct proto *p, struct rip_block_auth *block, stru
switch (ntohs(block->authtype)) { /* Authentication type */
case AT_PLAINTEXT:
{
- struct password_item *passwd = password_find(P_CF->passwords);
+ struct password_item *passwd = password_find(P_CF->passwords, 1);
DBG( "Plaintext passwd" );
if (!passwd) {
log( L_AUTH "No passwords set and password authentication came" );
@@ -115,7 +115,7 @@ rip_incoming_authentication( struct proto *p, struct rip_block_auth *block, stru
int
rip_outgoing_authentication( struct proto *p, struct rip_block_auth *block, struct rip_packet *packet, int num )
{
- struct password_item *passwd = password_find( P_CF->passwords);
+ struct password_item *passwd = password_find(P_CF->passwords, 1);
if (!P_CF->authtype)
return PACKETLEN(num);