summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2022-05-06 15:51:10 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2022-05-06 15:51:10 +0000
commite8f5f57010005abc96edffdf46485c65739e6370 (patch)
treeb37f6fdfa387c5d3d5aa30750f9dc9611eea91e7 /usr.sbin/ldpd
parentd3eccde1ef5b43e23ed27dfcc3d080ea90d5f228 (diff)
Relax the limitation of what is an acceptable unicast IP.
Remove the IN_BADCLASS() check which filters out the experimental IPv4 address space. Now there are no more experiments in IPv4 and so there is less reason for these network daemons to deny such an IP. Everything still disallows multicast IPs (224/4) and loopback (127/8) a few also disallow 0/8 but this is not consistent. In any case using 240/4 in production is a really bad idea but it is not up to this software to prevent you from being a fool. OK deraadt@ tb@
Diffstat (limited to 'usr.sbin/ldpd')
-rw-r--r--usr.sbin/ldpd/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ldpd/util.c b/usr.sbin/ldpd/util.c
index 148e09a5927..25c1cbed9d7 100644
--- a/usr.sbin/ldpd/util.c
+++ b/usr.sbin/ldpd/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.5 2018/12/07 08:40:54 claudio Exp $ */
+/* $OpenBSD: util.c,v 1.6 2022/05/06 15:51:09 claudio Exp $ */
/*
* Copyright (c) 2015 Renato Westphal <renato@openbsd.org>
@@ -223,7 +223,7 @@ bad_addr_v4(struct in_addr addr)
if (((a >> IN_CLASSA_NSHIFT) == 0) ||
((a >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) ||
- IN_MULTICAST(a) || IN_BADCLASS(a))
+ IN_MULTICAST(a))
return (1);
return (0);