From 1aa8aef34bfc5c4204aff73ae6bb06cd60f2d750 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Sat, 18 Feb 2023 07:24:12 -0500 Subject: [PATCH] bgpd: Use actual defines to set values 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 --- bgpd/bgp_routemap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index f9def03693..dbffecee30 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -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; }