diff --git a/bgpd/bgp_damp.c b/bgpd/bgp_damp.c
index 05c30ff..359fce3 100644
--- a/bgpd/bgp_damp.c
+++ b/bgpd/bgp_damp.c
@@ -115,7 +115,7 @@
     
   damp->t_reuse = NULL;
   damp->t_reuse =
-    thread_add_timer (master, bgp_reuse_timer, NULL, DELTA_REUSE);
+    thread_add_timer (bm->master, bgp_reuse_timer, NULL, DELTA_REUSE);
 
   t_now = bgp_clock ();
 
@@ -447,7 +447,7 @@
   /* Register reuse timer.  */
   if (! damp->t_reuse)
     damp->t_reuse = 
-      thread_add_timer (master, bgp_reuse_timer, NULL, DELTA_REUSE);
+      thread_add_timer (bm->master, bgp_reuse_timer, NULL, DELTA_REUSE);
 
   return 0;
 }
diff --git a/bgpd/bgp_dump.c b/bgpd/bgp_dump.c
index a3c9526..3d88dee 100644
--- a/bgpd/bgp_dump.c
+++ b/bgpd/bgp_dump.c
@@ -156,13 +156,13 @@
 	  secs_into_day = tm->tm_sec + 60*tm->tm_min + 60*60*tm->tm_hour;
 	  interval = interval - secs_into_day % interval; /* always > 0 */
 	}
-      bgp_dump->t_interval = thread_add_timer (master, bgp_dump_interval_func, 
+      bgp_dump->t_interval = thread_add_timer (bm->master, bgp_dump_interval_func,
 					       bgp_dump, interval);
     }
   else
     {
       /* One-off dump: execute immediately, don't affect any scheduled dumps */
-      bgp_dump->t_interval = thread_add_event (master, bgp_dump_interval_func,
+      bgp_dump->t_interval = thread_add_event (bm->master, bgp_dump_interval_func,
 					       bgp_dump, 0);
     }
 
diff --git a/bgpd/bgp_fsm.h b/bgpd/bgp_fsm.h
index a749f8e..752d6e2 100644
--- a/bgpd/bgp_fsm.h
+++ b/bgpd/bgp_fsm.h
@@ -26,7 +26,7 @@
 #define BGP_READ_ON(T,F,V)			\
   do {						\
     if (!(T) && (peer->status != Deleted))	\
-      THREAD_READ_ON(master,T,F,peer,V);	\
+      THREAD_READ_ON(bm->master,T,F,peer,V);	\
   } while (0)
 
 #define BGP_READ_OFF(T)				\
@@ -38,7 +38,7 @@
 #define BGP_WRITE_ON(T,F,V)			\
   do {						\
     if (!(T) && (peer->status != Deleted))	\
-      THREAD_WRITE_ON(master,(T),(F),peer,(V)); \
+      THREAD_WRITE_ON(bm->master,(T),(F),peer,(V)); \
   } while (0)
     
 #define BGP_WRITE_OFF(T)			\
@@ -50,7 +50,7 @@
 #define BGP_TIMER_ON(T,F,V)			\
   do {						\
     if (!(T) && (peer->status != Deleted))	\
-      THREAD_TIMER_ON(master,(T),(F),peer,(V)); \
+      THREAD_TIMER_ON(bm->master,(T),(F),peer,(V)); \
   } while (0)
 
 #define BGP_TIMER_OFF(T)			\
@@ -62,13 +62,13 @@
 #define BGP_EVENT_ADD(P,E)			\
   do {						\
     if ((P)->status != Deleted)			\
-      thread_add_event (master, bgp_event, (P), (E)); \
+      thread_add_event (bm->master, bgp_event, (P), (E)); \
   } while (0)
 
 #define BGP_EVENT_FLUSH(P)			\
   do { 						\
     assert (peer); 				\
-    thread_cancel_event (master, (P)); 		\
+    thread_cancel_event (bm->master, (P)); 	\
   } while (0)
 
 /* Prototypes. */
diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c
index 7c2988c..cacff23 100644
--- a/bgpd/bgp_main.c
+++ b/bgpd/bgp_main.c
@@ -105,9 +105,6 @@
 /* Route retain mode flag. */
 static int retain_mode = 0;
 
-/* Master of threads. */
-struct thread_master *master;
-
 /* Manually specified configuration file name.  */
 char *config_file = NULL;
 
@@ -302,8 +299,8 @@
     stream_free (bgp_nexthop_buf);
 
   /* reverse bgp_master_init */
-  if (master)
-    thread_master_free (master);
+  if (bm->master)
+    thread_master_free (bm->master);
 
   if (zlog_default)
     closezlog (zlog_default);
@@ -416,15 +413,12 @@
 	}
     }
 
-  /* Make thread master. */
-  master = bm->master;
-
   /* Initializations. */
   srandom (time (NULL));
-  signal_init (master, array_size(bgp_signals), bgp_signals);
+  signal_init (bm->master, array_size(bgp_signals), bgp_signals);
   zprivs_init (&bgpd_privs);
   cmd_init (1);
-  vty_init (master);
+  vty_init (bm->master);
   memory_init ();
   vrf_init ();
 
