mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 15:23:39 +00:00
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 <sharpd@nvidia.com>
This commit is contained in:
parent
5ef2911d23
commit
1aa8aef34b
@ -3024,11 +3024,11 @@ static void *route_set_origin_compile(const char *arg)
|
|||||||
origin = XMALLOC(MTYPE_ROUTE_MAP_COMPILED, sizeof(uint8_t));
|
origin = XMALLOC(MTYPE_ROUTE_MAP_COMPILED, sizeof(uint8_t));
|
||||||
|
|
||||||
if (strcmp(arg, "igp") == 0)
|
if (strcmp(arg, "igp") == 0)
|
||||||
*origin = 0;
|
*origin = BGP_ORIGIN_IGP;
|
||||||
else if (strcmp(arg, "egp") == 0)
|
else if (strcmp(arg, "egp") == 0)
|
||||||
*origin = 1;
|
*origin = BGP_ORIGIN_EGP;
|
||||||
else
|
else
|
||||||
*origin = 2;
|
*origin = BGP_ORIGIN_INCOMPLETE;
|
||||||
|
|
||||||
return origin;
|
return origin;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user