diff --git a/usr.sbin/ppp/ccp.c b/usr.sbin/ppp/ccp.c index 4ea24228ce2..c7cea94a826 100644 --- a/usr.sbin/ppp/ccp.c +++ b/usr.sbin/ppp/ccp.c @@ -134,8 +134,11 @@ protoname(int proto) }; if (proto < 0 || proto > sizeof cftypes / sizeof *cftypes || - cftypes[proto] == NULL) + cftypes[proto] == NULL) { + if (proto == -1) + return "none"; return HexStr(proto, NULL, 0); + } return cftypes[proto]; }