summaryrefslogtreecommitdiffstats
path: root/ospfd
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2021-04-06 21:26:51 +0200
committerMark Stapp <mjs@voltanet.io>2021-04-06 21:26:51 +0200
commit519b14645ebbbd803a1feb240a954ef7bc2c191d (patch)
treed8d06ae77d9504a3dc0b8a162f9a247b161aca20 /ospfd
parentMerge pull request #8405 from mjstapp/skip_backup_lsps (diff)
downloadfrr-519b14645ebbbd803a1feb240a954ef7bc2c191d.tar.xz
frr-519b14645ebbbd803a1feb240a954ef7bc2c191d.zip
ospfd: permit over-write of message-digest-key
Allow over-write of message-digest-key interface config. Most attributes handle multi-instance by ... ignoring instances, and tolerating repeated config: do the same for md5 auth. Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospf_vty.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index a1dac641d..92d13e616 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -7865,10 +7865,9 @@ DEFUN (ip_ospf_message_digest_key,
}
key_id = strtol(keyid, NULL, 10);
- if (ospf_crypt_key_lookup(params->auth_crypt, key_id) != NULL) {
- vty_out(vty, "OSPF: Key %d already exists\n", key_id);
- return CMD_WARNING;
- }
+
+ /* Remove existing key, if any */
+ ospf_crypt_key_delete(params->auth_crypt, key_id);
ck = ospf_crypt_key_new();
ck->key_id = (uint8_t)key_id;