]> git.proxmox.com Git - mirror_kronosnet.git/commitdiff
[host] Never mark loopback-connected hosts as unreachable
authorChristine Caulfield <ccaulfie@redhat.com>
Tue, 19 Sep 2017 14:36:57 +0000 (15:36 +0100)
committerChristine Caulfield <ccaulfie@redhat.com>
Tue, 19 Sep 2017 14:36:57 +0000 (15:36 +0100)
There's no point in checking the links of a host with a LOOPBACK
link - it's always up and reachable.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
libknet/host.c

index e84b57926fb8d302a4b8db0d49990206d9ade687..20308a4168b87004bbc57dcbe5cf2d5ab522a6be 100644 (file)
@@ -649,8 +649,12 @@ int _host_dstcache_update_sync(knet_handle_t knet_h, struct knet_host *host)
        int best_priority = -1;
        int reachable = 0;
 
-       host->active_link_entries = 0;
+       if (knet_h->host_id == host->host_id && knet_h->has_loop_link) {
+               host->active_link_entries = 1;
+               return 0;
+       }
 
+       host->active_link_entries = 0;
        for (link_idx = 0; link_idx < KNET_MAX_LINK; link_idx++) {
                if (host->link[link_idx].status.enabled != 1) /* link is not enabled */
                        continue;