net: fix NULL dereferences in check_peer_redir()