]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/kernel_socket.c
*: Change thread->func to return void instead of int
[mirror_frr.git] / zebra / kernel_socket.c
index 5ff66f7c63371a8aa9c73d0999e633cef44e610c..53b7a21d32d648cbf5b4efffe6f6e91365e0af66 100644 (file)
@@ -1113,7 +1113,7 @@ void rtm_read(struct rt_msghdr *rtm)
            || rtm->rtm_type == RTM_CHANGE)
                rib_add(afi, SAFI_UNICAST, VRF_DEFAULT, ZEBRA_ROUTE_KERNEL, 0,
                        zebra_flags, &p, NULL, &nh, 0, RT_TABLE_MAIN,
-                       0, 0, 0, 0);
+                       0, 0, 0, 0, false);
        else
                rib_delete(afi, SAFI_UNICAST, VRF_DEFAULT, ZEBRA_ROUTE_KERNEL,
                           0, zebra_flags, &p, NULL, &nh, 0, RT_TABLE_MAIN, 0,
@@ -1292,7 +1292,7 @@ static void rtmsg_debug(struct rt_msghdr *rtm)
 #endif /* RTAX_MAX */
 
 /* Kernel routing table and interface updates via routing socket. */
-static int kernel_read(struct thread *thread)
+static void kernel_read(struct thread *thread)
 {
        int sock;
        int nbytes;
@@ -1356,11 +1356,11 @@ static int kernel_read(struct thread *thread)
                if (errno != EAGAIN && errno != EWOULDBLOCK)
                        flog_err_sys(EC_LIB_SOCKET, "routing socket error: %s",
                                     safe_strerror(errno));
-               return 0;
+               return;
        }
 
        if (nbytes == 0)
-               return 0;
+               return;
 
        thread_add_read(zrouter.master, kernel_read, NULL, sock, NULL);
 
@@ -1377,7 +1377,7 @@ static int kernel_read(struct thread *thread)
                zlog_debug(
                        "kernel_read: rtm->rtm_msglen %d, nbytes %d, type %d",
                        rtm->rtm_msglen, nbytes, rtm->rtm_type);
-               return -1;
+               return;
        }
 
        switch (rtm->rtm_type) {
@@ -1403,7 +1403,6 @@ static int kernel_read(struct thread *thread)
                        zlog_debug("Unprocessed RTM_type: %d", rtm->rtm_type);
                break;
        }
-       return 0;
 }
 
 /* Make routing socket. */
@@ -1459,6 +1458,20 @@ void kernel_terminate(struct zebra_ns *zns, bool complete)
        return;
 }
 
+/*
+ * Global init for platform-/OS-specific things
+ */
+void kernel_router_init(void)
+{
+}
+
+/*
+ * Global deinit for platform-/OS-specific things
+ */
+void kernel_router_terminate(void)
+{
+}
+
 /*
  * Called by the dplane pthread to read incoming OS messages and dispatch them.
  */