0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-23 02:01:55 +00:00
Program crashed when disabling aggregation protocol or shutting the daemon down.
Shutdown procedure attempted to remove the first route (which is the last that
was inserted) by different key than one by which it was inserted into the table.
They key is computed from net and src of each route. It turned out that src of
the last route was inadvertently changed.
This commit is contained in:
Igor Putovny 2024-02-29 15:08:50 +01:00
parent 9619284d20
commit 7644f7594b

View File

@ -700,7 +700,6 @@ create_route_ip4(struct aggregator_proto *p, const struct net_addr_ip4 *addr, st
assert(addr->type == NET_IP4); assert(addr->type == NET_IP4);
net_copy_ip4((struct net_addr_ip4 *)&net_placeholder.net.n.addr, addr); net_copy_ip4((struct net_addr_ip4 *)&net_placeholder.net.n.addr, addr);
bucket->rte->src = p->p.main_source;
aggregator_bucket_update(p, bucket, &net_placeholder.net); aggregator_bucket_update(p, bucket, &net_placeholder.net);
} }
@ -714,7 +713,6 @@ create_route_ip6(struct aggregator_proto *p, struct net_addr_ip6 *addr, struct a
assert(addr->type == NET_IP6); assert(addr->type == NET_IP6);
net_copy_ip6((struct net_addr_ip6 *)&net_placeholder.n.n.addr, addr); net_copy_ip6((struct net_addr_ip6 *)&net_placeholder.n.n.addr, addr);
bucket->rte->src = p->p.main_source;
aggregator_bucket_update(p, bucket, &net_placeholder.n); aggregator_bucket_update(p, bucket, &net_placeholder.n);
} }
@ -971,7 +969,7 @@ aggregator_bucket_update(struct aggregator_proto *p, struct aggregator_bucket *b
rta_set_static_attr(rta, bucket->rte->attrs, p->aggr_on[i].sa); rta_set_static_attr(rta, bucket->rte->attrs, p->aggr_on[i].sa);
} }
struct rte *new = rte_get_temp(rta, bucket->rte->src); struct rte *new = rte_get_temp(rta, p->p.main_source);
new->net = net; new->net = net;
log("=============== CREATE MERGED ROUTE ==============="); log("=============== CREATE MERGED ROUTE ===============");