summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_keepalives.c
diff options
context:
space:
mode:
authorChirag Shah <chirag@cumulusnetworks.com>2018-07-26 23:20:54 +0200
committerChirag Shah <chirag@cumulusnetworks.com>2018-07-28 06:04:47 +0200
commita9198bc1e272f6b5be3ff08354ae41a67685b409 (patch)
treeec8f6601921f7fc508ce619d2808dbfe3e179d45 /bgpd/bgp_keepalives.c
parentMerge pull request #2743 from donaldsharp/bgp_null_stuff (diff)
downloadfrr-a9198bc1e272f6b5be3ff08354ae41a67685b409.tar.xz
frr-a9198bc1e272f6b5be3ff08354ae41a67685b409.zip
bgpd: add keepalive thread name
Testing Done: Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_keepalives.c')
-rw-r--r--bgpd/bgp_keepalives.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/bgpd/bgp_keepalives.c b/bgpd/bgp_keepalives.c
index 1504893c4..3216683a5 100644
--- a/bgpd/bgp_keepalives.c
+++ b/bgpd/bgp_keepalives.c
@@ -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);