]> git.proxmox.com Git - mirror_frr.git/blobdiff - nhrpd/nhrp_peer.c
staticd: Do not ready prefix for printing till it's decoded
[mirror_frr.git] / nhrpd / nhrp_peer.c
index e051830f8524681ea0ab0daa848dac472dd403ad..db2f72ac2211e4d4e19ba320c9e51f6448f151c9 100644 (file)
@@ -157,10 +157,11 @@ static unsigned int nhrp_peer_key(void *peer_data)
        return sockunion_hash(&p->vc->remote.nbma);
 }
 
-static int nhrp_peer_cmp(const void *cache_data, const void *key_data)
+static bool nhrp_peer_cmp(const void *cache_data, const void *key_data)
 {
        const struct nhrp_peer *a = cache_data;
        const struct nhrp_peer *b = key_data;
+
        return a->ifp == b->ifp && a->vc == b->vc;
 }
 
@@ -814,8 +815,9 @@ static void nhrp_packet_debug(struct zbuf *zb, const char *dir)
 
        reply = packet_types[hdr->type].type == PACKET_REPLY;
        debugf(NHRP_DEBUG_COMMON, "%s %s(%d) %s -> %s", dir,
-              packet_types[hdr->type].name ?: "Unknown", hdr->type,
-              reply ? buf[1] : buf[0], reply ? buf[0] : buf[1]);
+              (packet_types[hdr->type].name ? packet_types[hdr->type].name
+                                            : "Unknown"),
+              hdr->type, reply ? buf[1] : buf[0], reply ? buf[0] : buf[1]);
 }
 
 static int proto2afi(uint16_t proto)