@@ -459,7 +453,7 @@
 	       bm->port);
 
   /* Start finite state machine, here we go! */
-  while (thread_fetch (master, &thread))
+  while (thread_fetch (bm->master, &thread))
     thread_call (&thread);
 
   /* Not reached. */
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
index 7059e8a..8621854 100644
--- a/bgpd/bgp_network.c
+++ b/bgpd/bgp_network.c
@@ -207,7 +207,7 @@
       zlog_err ("accept_sock is nevative value %d", accept_sock);
       return -1;
     }
-  listener->thread = thread_add_read (master, bgp_accept, listener, accept_sock);
+  listener->thread = thread_add_read (bm->master, bgp_accept, listener, accept_sock);
 
   /* Accept client connection. */
   bgp_sock = sockunion_accept (accept_sock, &su);
@@ -480,7 +480,7 @@
   listener = XMALLOC (MTYPE_BGP_LISTENER, sizeof(*listener));
   listener->fd = sock;
   memcpy(&listener->su, sa, salen);
-  listener->thread = thread_add_read (master, bgp_accept, listener, sock);
+  listener->thread = thread_add_read (bm->master, bgp_accept, listener, sock);
   listnode_add (bm->listen_sockets, listener);
 
   return 0;
diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c
index 183a28b..bb658af 100644
--- a/bgpd/bgp_nexthop.c
+++ b/bgpd/bgp_nexthop.c
@@ -529,7 +529,7 @@
 bgp_scan_timer (struct thread *t)
 {
   bgp_scan_thread =
-    thread_add_timer (master, bgp_scan_timer, NULL, bgp_scan_interval);
+    thread_add_timer (bm->master, bgp_scan_timer, NULL, bgp_scan_interval);
 
   if (BGP_DEBUG (events, EVENTS))
     zlog_debug ("Performing BGP general scanning");
@@ -1103,7 +1103,7 @@
   safi_t safi;
 
   bgp_import_thread = 
-    thread_add_timer (master, bgp_import, NULL, bgp_import_interval);
+    thread_add_timer (bm->master, bgp_import, NULL, bgp_import_interval);
 
   if (BGP_DEBUG (events, EVENTS))
     zlog_debug ("Import timer expired.");
@@ -1230,7 +1230,7 @@
     {
       thread_cancel (bgp_scan_thread);
       bgp_scan_thread = 
-	thread_add_timer (master, bgp_scan_timer, NULL, bgp_scan_interval);
+	thread_add_timer (bm->master, bgp_scan_timer, NULL, bgp_scan_interval);
     }
 
   return CMD_SUCCESS;
@@ -1249,7 +1249,7 @@
     {
       thread_cancel (bgp_scan_thread);
       bgp_scan_thread = 
-	thread_add_timer (master, bgp_scan_timer, NULL, bgp_scan_interval);
+	thread_add_timer (bm->master, bgp_scan_timer, NULL, bgp_scan_interval);
     }
 
   return CMD_SUCCESS;
@@ -1400,9 +1400,9 @@
 void
 bgp_scan_init (void)
 {
-  zlookup = zclient_new (master);
+  zlookup = zclient_new (bm->master);
   zlookup->sock = -1;
-  zlookup->t_connect = thread_add_event (master, zlookup_connect, zlookup, 0);
+  zlookup->t_connect = thread_add_event (bm->master, zlookup_connect, zlookup, 0);
 
   bgp_scan_interval = BGP_SCAN_INTERVAL_DEFAULT;
   bgp_import_interval = BGP_IMPORT_INTERVAL_DEFAULT;
@@ -1421,10 +1421,10 @@
 #endif /* HAVE_IPV6 */
 
   /* Make BGP scan thread. */
-  bgp_scan_thread = thread_add_timer (master, bgp_scan_timer, 
+  bgp_scan_thread = thread_add_timer (bm->master, bgp_scan_timer, 
                                       NULL, bgp_scan_interval);
   /* Make BGP import there. */
-  bgp_import_thread = thread_add_timer (master, bgp_import, NULL, 0);
+  bgp_import_thread = thread_add_timer (bm->master, bgp_import, NULL, 0);
 
   install_element (BGP_NODE, &bgp_scan_time_cmd);
   install_element (BGP_NODE, &no_bgp_scan_time_cmd);
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index af8bdb4..3fdd9ff 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -1978,7 +1978,7 @@
   if (name)
     bgp->name = strdup (name);
 
-  THREAD_TIMER_ON (master, bgp->t_startup, bgp_startup_timer_expire,
+  THREAD_TIMER_ON (bm->master, bgp->t_startup, bgp_startup_timer_expire,
                    bgp, bgp->restart_time);
 
   return bgp;
@@ -5421,7 +5421,7 @@
   bgp_vty_init ();
 
   /* Init zebra. */
-  bgp_zebra_init (master);
+  bgp_zebra_init (bm->master);
 
   /* BGP inits. */
   bgp_attr_init ();
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
index 7ae0acb..95c16de 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -834,8 +834,6 @@
 
 extern struct bgp_master *bm;
 
-extern struct thread_master *master;
-
 /* Prototypes. */
 extern void bgp_terminate (void);
 extern void bgp_reset (void);
