From: bluhm Date: Sun, 3 Sep 2023 22:01:00 +0000 (+0000) Subject: Allow UDP for built-in inetd(8) services on 127.0.0.1. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1c33b230a82495eb6dc92eb19489532266bd2eab;p=openbsd Allow UDP for built-in inetd(8) services on 127.0.0.1. This restriction was added in year 2000 due to IPv6 compatible and mapped addresses. Nowadays our kernel does not support these IPv6 features and blocks localhost addresses on non-loopback interfaces. Make IPv4 127.0.0.1/8 and IPv6 ::1 behave identically and provide local services if configured. OK mvs@ deraadt@ --- diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c index fec44e82a11..c7e8e891fea 100644 --- a/usr.sbin/inetd/inetd.c +++ b/usr.sbin/inetd/inetd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inetd.c,v 1.164 2023/04/19 12:58:16 jsg Exp $ */ +/* $OpenBSD: inetd.c,v 1.165 2023/09/03 22:01:00 bluhm Exp $ */ /* * Copyright (c) 1983,1991 The Regents of the University of California. @@ -444,7 +444,7 @@ dg_badinput(struct sockaddr *sa) if (IN_MULTICAST(in.s_addr)) goto bad; switch ((in.s_addr & 0xff000000) >> 24) { - case 0: case 127: case 255: + case 0: case 255: goto bad; } if (dg_broadcast(&in))