]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: Use actual defines to set values
authorDonald Sharp <sharpd@nvidia.com>
Sat, 18 Feb 2023 12:24:12 +0000 (07:24 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Sat, 18 Feb 2023 12:24:12 +0000 (07:24 -0500)
Instead of hard coding so that if something ever changes
it will break.  Let's use the #defines that FRR has
included for us.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd/bgp_routemap.c

index f9def03693c69df861a602db13e03c529da259c2..dbffecee30680111005867cb960ca89f984659a3 100644 (file)
@@ -3024,11 +3024,11 @@ static void *route_set_origin_compile(const char *arg)
        origin = XMALLOC(MTYPE_ROUTE_MAP_COMPILED, sizeof(uint8_t));
 
        if (strcmp(arg, "igp") == 0)
-               *origin = 0;
+               *origin = BGP_ORIGIN_IGP;
        else if (strcmp(arg, "egp") == 0)
-               *origin = 1;
+               *origin = BGP_ORIGIN_EGP;
        else
-               *origin = 2;
+               *origin = BGP_ORIGIN_INCOMPLETE;
 
        return origin;
 }