added a smelly way of handling erroneous input

avoid nasty checks against a pre-generated list of protocols to ensure
people aren’t passing weird things