diff options
| author | Stephen Worley <sworley@nvidia.com> | 2022-03-11 13:28:30 -0500 | 
|---|---|---|
| committer | Stephen Worley <sworley@nvidia.com> | 2022-08-23 12:41:25 -0400 | 
| commit | 5ad4fc6ce9b2e8b2161484a5fb86410976cc8fd9 (patch) | |
| tree | 8886ab90cde1c80a7f9e070be173ccfee7c3dd7b /lib/prefix.c | |
| parent | 133c000cc2fd943b49d1f11c9c81048337326181 (diff) | |
lib: use evpn type enum for prefix conversion
Use the evpn type enum for the evpn_prefix2prefix conversion.
Signed-off-by: Stephen Worley <sworley@nvidia.com>
Diffstat (limited to 'lib/prefix.c')
| -rw-r--r-- | lib/prefix.c | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/prefix.c b/lib/prefix.c index a3b8e5c823..4642f14d35 100644 --- a/lib/prefix.c +++ b/lib/prefix.c @@ -1441,7 +1441,7 @@ int evpn_prefix2prefix(const struct prefix *evpn, struct prefix *to)  	addr = &evpn->u.prefix_evpn;  	switch (addr->route_type) { -	case (2): +	case BGP_EVPN_MAC_IP_ROUTE:  		if (IS_IPADDR_V4(&addr->macip_addr.ip))  			ipaddr2prefix(&addr->macip_addr.ip, 32, to);  		else if (IS_IPADDR_V6(&addr->macip_addr.ip)) @@ -1450,7 +1450,7 @@ int evpn_prefix2prefix(const struct prefix *evpn, struct prefix *to)  			return -1; /* mac only? */  		break; -	case (5): +	case BGP_EVPN_IP_PREFIX_ROUTE:  		ipaddr2prefix(&addr->prefix_addr.ip,  			      addr->prefix_addr.ip_prefix_length, to);  		break;  | 
