There is a rule or law against it but it was considered it would have been easy enough to get Congress to vote a waiver. I think Gen’l Mattis had to get some kind of waiver to serve... can’t remember why.
That stirs my feeble memory....Mattis needing a waiver of some sort. Maybe he had been in mil until very recently or something, and was supposed to be out longer before being hired by administration.