The Missouri Supreme Court has upheld a state law aimed at allowing veteran St. Louis firefighters to live outside the city limits.