]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: add keepalive thread name
authorChirag Shah <chirag@cumulusnetworks.com>
Thu, 26 Jul 2018 21:20:54 +0000 (14:20 -0700)
committerChirag Shah <chirag@cumulusnetworks.com>
Sat, 28 Jul 2018 04:04:47 +0000 (21:04 -0700)
Testing Done:

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
bgpd/bgp_keepalives.c

index 1504893c472a105ac30f003bf352dc73811f1faf..3216683a54878d264f7ba17742031d778a02716e 100644 (file)
@@ -180,6 +180,12 @@ void *bgp_keepalives_start(void *arg)
        pthread_cond_init(peerhash_cond, &attrs);
        pthread_condattr_destroy(&attrs);
 
+#ifdef GNU_LINUX
+       pthread_setname_np(fpt->thread, "bgpd_ka");
+#elif defined(OPEN_BSD)
+       pthread_set_name_np(fpt->thread, "bgpd_ka");
+#endif
+
        /* initialize peer hashtable */
        peerhash = hash_create_size(2048, peer_hash_key, peer_hash_cmp, NULL);
        pthread_mutex_lock(peerhash_mtx);