diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2022-05-06 15:51:10 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2022-05-06 15:51:10 +0000 |
commit | e8f5f57010005abc96edffdf46485c65739e6370 (patch) | |
tree | b37f6fdfa387c5d3d5aa30750f9dc9611eea91e7 /usr.sbin/ripd | |
parent | d3eccde1ef5b43e23ed27dfcc3d080ea90d5f228 (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/ripd')
-rw-r--r-- | usr.sbin/ripd/kroute.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/ripd/kroute.c b/usr.sbin/ripd/kroute.c index 635c74c0887..b9523e7fdee 100644 --- a/usr.sbin/ripd/kroute.c +++ b/usr.sbin/ripd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.34 2019/12/11 21:04:59 remi Exp $ */ +/* $OpenBSD: kroute.c,v 1.35 2022/05/06 15:51:09 claudio Exp $ */ /* * Copyright (c) 2004 Esben Norby <norby@openbsd.org> @@ -357,12 +357,11 @@ dont_redistribute: return; /* - * We consider the loopback net, multicast and experimental addresses + * We consider the loopback net and multicast addresses * as not redistributable. */ a = ntohl(kr->prefix.s_addr); - if (IN_MULTICAST(a) || IN_BADCLASS(a) || - (a >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) + if (IN_MULTICAST(a) || (a >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) return; /* * Consider networks with nexthop loopback as not redistributable |