diff options
| -rw-r--r-- | babeld/babel_interface.c | 7 | ||||
| -rw-r--r-- | babeld/babel_zebra.c | 19 | ||||
| -rw-r--r-- | babeld/babel_zebra.h | 2 | ||||
| -rw-r--r-- | babeld/babeld.c | 4 | ||||
| -rw-r--r-- | babeld/kernel.c | 3 | ||||
| -rw-r--r-- | babeld/route.h | 1 | 
6 files changed, 19 insertions, 17 deletions
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c index c99dadd083..4653b96db4 100644 --- a/babeld/babel_interface.c +++ b/babeld/babel_interface.c @@ -755,8 +755,10 @@ babel_interface_close_all(void)      }      /* Disable babel redistribution */      for (type = 0; type < ZEBRA_ROUTE_MAX; type++) { -        zclient_redistribute (ZEBRA_REDISTRIBUTE_DELETE, zclient, AFI_IP, type, 0, VRF_DEFAULT); -        zclient_redistribute (ZEBRA_REDISTRIBUTE_DELETE, zclient, AFI_IP6, type, 0, VRF_DEFAULT); +        zclient_redistribute(ZEBRA_REDISTRIBUTE_DELETE, babel_zclient, AFI_IP, type, 0, +			     VRF_DEFAULT); +        zclient_redistribute(ZEBRA_REDISTRIBUTE_DELETE, babel_zclient, AFI_IP6, type, 0, +			     VRF_DEFAULT);      }  } @@ -974,6 +976,7 @@ DEFUN (show_babel_route,  {      struct route_stream *routes = NULL;      struct xroute_stream *xroutes = NULL; +      routes = route_stream(0);      if(routes) {          while(1) { diff --git a/babeld/babel_zebra.c b/babeld/babel_zebra.c index bead9f27ef..54f0f79aa0 100644 --- a/babeld/babel_zebra.c +++ b/babeld/babel_zebra.c @@ -19,7 +19,7 @@ void babelz_zebra_init(void);  /* we must use a pointer because of zclient.c's functions (new, free). */ -struct zclient *zclient; +struct zclient *babel_zclient;  /* Debug types */  static const struct { @@ -94,9 +94,10 @@ DEFUN (babel_redistribute_type,      }      if (!negate) -        zclient_redistribute (ZEBRA_REDISTRIBUTE_ADD, zclient, afi, type, 0, VRF_DEFAULT); +        zclient_redistribute(ZEBRA_REDISTRIBUTE_ADD, babel_zclient, afi, type, 0, VRF_DEFAULT);      else { -        zclient_redistribute (ZEBRA_REDISTRIBUTE_DELETE, zclient, afi, type, 0, VRF_DEFAULT); +        zclient_redistribute(ZEBRA_REDISTRIBUTE_DELETE, babel_zclient, afi, type, 0, +			     VRF_DEFAULT);          /* perhaps should we remove xroutes having the same type... */      }      return CMD_SUCCESS; @@ -230,11 +231,11 @@ static zclient_handler *const babel_handlers[] = {  void babelz_zebra_init(void)  { -    zclient = zclient_new(master, &zclient_options_default, babel_handlers, -			  array_size(babel_handlers)); -    zclient_init(zclient, ZEBRA_ROUTE_BABEL, 0, &babeld_privs); +    babel_zclient = zclient_new(master, &zclient_options_default, babel_handlers, +				array_size(babel_handlers)); +    zclient_init(babel_zclient, ZEBRA_ROUTE_BABEL, 0, &babeld_privs); -    zclient->zebra_connected = babel_zebra_connected; +    babel_zclient->zebra_connected = babel_zebra_connected;      install_element(BABEL_NODE, &babel_redistribute_type_cmd);      install_element(ENABLE_NODE, &debug_babel_cmd); @@ -248,6 +249,6 @@ void babelz_zebra_init(void)  void  babel_zebra_close_connexion(void)  { -    zclient_stop(zclient); -    zclient_free(zclient); +    zclient_stop(babel_zclient); +    zclient_free(babel_zclient);  } diff --git a/babeld/babel_zebra.h b/babeld/babel_zebra.h index 7f960d3961..0455bad7e1 100644 --- a/babeld/babel_zebra.h +++ b/babeld/babel_zebra.h @@ -8,7 +8,7 @@ Copyright 2011 by Matthieu Boutier and Juliusz Chroboczek  #include "vty.h" -extern struct zclient *zclient; +extern struct zclient *babel_zclient;  void babelz_zebra_init(void);  void babel_zebra_close_connexion(void); diff --git a/babeld/babeld.c b/babeld/babeld.c index 4e68f05df4..4dff01ba3a 100644 --- a/babeld/babeld.c +++ b/babeld/babeld.c @@ -108,8 +108,8 @@ babel_config_write (struct vty *vty)      /* list redistributed protocols */      for (afi = AFI_IP; afi <= AFI_IP6; afi++) {          for (i = 0; i < ZEBRA_ROUTE_MAX; i++) { -		if (i != zclient->redist_default && -		    vrf_bitmap_check(&zclient->redist[afi][i], VRF_DEFAULT)) { +		if (i != babel_zclient->redist_default && +		    vrf_bitmap_check(&babel_zclient->redist[afi][i], VRF_DEFAULT)) {  			vty_out(vty, " redistribute %s %s\n",  				(afi == AFI_IP) ? "ipv4" : "ipv6",  				zebra_route_string(i)); diff --git a/babeld/kernel.c b/babeld/kernel.c index 4957b04e77..ec562a9e93 100644 --- a/babeld/kernel.c +++ b/babeld/kernel.c @@ -176,8 +176,7 @@ zebra_route(int add, int family, const unsigned char *pref, unsigned short plen,      debugf(BABEL_DEBUG_ROUTE, "%s route (%s) to zebra",             add ? "adding" : "removing",             (family == AF_INET) ? "ipv4" : "ipv6"); -    return zclient_route_send (add ? ZEBRA_ROUTE_ADD : ZEBRA_ROUTE_DELETE, -                               zclient, &api); +    return zclient_route_send(add ? ZEBRA_ROUTE_ADD : ZEBRA_ROUTE_DELETE, babel_zclient, &api);  }  int diff --git a/babeld/route.h b/babeld/route.h index 89427b8415..ec050fd87b 100644 --- a/babeld/route.h +++ b/babeld/route.h @@ -38,7 +38,6 @@ struct babel_route {  struct route_stream; -extern struct babel_route **routes;  extern int kernel_metric;  extern enum babel_diversity diversity_kind;  extern int diversity_factor;  | 
