From b21b19c5785487f2ff4a6ce38f45c2e6c35f4363 Mon Sep 17 00:00:00 2001 From: paul Date: Sun, 15 Jun 2003 01:28:29 +0000 Subject: 2003-06-15 Paul Jakma * lib/vty.{c,h}: Remove vty layer depending on a 'master' global, pass the thread master in explicitly to vty_init. Sort out some header dependency problems with lib/command.h * zebra/: Move globals to struct zebrad. Update vty_init(). * (.*)/\1_main.c: update call to vty_init(). --- zebra/rt_netlink.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'zebra/rt_netlink.c') diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index e1514623..6a3df192 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -66,7 +66,7 @@ struct message nlmsg_str[] = {0, NULL} }; -extern int rtm_table_default; +extern struct zebra_t zebrad; extern struct zebra_privs_t zserv_privs; @@ -615,7 +615,7 @@ netlink_routing_table (struct sockaddr_nl *snl, struct nlmsghdr *h) table = rtm->rtm_table; #if 0 /* we weed them out later in rib_weed_tables () */ - if (table != RT_TABLE_MAIN && table != rtm_table_default) + if (table != RT_TABLE_MAIN && table != zebrad.rtm_table_default) return 0; #endif @@ -734,7 +734,7 @@ netlink_route_change (struct sockaddr_nl *snl, struct nlmsghdr *h) } table = rtm->rtm_table; - if (table != RT_TABLE_MAIN && table != rtm_table_default) + if (table != RT_TABLE_MAIN && table != zebrad.rtm_table_default) { return 0; } @@ -1600,7 +1600,7 @@ kernel_read (struct thread *thread) sock = THREAD_FD (thread); ret = netlink_parse_info (netlink_information_fetch, &netlink); - thread_add_read (master, kernel_read, NULL, netlink.sock); + thread_add_read (zebrad.master, kernel_read, NULL, netlink.sock); return 0; } @@ -1621,5 +1621,5 @@ kernel_init () /* Register kernel socket. */ if (netlink.sock > 0) - thread_add_read (master, kernel_read, NULL, netlink.sock); + thread_add_read (zebrad.master, kernel_read, NULL, netlink.sock); } -- cgit v1.2.1