]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: don't enqueue data with FPM socket closed 10725/head
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Wed, 9 Feb 2022 22:16:32 +0000 (19:16 -0300)
committerRafael F. Zalamena <rzalamena@opensourcerouting.org>
Mon, 14 Mar 2022 10:14:36 +0000 (07:14 -0300)
It will trigger an assert while trying to schedule the next write.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
zebra/dplane_fpm_nl.c

index 8c8004190bb2c7805fba73ccc5da83e44e313e76..4cd2bef30768dc5c0cb9fda164a24f5e6f6892af 100644 (file)
@@ -1232,7 +1232,8 @@ static void fpm_process_queue(struct thread *t)
                 * the output data in the STREAM_WRITEABLE
                 * check above, so we can ignore the return
                 */
-               (void)fpm_nl_enqueue(fnc, ctx);
+               if (fnc->socket != -1)
+                       (void)fpm_nl_enqueue(fnc, ctx);
 
                /* Account the processed entries. */
                processed_contexts++;