mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-09 20:58:44 +00:00
KRT: Fix bug in multipath handling
This commit is contained in:
parent
cf3e3845c2
commit
c99050cce2
@ -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_buf_size = nh_buf_size ? (nh_buf_size * 2) : 4;
|
||||||
nh_buffer = xrealloc(nh_buffer, nh_buf_size * NEXTHOP_MAX_SIZE);
|
nh_buffer = xrealloc(nh_buffer, nh_buf_size * NEXTHOP_MAX_SIZE);
|
||||||
}
|
}
|
||||||
*last = rv = nh_buffer + nh_buf_used++;
|
/* FIXME: This is really ugly */
|
||||||
rv->next = NULL;
|
*last = rv = (void *) (((byte *) nh_buffer) + (nh_buf_used++ * NEXTHOP_MAX_SIZE));
|
||||||
|
memset(rv, 0, NEXTHOP_MAX_SIZE);
|
||||||
|
// rv->next = NULL;
|
||||||
last = &(rv->next);
|
last = &(rv->next);
|
||||||
|
|
||||||
rv->flags = 0;
|
rv->flags = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user