diff options
| author | Alexander Chernavin <achernavin@netgate.com> | 2020-08-24 09:28:28 -0400 |
|---|---|---|
| committer | Alexander Chernavin <achernavin@netgate.com> | 2020-08-24 09:54:55 -0400 |
| commit | deb95b373ffbbadc11e02d23b718093592d8ac68 (patch) | |
| tree | 4c8e5f7cdeb2f61d0de7fa9fd97bfe2f0e22dfa6 | |
| parent | 310451ba9712f2d4483bd976a968cd4b6d19477f (diff) | |
lib, tools: fix reloading of key sub-context in key chains
When you add a key chain in the RIP configuration file and reload the
configurations via the frr-reload.py script, the script will fail and
the key chain will not appear in the running configuration. The reason
is that frr-reload.py doesn't recognize key as a sub-context.
Before this change, keys were generated this way:
key chain test
key 2
key-string 123
key 3
key-string 456
With this change, keys will be generated this way:
key chain test
key 2
key-string 123
exit
key 3
key-string 456
exit
This will allow frr-reload.py to see the key sub-context and correctly
reload them.
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
| -rw-r--r-- | lib/keychain.c | 2 | ||||
| -rwxr-xr-x | tools/frr-reload.py | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/keychain.c b/lib/keychain.c index 251211734b..82fd6a65f2 100644 --- a/lib/keychain.c +++ b/lib/keychain.c @@ -1041,6 +1041,8 @@ static int keychain_config_write(struct vty *vty) } vty_out(vty, "\n"); } + + vty_out(vty, " exit\n"); } vty_out(vty, "!\n"); } diff --git a/tools/frr-reload.py b/tools/frr-reload.py index a72e5c2772..8ffc313c04 100755 --- a/tools/frr-reload.py +++ b/tools/frr-reload.py @@ -591,6 +591,7 @@ end line.startswith("vnc l2-group") or line.startswith("vnc nve-group") or line.startswith("peer") or + line.startswith("key ") or line.startswith("member pseudowire")): main_ctx_key = [] |
