Whether or not the OSS contract is illegal probably depends on the wording. Saying "we won't do business with you in the future if you do X" is very different from "Accepting the contract means you promise to never do X"
Perens clearly thinks they said the latter. However the judgement is solely on the belief that he has every right to state his opinion, and OSS were trying to shut him up. Too often it seems that US companies use legal threats to prevent people discussing or stating opinions.