summaryrefslogtreecommitdiff
path: root/lib/routemap_northbound.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2022-06-06 10:47:27 +0300
committerDonatas Abraitis <donatas@opensourcerouting.org>2022-06-13 20:44:52 +0300
commite24a6977ee763f58e922ad2728882a9a70027f33 (patch)
treefc4a08b59f9b537f6f6f0026619883e1901e7e84 /lib/routemap_northbound.c
parentfaa8c700e61ddbdb278c12787785df4eeecb23ff (diff)
bgpd: Wrap IPV4_CLASS_DE into ipv4_unicast_valid() helper
Linux kernel allows (FreeBSD/OpenBSD too) using reserved class E IP ranges. This is a preparation commit that ease the global switch to allow/deny class E IP ranges in FRR. https://datatracker.ietf.org/doc/html/draft-chen-ati-adaptive-ipv4-address-space Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'lib/routemap_northbound.c')
-rw-r--r--lib/routemap_northbound.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/routemap_northbound.c b/lib/routemap_northbound.c
index 51b879959f..0ccfe98af0 100644
--- a/lib/routemap_northbound.c
+++ b/lib/routemap_northbound.c
@@ -887,7 +887,7 @@ static int lib_route_map_entry_set_action_ipv4_address_modify(
* only implemented action.
*/
yang_dnode_get_ipv4(&ia, args->dnode, NULL);
- if (ia.s_addr == INADDR_ANY || IPV4_CLASS_DE(ntohl(ia.s_addr)))
+ if (ia.s_addr == INADDR_ANY || !ipv4_unicast_valid(&ia))
return NB_ERR_VALIDATION;
/* FALLTHROUGH */
case NB_EV_PREPARE: