]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/routemap_northbound.c
bgpd: Wrap IPV4_CLASS_DE into ipv4_unicast_valid() helper
[mirror_frr.git] / lib / routemap_northbound.c
index 51b879959f625ed48ad5e498a8342f5a05aa7b74..0ccfe98af031f01a0fb62aceca6427c2db2b98f8 100644 (file)
@@ -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: