]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Merge commit 'f2e725a76882ba6b75c3ce4fb3c760bd83462410' into haugesund
authorMaria Matejka <mq@ucw.cz>
Mon, 30 May 2022 15:27:03 +0000 (17:27 +0200)
committerMaria Matejka <mq@ucw.cz>
Mon, 30 May 2022 15:27:03 +0000 (17:27 +0200)
1  2 
lib/route.h
nest/rt-table.c
nest/rt.h
proto/bgp/packets.c
proto/static/static.c

diff --cc lib/route.h
index cfb08bbe577d108d2122c75b3c4629e90142bd87,5423ada3a0dbab34761dfd41e5a487e7b0fb9146..df648cf98d8ed2b198722382887601926e8d86e9
@@@ -313,9 -310,13 +312,13 @@@ extern struct ea_class ea_gen_from
  /* Source: An old method to devise the route source protocol and kind.
   * To be superseded in a near future by something more informative. */
  extern struct ea_class ea_gen_source;
 -static inline u32 rt_get_source_attr(rte *rt)
 +static inline u32 rt_get_source_attr(const rte *rt)
  { return ea_get_int(rt->attrs->eattrs, &ea_gen_source, 0); }
  
+ /* MPLS labels: Use with a recursive nexthop specification
+  * to add additional labels to the resolved nexthop */
+ extern struct ea_class ea_mpls_labels;
  /* Next hop structures */
  
  #define NEXTHOP_MAX_SIZE (sizeof(struct nexthop) + sizeof(u32)*MPLS_MAX_LABEL_STACK)
diff --cc nest/rt-table.c
index 3f3aee18ff8fd36cffab0e29b108ae73fe862920,37f17bbcf47b5f58c00970a523209128cd685e0f..ba4f51153283f8eb5578ce56557f9acd4400d597
@@@ -2620,16 -2499,15 +2618,13 @@@ rt_next_hop_update_rte(rtable *tab, ne
    rta *a = alloca(RTA_MAX_SIZE);
    memcpy(a, old->attrs, rta_size(old->attrs));
  
-   mpls_label_stack mls = { .len = a->nh.labels_orig };
-   memcpy(mls.stack, &a->nh.label[a->nh.labels - mls.len], mls.len * sizeof(u32));
-   rta_apply_hostentry(a, old->attrs->hostentry, &mls);
+   rta_apply_hostentry(a, old->attrs->hostentry);
    a->cached = 0;
  
 -  rte *e = sl_alloc(rte_slab);
 -  memcpy(e, old, sizeof(rte));
 -  e->attrs = rta_lookup(a);
 -  rt_lock_source(e->src);
 +  rte e0 = *old;
 +  e0.attrs = a;
  
 -  return e;
 +  return rte_store(&e0, n, tab);
  }
  
  
diff --cc nest/rt.h
Simple merge
Simple merge
Simple merge