Skip to content

Commit

Permalink
zebra: Fix misaligned long long unsigned int
Browse files Browse the repository at this point in the history
Error message:
./multicast_pim_dr_nondr_test.test_pim_dr_nondr_with_ospf_topo2/r5/zebra.err:zebra/rt_netlink.c:1142:15: runtime error: load of misaligned address 0x7bb40000a064 for type 'long long unsigned int', which requires 8 byte alignment

Fix it.

Signed-off-by: Donald Sharp <[email protected]>
  • Loading branch information
donaldsharp committed May 23, 2024
1 parent 0a1211b commit cfb538c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions zebra/rt_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -1138,8 +1138,10 @@ static int netlink_route_change_read_multicast(struct nlmsghdr *h,
*(struct in6_addr *)RTA_DATA(tb[RTA_DST]);
}

if (tb[RTA_EXPIRES])
m->lastused = *(unsigned long long *)RTA_DATA(tb[RTA_EXPIRES]);
if (tb[RTA_EXPIRES]) {
uint32_t temporary = *(uint32_t *)RTA_DATA(tb[RTA_EXPIRES]);
m->lastused = temporary;
}

if (tb[RTA_MULTIPATH]) {
struct rtnexthop *rtnh =
Expand Down

0 comments on commit cfb538c

Please sign in to comment.