From cfb538c668b2472c4eedd725155d9723797939da Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 23 May 2024 07:20:29 -0400 Subject: [PATCH] zebra: Fix misaligned long long unsigned int 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 --- zebra/rt_netlink.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 01b527ea808e..2c67d61569e6 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -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 =