Revision 62e64905 nest/rt-table.c

View differences:

nest/rt-table.c
1768 1768
rta_apply_hostentry(rta *a, struct hostentry *he)
1769 1769
{
1770 1770
  a->hostentry = he;
1771
  
1772 1771
  a->dest = he->dest;
1773 1772
  a->igp_metric = he->igp_metric;
1774 1773

  
......
1810 1809
static inline rte *
1811 1810
rt_next_hop_update_rte(rtable *tab UNUSED, rte *old)
1812 1811
{
1813
  rta *ap = alloca(RTA_MAX_SIZE);
1814
  memcpy(ap, old->attrs, rta_size(old->attrs));
1815
  rta_apply_hostentry(ap, old->attrs->hostentry);
1816
  ap->aflags = 0;
1812
  rta *a = alloca(RTA_MAX_SIZE);
1813
  memcpy(a, old->attrs, rta_size(old->attrs));
1814
  rta_apply_hostentry(a, old->attrs->hostentry);
1815
  a->aflags = 0;
1817 1816

  
1818 1817
  rte *e = sl_alloc(rte_slab);
1819 1818
  memcpy(e, old, sizeof(rte));
1820
  e->attrs = rta_lookup(ap);
1819
  e->attrs = rta_lookup(a);
1821 1820

  
1822 1821
  return e;
1823 1822
}
......
2373 2372
	}
2374 2373

  
2375 2374
      if ((a->dest == RTD_UNICAST) && ipa_zero(a->nh.gw) && !a->next)
2376
	{ /* We have singlepath device route */
2375
	{
2376
	  /* We have singlepath device route */
2377 2377
	  if (if_local_addr(he->addr, a->nh.iface))
2378 2378
	    {
2379 2379
	      /* The host address is a local address, this is not valid */
......
2389 2389
      else
2390 2390
	{
2391 2391
	  /* The host is reachable through some route entry */
2392
	  he->nh = (&a->nh);
2392
	  he->nh = &(a->nh);
2393 2393
	  he->dest = a->dest;
2394 2394
	}
2395 2395

  

Also available in: Unified diff