diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c index fc34fd1668d6ddd44a5cd4e47ad98c5decb2c1d5..3737d32ad11a5635cce1eb06ff80820ab2d08d2d 100644 --- a/net/ipv4/nexthop.c +++ b/net/ipv4/nexthop.c @@ -322,7 +322,9 @@ static size_t nh_nlmsg_size_single(struct nexthop *nh) static size_t nh_nlmsg_size(struct nexthop *nh) { - size_t sz = nla_total_size(4); /* NHA_ID */ + size_t sz = NLMSG_ALIGN(sizeof(struct nhmsg)); + + sz += nla_total_size(4); /* NHA_ID */ if (nh->is_group) sz += nh_nlmsg_size_grp(nh);