diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2008-11-08 17:24:23 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2008-11-08 17:24:23 +0100 |
commit | b21f68b4cd4794c84e5f0eb2c34204c87ccf0e9a (patch) | |
tree | 2bbf675877333084f912c5b18eae34eb247851b3 /proto/rip/config.Y | |
parent | 08cca48a149bd6d5210659daf220b6dae87a43b3 (diff) |
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/config.Y')
-rw-r--r-- | proto/rip/config.Y | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/proto/rip/config.Y b/proto/rip/config.Y index bd303e97..f1ae43cb 100644 --- a/proto/rip/config.Y +++ b/proto/rip/config.Y @@ -34,7 +34,7 @@ CF_KEYWORDS(RIP, INFINITY, METRIC, PORT, PERIOD, GARBAGE, TIMEOUT, PASSWORDS, CF_GRAMMAR -CF_ADDTO(proto, rip_cfg '}') +CF_ADDTO(proto, rip_cfg '}' { RIP_CFG->passwords = get_passwords(); } ) rip_cfg_start: proto_start RIP { this_proto = proto_config_new(&proto_rip, sizeof(struct rip_proto_config)); @@ -51,7 +51,7 @@ rip_cfg: | rip_cfg GARBAGE TIME expr ';' { RIP_CFG->garbage_time = $4; } | rip_cfg TIMEOUT TIME expr ';' { RIP_CFG->timeout_time = $4; } | rip_cfg AUTHENTICATION rip_auth ';' {RIP_CFG->authtype = $3; } - | rip_cfg password_list ';' {RIP_CFG->passwords = (list *)$2; } + | rip_cfg password_list ';' | rip_cfg HONOR ALWAYS ';' { RIP_CFG->honor = HO_ALWAYS; } | rip_cfg HONOR NEIGHBOR ';' { RIP_CFG->honor = HO_NEIGHBOR; } | rip_cfg HONOR NEVER ';' { RIP_CFG->honor = HO_NEVER; } |