Revision a1f5e514 proto/static/static.c

View differences:

proto/static/static.c
71 71
      struct nexthop *nh = allocz(NEXTHOP_MAX_SIZE);
72 72
      nh->gw = r2->via;
73 73
      nh->iface = r2->neigh->iface;
74
      nh->flags = r2->onlink ? RNF_ONLINK : 0;
74 75
      nh->weight = r2->weight;
75 76
      if (r2->mls)
76 77
      {
......
205 206
    for (r2 = r; r2; r2 = r2->mp_next)
206 207
    {
207 208
      n = ipa_nonzero(r2->via) ?
208
	neigh_find2(&p->p, &r2->via, r2->iface, NEF_STICKY) :
209
	neigh_find2(&p->p, &r2->via, r2->iface,
210
		    NEF_STICKY | (r2->onlink ? NEF_ONLINK : 0)) :
209 211
	neigh_find_iface(&p->p, r2->iface);
210 212

  
211 213
      if (!n)
......
267 269
    {
268 270
      if (!ipa_equal(x->via, y->via) ||
269 271
	  (x->iface != y->iface) ||
270
	  (x->use_bfd != y->use_bfd) ||
272
	  (x->onlink != y->onlink) ||
271 273
	  (x->weight != y->weight) ||
274
	  (x->use_bfd != y->use_bfd) ||
272 275
	  (!x->mls != !y->mls) ||
273 276
	  ((x->mls) && (y->mls) && (x->mls->len != y->mls->len)))
274 277
	return 0;
......
614 617
    for (r2 = r; r2; r2 = r2->mp_next)
615 618
    {
616 619
      if (r2->iface && ipa_zero(r2->via))
617
	cli_msg(-1009, "\tdev %s%s%s", r2->iface->name,
618
		r2->bfd_req ? " (bfd)" : "", r2->active ? "" : " (dormant)");
620
	cli_msg(-1009, "\tdev %s%s", r2->iface->name,
621
		r2->active ? "" : " (dormant)");
619 622
      else
620
	cli_msg(-1009, "\tvia %I%J%s%s", r2->via, r2->iface,
621
		r2->bfd_req ? " (bfd)" : "", r2->active ? "" : " (dormant)");
623
	cli_msg(-1009, "\tvia %I%J%s%s%s", r2->via, r2->iface,
624
		r2->onlink ? " onlink" : "",
625
		r2->bfd_req ? " (bfd)" : "",
626
		r2->active ? "" : " (dormant)");
622 627
    }
623 628
    break;
624 629
  }

Also available in: Unified diff