diff options
author | Maria Matejka <mq@ucw.cz> | 2022-03-09 10:56:06 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-03-09 10:56:06 +0100 |
commit | 83d9920f90738e4df75b3cf57335b43c094051cd (patch) | |
tree | ef427685ad08c0ca468db1c0c2f462c3b79b3c14 /proto/bgp/packets.c | |
parent | ff47cd80dd04bc11692248a40cbf52ee8d351064 (diff) | |
parent | 5cff1d5f022755df61af6fc21cc4f2e5d384404e (diff) |
Merge commit '5cff1d5f' into haugesund
Conflicts:
proto/bgp/attrs.c
proto/pipe/pipe.c
Diffstat (limited to 'proto/bgp/packets.c')
-rw-r--r-- | proto/bgp/packets.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index 875808fb..1ab8c793 100644 --- a/proto/bgp/packets.c +++ b/proto/bgp/packets.c @@ -1386,8 +1386,6 @@ bgp_rte_update(struct bgp_parse_state *s, const net_addr *n, u32 path_id, rta *a /* Prepare cached route attributes */ if (s->cached_rta == NULL) { - a0->src = s->last_src; - /* Workaround for rta_lookup() breaking eattrs */ ea_list *ea = a0->eattrs; s->cached_rta = rta_lookup(a0); @@ -1395,7 +1393,7 @@ bgp_rte_update(struct bgp_parse_state *s, const net_addr *n, u32 path_id, rta *a } rta *a = rta_clone(s->cached_rta); - rte *e = rte_get_temp(a); + rte *e = rte_get_temp(a, s->last_src); e->pflags = 0; e->u.bgp.suppressed = 0; @@ -2481,6 +2479,7 @@ bgp_decode_nlri(struct bgp_parse_state *s, u32 afi, byte *nlri, uint len, ea_lis a->scope = SCOPE_UNIVERSE; a->from = s->proto->remote_ip; a->eattrs = ea; + a->pref = c->c.preference; c->desc->decode_next_hop(s, nh, nh_len, a); bgp_finish_attrs(s, a); |