-/* $OpenBSD: kroute.c,v 1.244 2022/03/08 12:58:57 claudio Exp $ */
+/* $OpenBSD: kroute.c,v 1.245 2022/05/06 15:51:09 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
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;
/* Check if the nexthop is the loopback addr. */
-/* $OpenBSD: rde.c,v 1.544 2022/03/22 10:53:08 claudio Exp $ */
+/* $OpenBSD: rde.c,v 1.545 2022/05/06 15:51:09 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
UPD_READ(&nexthop.v4.s_addr, p, plen, 4);
/*
* Check if the nexthop is a valid IP address. We consider
- * multicast and experimental addresses as invalid.
+ * multicast addresses as invalid.
*/
tmp32 = ntohl(nexthop.v4.s_addr);
- if (IN_MULTICAST(tmp32) || IN_BADCLASS(tmp32)) {
+ if (IN_MULTICAST(tmp32)) {
rde_update_err(peer, ERR_UPDATE, ERR_UPD_NEXTHOP,
op, len);
return (-1);
-/* $OpenBSD: util.c,v 1.10 2018/12/07 08:40:54 claudio Exp $ */
+/* $OpenBSD: util.c,v 1.11 2022/05/06 15:51:09 claudio Exp $ */
/*
* Copyright (c) 2015 Renato Westphal <renato@openbsd.org>
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);
-/* $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>
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);
addr = ntohl(naddr);
return (!(IN_MULTICAST(addr) ||
- IN_BADCLASS (addr) ||
(addr & 0xff000000) == 0));
}
(subnet & 0xff000000) == 0x7f000000 ||
(subnet & 0xff000000) == 0x00000000) return (FALSE);
}
- else if (IN_CLASSD(subnet) || IN_BADCLASS(subnet)) {
+ else if (IN_CLASSD(subnet)) {
/* Above Class C address space */
return (FALSE);
}
-/* $OpenBSD: kroute.c,v 1.114 2020/08/20 03:09:28 jmatthew Exp $ */
+/* $OpenBSD: kroute.c,v 1.115 2022/05/06 15:51:09 claudio Exp $ */
/*
* Copyright (c) 2004 Esben Norby <norby@openbsd.org>
goto dont_redistribute;
/*
- * 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)
goto dont_redistribute;
/*
* Consider networks with nexthop loopback as not redistributable
-/* $OpenBSD: auth.c,v 1.39 2017/11/17 20:48:30 jca Exp $ */
+/* $OpenBSD: auth.c,v 1.40 2022/05/06 15:51:09 claudio Exp $ */
/*
* auth.c - PPP authentication and phase control.
{
addr = ntohl(addr);
return (addr >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET
- || IN_MULTICAST(addr) || IN_BADCLASS(addr);
+ || IN_MULTICAST(addr);
}
/*
-/* $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>
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