]> git.puffer.fish Git - matthieu/frr.git/commitdiff
babeld: fix hello packets not sent with configured hello timer
authorShbinging <bingshui@smail.nju.edu.cn>
Fri, 21 Mar 2025 02:57:28 +0000 (02:57 +0000)
committerShbinging <bingshui@smail.nju.edu.cn>
Tue, 25 Mar 2025 12:14:34 +0000 (20:14 +0800)
Same issue occurring as previously addressed in https://github.com/FRRouting/frr/pull/9092. The root cause is: "Sending a Hello message before restarting the hello timer to avoid session flaps in case of larger hello interval configurations."

Signed-off-by: Shbinging <bingshui@smail.nju.edu.cn>
babeld/babel_interface.c

index 2e0a51dd8cc110e1d93235ee1f4fc66ad94ac4fc..c99dadd083fdaee51015bad965a1c6f865f121c8 100644 (file)
@@ -366,12 +366,19 @@ DEFPY (babel_set_hello_interval,
 {
     VTY_DECLVAR_CONTEXT(interface, ifp);
     babel_interface_nfo *babel_ifp;
+    unsigned int old_interval;
 
     babel_ifp = babel_get_if_nfo(ifp);
     assert (babel_ifp != NULL);
 
+    old_interval = babel_ifp->hello_interval;
     babel_ifp->hello_interval = no ?
         BABEL_DEFAULT_HELLO_INTERVAL : hello_interval;
+
+    if (old_interval != babel_ifp->hello_interval){
+        set_timeout(&babel_ifp->hello_timeout, babel_ifp->hello_interval);
+        send_hello(ifp);
+    }
     return CMD_SUCCESS;
 }