UK ports threaten post-Brexit legal action