From bd0653fd81e6682b3d4749f89bcdb1c1db9fc141 Mon Sep 17 00:00:00 2001 From: schwarze Date: Fri, 13 Jul 2018 09:19:42 +0000 Subject: [PATCH] no longer interpret 0.192.168.4 in hosts(5) as 192.168.4/24 OK phessler@ claudio@ benno@ kn@ "steh' nicht rum, committe das" henning@ --- sbin/route/route.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/sbin/route/route.c b/sbin/route/route.c index 61de74380a9..b61b484641d 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.220 2018/07/13 09:06:58 kn Exp $ */ +/* $OpenBSD: route.c,v 1.221 2018/07/13 09:19:42 schwarze Exp $ */ /* $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $ */ /* @@ -763,15 +763,6 @@ inet_makenetandmask(u_int32_t net, struct sockaddr_in *sin, int bits) else if (bits) { addr = net; mask = 0xffffffff << (32 - bits); - } else if (net < IN_CLASSA_MAX) { - addr = net << IN_CLASSA_NSHIFT; - mask = IN_CLASSA_NET; - } else if (net < IN_CLASSB_MAX) { - addr = net << IN_CLASSB_NSHIFT; - mask = IN_CLASSB_NET; - } else if (net < (1 << 24)) { - addr = net << IN_CLASSC_NSHIFT; - mask = IN_CLASSC_NET; } else { addr = net; if ((addr & IN_CLASSA_HOST) == 0) -- 2.20.1