Exemple #1
0
/* Router-id update message from zebra. */
static int
bgp_router_id_update (int command, struct zclient *zclient, zebra_size_t length)
{
  struct prefix router_id;
  struct listnode *node, *nnode;
  struct bgp *bgp;

  zebra_router_id_update_read(zclient->ibuf,&router_id);

  if (BGP_DEBUG(zebra, ZEBRA))
    {
      char buf[128];
      prefix2str(&router_id, buf, sizeof(buf));
      zlog_debug("Zebra rcvd: router id update %s", buf);
    }

  router_id_zebra = router_id.u.prefix4;

  for (ALL_LIST_ELEMENTS (bm->bgp, node, nnode, bgp))
    {
      if (!bgp->router_id_static.s_addr)
        bgp_router_id_set (bgp, &router_id.u.prefix4);
    }

  return 0;
}
Exemple #2
0
/* Router-id update message from zebra. */
static int pim_router_id_update_zebra(int command, struct zclient *zclient,
				      zebra_size_t length, vrf_id_t vrf_id)
{
  struct prefix router_id;

  zebra_router_id_update_read(zclient->ibuf, &router_id);

  return 0;
}
Exemple #3
0
/* Router-id update message from zebra. */
int
isis_router_id_update_zebra (int command, struct zclient *zclient,
                             zebra_size_t length)
{
    struct prefix router_id;

    zebra_router_id_update_read (zclient->ibuf,&router_id);
    router_id_zebra = router_id.u.prefix4;

    /* FIXME: Do we react somehow? */
    return 0;
}
Exemple #4
0
/* Router-id update message from zebra. */
static int ldp_router_id_update_zebra(int command, struct zclient *zclient,
    zebra_size_t length) {
    struct ldp *ldp = ldp_get();

    zebra_router_id_update_read(zclient->ibuf,&router_id);

    zlog_info("router-id change %s",
	inet_ntoa(router_id.u.prefix4));

    if (ldp && ldp->lsr_id_is_static != MPLS_BOOL_TRUE) 
	ldp_router_id_update(ldp, &router_id);
    return 0;
}
Exemple #5
0
/* Router-id update message from zebra. */
static int eigrp_router_id_update_zebra(int command, struct zclient *zclient,
					zebra_size_t length, vrf_id_t vrf_id)
{
	struct eigrp *eigrp;
	struct prefix router_id;
	zebra_router_id_update_read(zclient->ibuf, &router_id);

	router_id_zebra = router_id.u.prefix4;

	eigrp = eigrp_lookup();

	if (eigrp != NULL)
		eigrp_router_id_update(eigrp);

	return 0;
}
Exemple #6
0
/* Router-id update message from zebra. */
static int
rsvp_router_id_update_zebra (int command, struct zclient *zclient,
			     zebra_size_t length)
{
  struct prefix router_id;
  char buf[128];
  zebra_router_id_update_read (zclient->ibuf, &router_id);

  prefix2str (&router_id, buf, sizeof (buf));
  zlog_debug ("Zebra rcvd: router id update %s", buf);

  router_id_zebra = router_id.u.prefix4;
  rdb_set_router_id (router_id_zebra.s_addr);

  return 0;
}
Exemple #7
0
/* Router-id update message from zebra. */
static int
ospf6_router_id_update_zebra (int command, struct zclient *zclient,
			      zebra_size_t length)
{
  struct prefix router_id;
  struct ospf6 *o = ospf6;

  zebra_router_id_update_read(zclient->ibuf,&router_id);
  router_id_zebra = router_id.u.prefix4;

  if (o == NULL)
    return 0;

  if (o->router_id  == 0)
    o->router_id = (u_int32_t) router_id_zebra.s_addr;

  return 0;
}
Exemple #8
0
/* Router-id update message from zebra. */
static int
isis_router_id_update_zebra (int command, struct zclient *zclient,
			     zebra_size_t length, vrf_id_t vrf_id)
{
  struct isis_area *area;
  struct listnode *node;
  struct prefix router_id;

  zebra_router_id_update_read (zclient->ibuf, &router_id);
  if (isis->router_id == router_id.u.prefix4.s_addr)
    return 0;

  isis->router_id = router_id.u.prefix4.s_addr;
  for (ALL_LIST_ELEMENTS_RO (isis->area_list, node, area))
    if (listcount (area->area_addrs) > 0)
      lsp_regenerate_schedule (area, area->is_type, 0);

  return 0;
}
Exemple #9
0
/* Router-id update message from zebra. */
static int
bgp_router_id_update (int command, struct zclient *zclient, zebra_size_t length,
    vrf_id_t vrf_id)
{
  struct prefix router_id;

  zebra_router_id_update_read(zclient->ibuf,&router_id);

  if (BGP_DEBUG(zebra, ZEBRA))
    {
      char buf[128];
      prefix2str(&router_id, buf, sizeof(buf));
      zlog_debug("Zebra rcvd: router id update %s", buf);
    }

  router_id_zebra = router_id.u.prefix4;

  bgp_router_id_zebra_bump ();
  return 0;
}
/* Router-id update message from zebra. */
static int
ospf_router_id_update_zebra (int command, struct zclient *zclient,
			     zebra_size_t length)
{
  struct ospf *ospf;
  struct prefix router_id;
  zebra_router_id_update_read(zclient->ibuf,&router_id);

  if (IS_DEBUG_OSPF (zebra, ZEBRA_INTERFACE))
    {
      char buf[128];
      prefix2str(&router_id, buf, sizeof(buf));
      zlog_debug("Zebra rcvd: router id update %s", buf);
    }

  router_id_zebra = router_id.u.prefix4;

  ospf = ospf_lookup ();
  
  if (ospf != NULL)
    ospf_router_id_update (ospf);
  
  return 0;
}