summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2018-07-13 09:19:43 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2018-07-13 09:19:43 +0000
commit7157ce8a948f56a0f822b769acdce3c61a31737b (patch)
treeb61ec9861dfab02f2aa82941fe6bb86f7d9f6cb0 /sbin
parent932d7a6943e78e59b4ef6a0d3b76e0008df2d180 (diff)
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@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/route/route.c11
1 files changed, 1 insertions, 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)