Prevent incorrectly replacing unrecognized protocol numbers with -1. Fixes: #5587 Signed-off-by: Jo-Philipp Wich <jo@mein.io>