core: fix return value of protocol redirect.