]> git.proxmox.com Git - mirror_frr.git/commit - pathd/path_pcep_cli.c
*: explicitly print "exit" at the end of every node config
authorIgor Ryzhov <iryzhov@nfware.com>
Sun, 8 Aug 2021 19:38:50 +0000 (22:38 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Mon, 23 Aug 2021 19:08:20 +0000 (22:08 +0300)
commit07679ad98ab97a4b783f7ae54f88d4d70a5729de
treee2a670c3a68fb5b856cd52426c2f0b972a414bcb
parentac9103aadc4a3da65b30952d69fdc535ae87604f
*: explicitly print "exit" at the end of every node config

There is a possibility that the same line can be matched as a command in
some node and its parent node. In this case, when reading the config,
this line is always executed as a command of the child node.

For example, with the following config:
```
router ospf
 network 193.168.0.0/16 area 0
!
mpls ldp
 discovery hello interval 111
!
```
Line `mpls ldp` is processed as command `mpls ldp-sync` inside the
`router ospf` node. This leads to a complete loss of `mpls ldp` node
configuration.

To eliminate this issue and all possible similar issues, let's print an
explicit "exit" at the end of every node config.

This commit also changes indentation for a couple of existing exit
commands so that all existing commands are on the same level as their
corresponding node-entering commands.

Fixes #9206.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
39 files changed:
babeld/babel_interface.c
babeld/babeld.c
bfdd/bfdd_cli.c
bgpd/bgp_bmp.c
bgpd/bgp_rpki.c
bgpd/bgp_vty.c
bgpd/rfapi/bgp_rfapi_cfg.c
eigrpd/eigrp_cli.c
isisd/isis_circuit.c
isisd/isis_cli.c
isisd/isis_nb.c
isisd/isis_nb.h
isisd/isisd.c
ldpd/ldp_vty_conf.c
lib/if.c
lib/keychain.c
lib/nexthop_group.c
lib/routemap_cli.c
lib/vty.c
nhrpd/nhrp_vty.c
ospf6d/ospf6_interface.c
ospf6d/ospf6_top.c
ospfd/ospf_vty.c
pathd/path_cli.c
pathd/path_nb.c
pathd/path_nb.h
pathd/path_pcep_cli.c
pbrd/pbr_vty.c
pimd/pim_instance.c
pimd/pim_vty.c
ripd/ripd.c
ripngd/ripngd.c
staticd/static_vrf.c
tests/lib/cli/test_cli.refout.in
vtysh/vtysh_config.c
zebra/interface.c
zebra/zebra_pw.c
zebra/zebra_srv6_vty.c
zebra/zebra_vrf.c