mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
Undefined behavior fix
This commit is contained in:
parent
3371ea0843
commit
3a2e423d3e
@ -83,12 +83,11 @@ dev_ifa_notify(struct proto *P, uint flags, struct ifa *ad)
|
||||
ea_list *ea = NULL;
|
||||
struct nexthop_adata nhad = {
|
||||
.nh = { .iface = ad->iface, },
|
||||
.ad = { .length = (void *) NEXTHOP_NEXT(&nhad.nh) - (void *) nhad.ad.data, },
|
||||
};
|
||||
|
||||
ea_set_attr_u32(&ea, &ea_gen_preference, 0, c->preference);
|
||||
ea_set_attr_u32(&ea, &ea_gen_source, 0, RTS_DEVICE);
|
||||
ea_set_attr_data(&ea, &ea_gen_nexthop, 0, nhad.ad.data, nhad.ad.length);
|
||||
ea_set_attr_data(&ea, &ea_gen_nexthop, 0, nhad.ad.data, (void *) NEXTHOP_NEXT(&nhad.nh) - (void *) nhad.ad.data);
|
||||
|
||||
rte e0 = {
|
||||
.attrs = ea,
|
||||
|
Loading…
Reference in New Issue
Block a user