Commit 3b686a4bde for frr

commit 3b686a4bded94c75e949bd5f2ec86beee261ead9
Author: Donald Sharp <sharpd@nvidia.com>
Date:   Sun Oct 18 12:43:08 2026 -0400

    lib: Stop accepting vty/vtysh connections early in shutdown

    Currently this is happening:

    a) Large number of routes in zebra
    b) Told to shutdown
    c) processing shutdown
    d) Some other process sends a show command over route-maps
    e) <crashes>

    The long and short of it is that the routemap_terminate
    code is cleaning up the hash table that holds all route-map
    information.  Then after that zebra is processing the
    shutdown and another process enters some show route-map
    command, that crashes on the pointer assumed to be non NULL.

    Let's just modify the code to stop allowing *new* vty/vtysh
    connections early in shutdown.  This will do two things
    1) prevent any crashes from new vty/vtysh commands entering
    commands where we assume data is still good to go
    2) Speed up shutdown when this happens since we are not
    processing commands.

    Signed-off-by: Donald Sharp <sharpd@nvidia.com>

diff --git a/lib/libfrr.c b/lib/libfrr.c
index 3d3c558656..d5225e6e00 100644
--- a/lib/libfrr.c
+++ b/lib/libfrr.c
@@ -1260,6 +1260,7 @@ void frr_run(struct event_loop *loop)

 void frr_early_fini(void)
 {
+	frr_vty_serv_stop();
 	hook_call(frr_early_fini);
 }