]> git.proxmox.com Git - mirror_frr.git/blobdiff - nhrpd/netlink_arp.c
Merge pull request #10701 from rampxxxx/feat_isis_json_show_cmds
[mirror_frr.git] / nhrpd / netlink_arp.c
index 0a618056d5ed1d984b512ff9beb9c481d4c0e2cc..cd7fb7aed496120f215718232fe225b5611f141d 100644 (file)
@@ -100,7 +100,7 @@ static void netlink_log_indication(struct nlmsghdr *msg, struct zbuf *zb)
        nhrp_peer_send_indication(ifp, htons(pkthdr->hw_protocol), &pktpl);
 }
 
-static int netlink_log_recv(struct thread *t)
+static void netlink_log_recv(struct thread *t)
 {
        uint8_t buf[ZNL_BUFFER_SIZE];
        int fd = THREAD_FD(t);
@@ -124,8 +124,6 @@ static int netlink_log_recv(struct thread *t)
 
        thread_add_read(master, netlink_log_recv, 0, netlink_log_fd,
                        &netlink_log_thread);
-
-       return 0;
 }
 
 void netlink_set_nflog_group(int nlgroup)
@@ -147,7 +145,7 @@ void netlink_set_nflog_group(int nlgroup)
        }
 }
 
-void nhrp_neighbor_operation(ZAPI_CALLBACK_ARGS)
+int nhrp_neighbor_operation(ZAPI_CALLBACK_ARGS)
 {
        union sockunion addr = {}, lladdr = {};
        struct interface *ifp;
@@ -157,7 +155,7 @@ void nhrp_neighbor_operation(ZAPI_CALLBACK_ARGS)
 
        zclient_neigh_ip_decode(zclient->ibuf, &api);
        if (api.ip_in.ipa_type == AF_UNSPEC)
-               return;
+               return 0;
        sockunion_family(&addr) = api.ip_in.ipa_type;
        memcpy((uint8_t *)sockunion_get_addr(&addr), &api.ip_in.ip.addr,
               family2addrsize(api.ip_in.ipa_type));
@@ -172,10 +170,10 @@ void nhrp_neighbor_operation(ZAPI_CALLBACK_ARGS)
        ndm_state = api.ndm_state;
 
        if (!ifp)
-               return;
+               return 0;
        c = nhrp_cache_get(ifp, &addr, 0);
        if (!c)
-               return;
+               return 0;
        debugf(NHRP_DEBUG_KERNEL,
               "Netlink: %s %pSU dev %s lladdr %pSU nud 0x%x cache used %u type %u",
               (cmd == ZEBRA_NHRP_NEIGH_GET)
@@ -200,4 +198,5 @@ void nhrp_neighbor_operation(ZAPI_CALLBACK_ARGS)
                        : ZEBRA_NEIGH_STATE_FAILED;
                nhrp_cache_set_used(c, state == ZEBRA_NEIGH_STATE_REACHABLE);
        }
+       return 0;
 }