Commit b2a4feeb authored by Maria Matejka's avatar Maria Matejka
Browse files

Merge branch 'master' into mq-filter-stack

parents eac9250f 422a9334
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2246,7 +2246,7 @@ using the following configuration parameters:

	<tag><label id="bgp-dynamic-name">dynamic name "<m/text/"</tag>
	Define common prefix of names used for new BGP instances spawned when
	dynamic BGP behavior is active. Actual names also contain numberic
	dynamic BGP behavior is active. Actual names also contain numeric
	index to distinguish individual instances.  Default: "dynbgp".

	<tag><label id="bgp-dynamic-name">dynamic name digits <m/number/</tag>
+1 −0
Original line number Diff line number Diff line
@@ -631,6 +631,7 @@ int nexthop__same(struct nexthop *x, struct nexthop *y); /* Compare multipath ne
static inline int nexthop_same(struct nexthop *x, struct nexthop *y)
{ return (x == y) || nexthop__same(x, y); }
struct nexthop *nexthop_merge(struct nexthop *x, struct nexthop *y, int rx, int ry, int max, linpool *lp);
struct nexthop *nexthop_sort(struct nexthop *x);
static inline void nexthop_link(struct rta *a, struct nexthop *from)
{ memcpy(&a->nh, from, nexthop_size(from)); }
void nexthop_insert(struct nexthop **n, struct nexthop *y);
+19 −1
Original line number Diff line number Diff line
@@ -202,7 +202,7 @@ nexthop__same(struct nexthop *x, struct nexthop *y)
}

static int
nexthop_compare_node(struct nexthop *x, struct nexthop *y)
nexthop_compare_node(const struct nexthop *x, const  struct nexthop *y)
{
  int r;

@@ -320,6 +320,24 @@ nexthop_insert(struct nexthop **n, struct nexthop *x)
  *n = x;
}

struct nexthop *
nexthop_sort(struct nexthop *x)
{
  struct nexthop *s = NULL;

  /* Simple insert-sort */
  while (x)
  {
    struct nexthop *n = x;
    x = n->next;
    n->next = NULL;

    nexthop_insert(&s, n);
  }

  return s;
}

int
nexthop_is_sorted(struct nexthop *x)
{
+1 −0
Original line number Diff line number Diff line
@@ -880,6 +880,7 @@ ospf_iface_reconfigure(struct ospf_iface *ifa, struct ospf_iface_patt *new)
	       ifname, ifa->priority, new->priority);

    ifa->priority = new->priority;
    ospf_iface_sm(ifa, ISM_NEICH);
    ospf_notify_link_lsa(ifa);
  }

+30 −8
Original line number Diff line number Diff line
@@ -246,18 +246,33 @@ void
ospf_stop_gr_recovery(struct ospf_proto *p)
{
  p->gr_recovery = 0;
  p->gr_cleanup = 1;
  p->gr_timeout = 0;
  channel_graceful_restart_unlock(p->p.main_channel);

  /* Reorigination of router/network LSAs is already scheduled */
  ospf_mark_lsadb(p);

  /*
   * NOTE: We should move channel_graceful_restart_unlock() to the end of
   * ospf_disp() in order to have local LSA reorigination / LSAdb cleanup /
   * routing table recomputation before official end of GR. It does not matter
   * when we are single-threaded.
   */
  /* Rest is done in ospf_cleanup_gr_recovery() */
}

static void
ospf_cleanup_gr_recovery(struct ospf_proto *p)
{
  struct top_hash_entry *en;

  /* Flush dirty LSAa except external ones, these will be handled by feed */
  WALK_SLIST(en, p->lsal)
    if (en->gr_dirty)
    {
      if ((en->lsa_type == LSA_T_EXT) || (en->lsa_type == LSA_T_NSSA))
	en->mode = LSA_M_EXPORT;
      else
	ospf_flush_lsa(p, en);
    }

  /* End graceful restart on channel, will also schedule feed */
  channel_graceful_restart_unlock(p->p.main_channel);

  p->gr_cleanup = 0;
}

static int
@@ -361,6 +376,8 @@ ospf_init(struct proto_config *CF)
  P->ifa_notify = cf->ospf2 ? ospf_ifa_notify2 : ospf_ifa_notify3;
  P->preexport = ospf_preexport;
  P->reload_routes = ospf_reload_routes;
  P->feed_begin = ospf_feed_begin;
  P->feed_end = ospf_feed_end;
  P->make_tmp_attrs = ospf_make_tmp_attrs;
  P->store_tmp_attrs = ospf_store_tmp_attrs;
  P->rte_better = ospf_rte_better;
@@ -436,6 +453,7 @@ ospf_disp(timer * timer)
{
  struct ospf_proto *p = timer->data;

  /* Check for end of graceful restart */
  if (p->gr_recovery)
    ospf_update_gr_recovery(p);

@@ -448,6 +466,10 @@ ospf_disp(timer * timer)
  /* Calculate routing table */
  if (p->calcrt)
    ospf_rt_spf(p);

  /* Cleanup after graceful restart */
  if (p->gr_cleanup)
    ospf_cleanup_gr_recovery(p);
}


Loading