]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ripd: remove vty configuration lock
authorRenato Westphal <renato@opensourcerouting.org>
Mon, 28 May 2018 13:18:37 +0000 (10:18 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Sat, 27 Oct 2018 18:16:12 +0000 (16:16 -0200)
The vty configuration lock is used to prevent inconsistencies when
multiple users are editing the configuration at the same time. The
pointer stored in vty->index might become invalid if the associated
configuration object is removed by another user in another CLI session.

Commands converted to the new northbound model don't use vty->index,
but vty->xpath_index and the vty->xpath array. The nb_cli_cfg_change()
function uses the VTY_CHECK_XPATH macro to check if the configuration
object being edited still exists and returns an error if it doesn't.

Now that all ripd commands were converted to the new northbound model,
remove the ripd vty lock because it's not necessary anymore.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
ripd/rip_main.c

index 5db9c4b7e9e0250d9240a9404d5163de9db210e6..4ee5994a9d1176438912b467d9f9541df526fd21 100644 (file)
@@ -165,6 +165,8 @@ int main(int argc, char **argv)
                }
        }
 
+       vty_config_lockless();
+
        /* Prepare master thread. */
        master = frr_init();