Commit c99050cc authored by Ondřej Zajíček's avatar Ondřej Zajíček

KRT: Fix bug in multipath handling

parent cf3e3845
Pipeline #28147 passed with stages
in 5 minutes and 50 seconds
......@@ -677,8 +677,10 @@ nl_parse_multipath(struct krt_proto *p, struct rtattr *ra, int af)
nh_buf_size = nh_buf_size ? (nh_buf_size * 2) : 4;
nh_buffer = xrealloc(nh_buffer, nh_buf_size * NEXTHOP_MAX_SIZE);
}
*last = rv = nh_buffer + nh_buf_used++;
rv->next = NULL;
/* FIXME: This is really ugly */
*last = rv = (void *) (((byte *) nh_buffer) + (nh_buf_used++ * NEXTHOP_MAX_SIZE));
memset(rv, 0, NEXTHOP_MAX_SIZE);
// rv->next = NULL;
last = &(rv->next);
rv->flags = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment