summaryrefslogtreecommitdiff
path: root/bgpd/bgp_route.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_route.c')
-rw-r--r--bgpd/bgp_route.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 41966192d8..0f719d5536 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -4540,7 +4540,7 @@ bgp_purge_static_redist_routes (struct bgp *bgp)
* I think it can probably be factored with bgp_static_set.
*/
int
-bgp_static_set_safi (safi_t safi, struct vty *vty, const char *ip_str,
+bgp_static_set_safi (afi_t afi, safi_t safi, struct vty *vty, const char *ip_str,
const char *rd_str, const char *tag_str,
const char *rmap_str, int evpn_type, const char *esi, const char *gwip,
const char *ethtag, const char *routermac)
@@ -4554,14 +4554,8 @@ bgp_static_set_safi (safi_t safi, struct vty *vty, const char *ip_str,
struct bgp_table *table;
struct bgp_static *bgp_static;
u_char tag[3];
- afi_t afi;
struct prefix gw_ip;
- if(safi == SAFI_EVPN)
- afi = AFI_L2VPN;
- else
- afi = AFI_IP;
-
/* validate ip prefix */
ret = str2prefix (ip_str, &p);
if (! ret)
@@ -4686,7 +4680,7 @@ bgp_static_set_safi (safi_t safi, struct vty *vty, const char *ip_str,
/* Configure static BGP network. */
int
-bgp_static_unset_safi(safi_t safi, struct vty *vty, const char *ip_str,
+bgp_static_unset_safi(afi_t afi, safi_t safi, struct vty *vty, const char *ip_str,
const char *rd_str, const char *tag_str,
int evpn_type, const char *esi, const char *gwip, const char *ethtag)
{
@@ -4699,12 +4693,6 @@ bgp_static_unset_safi(safi_t safi, struct vty *vty, const char *ip_str,
struct bgp_table *table;
struct bgp_static *bgp_static;
u_char tag[3];
- afi_t afi;
-
- if(safi == SAFI_EVPN)
- afi = AFI_L2VPN;
- else
- afi = AFI_IP;
/* Convert IP prefix string to struct prefix. */
ret = str2prefix (ip_str, &p);