summaryrefslogtreecommitdiff
path: root/zebra/redistribute.c
diff options
context:
space:
mode:
authorpaul <paul>2003-06-15 01:28:29 +0000
committerpaul <paul>2003-06-15 01:28:29 +0000
commitb21b19c5785487f2ff4a6ce38f45c2e6c35f4363 (patch)
treec79f90ce7bd798b3f1391010153d9fdf7c7418f0 /zebra/redistribute.c
parent0e4f190ebf5a26e4b66fb49cd74ae0ff0c7e0863 (diff)
2003-06-15 Paul Jakma <paul@dishone.st>
* 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().
Diffstat (limited to 'zebra/redistribute.c')
-rw-r--r--zebra/redistribute.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/zebra/redistribute.c b/zebra/redistribute.c
index a3d4bad1..2d30f790 100644
--- a/zebra/redistribute.c
+++ b/zebra/redistribute.c
@@ -36,6 +36,9 @@
#include "zebra/redistribute.h"
#include "zebra/debug.h"
+/* master zebra server structure */
+extern struct zebra_t zebrad;
+
int
zebra_check_addr (struct prefix *p)
{
@@ -162,15 +165,13 @@ zebra_redistribute (struct zserv *client, int type)
#endif /* HAVE_IPV6 */
}
-extern list client_list;
-
void
redistribute_add (struct prefix *p, struct rib *rib)
{
listnode node;
struct zserv *client;
- for (node = listhead (client_list); node; nextnode (node))
+ for (node = listhead (zebrad.client_list); node; nextnode (node))
if ((client = getdata (node)) != NULL)
{
if (is_default (p))
@@ -207,7 +208,7 @@ redistribute_delete (struct prefix *p, struct rib *rib)
if (rib->distance == DISTANCE_INFINITY)
return;
- for (node = listhead (client_list); node; nextnode (node))
+ for (node = listhead (zebrad.client_list); node; nextnode (node))
if ((client = getdata (node)) != NULL)
{
if (is_default (p))
@@ -310,7 +311,7 @@ zebra_interface_up_update (struct interface *ifp)
if (IS_ZEBRA_DEBUG_EVENT)
zlog_info ("MESSAGE: ZEBRA_INTERFACE_UP %s", ifp->name);
- for (node = listhead (client_list); node; nextnode (node))
+ for (node = listhead (zebrad.client_list); node; nextnode (node))
if ((client = getdata (node)) != NULL)
zsend_interface_up (client, ifp);
}
@@ -325,7 +326,7 @@ zebra_interface_down_update (struct interface *ifp)
if (IS_ZEBRA_DEBUG_EVENT)
zlog_info ("MESSAGE: ZEBRA_INTERFACE_DOWN %s", ifp->name);
- for (node = listhead (client_list); node; nextnode (node))
+ for (node = listhead (zebrad.client_list); node; nextnode (node))
if ((client = getdata (node)) != NULL)
zsend_interface_down (client, ifp);
}
@@ -340,7 +341,7 @@ zebra_interface_add_update (struct interface *ifp)
if (IS_ZEBRA_DEBUG_EVENT)
zlog_info ("MESSAGE: ZEBRA_INTERFACE_ADD %s", ifp->name);
- for (node = listhead (client_list); node; nextnode (node))
+ for (node = listhead (zebrad.client_list); node; nextnode (node))
if ((client = getdata (node)) != NULL)
if (client->ifinfo)
zsend_interface_add (client, ifp);
@@ -355,7 +356,7 @@ zebra_interface_delete_update (struct interface *ifp)
if (IS_ZEBRA_DEBUG_EVENT)
zlog_info ("MESSAGE: ZEBRA_INTERFACE_DELETE %s", ifp->name);
- for (node = listhead (client_list); node; nextnode (node))
+ for (node = listhead (zebrad.client_list); node; nextnode (node))
if ((client = getdata (node)) != NULL)
if (client->ifinfo)
zsend_interface_delete (client, ifp);
@@ -379,7 +380,7 @@ zebra_interface_address_add_update (struct interface *ifp,
p->prefixlen, ifc->ifp->name);
}
- for (node = listhead (client_list); node; nextnode (node))
+ for (node = listhead (zebrad.client_list); node; nextnode (node))
if ((client = getdata (node)) != NULL)
if (client->ifinfo && CHECK_FLAG (ifc->conf, ZEBRA_IFC_REAL))
zsend_interface_address_add (client, ifp, ifc);
@@ -403,7 +404,7 @@ zebra_interface_address_delete_update (struct interface *ifp,
p->prefixlen, ifc->ifp->name);
}
- for (node = listhead (client_list); node; nextnode (node))
+ for (node = listhead (zebrad.client_list); node; nextnode (node))
if ((client = getdata (node)) != NULL)
if (client->ifinfo && CHECK_FLAG (ifc->conf, ZEBRA_IFC_REAL))
zsend_interface_address_delete (client, ifp, ifc);