backported router rule validation from master