diff --git a/sbin/route/route.c b/sbin/route/route.c index d250fcc2eb2e..3a87f5135efa 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -917,7 +917,7 @@ getaddr(which, s, hpp) switch (afamily) { #ifdef INET6 case AF_INET6: - if (inet_pton(AF_INET6, s, (void *)&su->sin6.sin6_addr) == -1) { + if (inet_pton(AF_INET6, s, (void *)&su->sin6.sin6_addr) != 1) { (void) fprintf(stderr, "%s: bad value\n", s); exit(1); }