mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 22:37:49 +00:00
bgpd: Cleanup warnings found in CI
Cleanup some of the warnings found in the CI system. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
f27f864ebe
commit
020a3f60bd
@ -763,11 +763,19 @@ void vpn_leak_from_vrf_update(struct bgp *bgp_vpn, /* to */
|
||||
if (!CHECK_FLAG(bgp_vrf->af_flags[afi][SAFI_UNICAST],
|
||||
BGP_CONFIG_VRF_TO_VRF_EXPORT)) {
|
||||
if (afi == AFI_IP) {
|
||||
/* For ipv4, copy to multiprotocol nexthop field */
|
||||
static_attr.mp_nexthop_global_in = static_attr.nexthop;
|
||||
/*
|
||||
* For ipv4, copy to multiprotocol
|
||||
* nexthop field
|
||||
*/
|
||||
static_attr.mp_nexthop_global_in =
|
||||
static_attr.nexthop;
|
||||
static_attr.mp_nexthop_len = 4;
|
||||
/* XXX Leave static_attr.nexthop intact for NHT */
|
||||
static_attr.flag &= ~ATTR_FLAG_BIT(BGP_ATTR_NEXT_HOP);
|
||||
/*
|
||||
* XXX Leave static_attr.nexthop
|
||||
* intact for NHT
|
||||
*/
|
||||
static_attr.flag &=
|
||||
~ATTR_FLAG_BIT(BGP_ATTR_NEXT_HOP);
|
||||
}
|
||||
} else {
|
||||
/* Update based on next-hop family to account for
|
||||
@ -1523,7 +1531,7 @@ void vrf_unimport_from_vrf(struct bgp *bgp, struct bgp *vrf_bgp,
|
||||
for (ALL_LIST_ELEMENTS_RO(bgp->vpn_policy[afi].import_vrf, node,
|
||||
vname)) {
|
||||
if (strcmp(vname, vrf_bgp->name) == 0)
|
||||
break;
|
||||
break;
|
||||
}
|
||||
if (!vname)
|
||||
return;
|
||||
|
@ -6682,7 +6682,8 @@ DEFPY (bgp_imexport_vrf,
|
||||
ret = bgp_get(&vrf_bgp, &as, import_name,
|
||||
BGP_INSTANCE_TYPE_VRF);
|
||||
if (ret) {
|
||||
vty_out(vty, "VRF %s is not configured as a bgp instance\n",
|
||||
vty_out(vty,
|
||||
"VRF %s is not configured as a bgp instance\n",
|
||||
import_name);
|
||||
return CMD_WARNING;
|
||||
}
|
||||
@ -10896,17 +10897,20 @@ static int bgp_show_route_leak_vty(struct vty *vty, const char *name,
|
||||
} else {
|
||||
bgp = bgp_get_default();
|
||||
if (!bgp) {
|
||||
vty_out(vty, "%% Default BGP instance does not exist\n");
|
||||
vty_out(vty,
|
||||
"%% Default BGP instance does not exist\n");
|
||||
return CMD_WARNING;
|
||||
}
|
||||
}
|
||||
|
||||
if (!CHECK_FLAG(bgp->af_flags[afi][safi],
|
||||
BGP_CONFIG_VRF_TO_VRF_IMPORT)) {
|
||||
vty_out(vty, "This VRF is not importing %s routes from any other VRF\n",
|
||||
vty_out(vty,
|
||||
"This VRF is not importing %s routes from any other VRF\n",
|
||||
afi_safi_print(afi, safi));
|
||||
} else {
|
||||
vty_out(vty, "This VRF is importing %s routes from the following VRFs:\n",
|
||||
vty_out(vty,
|
||||
"This VRF is importing %s routes from the following VRFs:\n",
|
||||
afi_safi_print(afi, safi));
|
||||
for (ALL_LIST_ELEMENTS_RO(bgp->vpn_policy[afi].import_vrf, node,
|
||||
vname)) {
|
||||
@ -10922,10 +10926,12 @@ static int bgp_show_route_leak_vty(struct vty *vty, const char *name,
|
||||
|
||||
if (!CHECK_FLAG(bgp->af_flags[afi][safi],
|
||||
BGP_CONFIG_VRF_TO_VRF_EXPORT)) {
|
||||
vty_out(vty, "This VRF is not exporting %s routes to any other VRF\n",
|
||||
vty_out(vty,
|
||||
"This VRF is not exporting %s routes to any other VRF\n",
|
||||
afi_safi_print(afi, safi));
|
||||
} else {
|
||||
vty_out(vty, "This VRF is exporting %s routes to the following VRFs:\n",
|
||||
vty_out(vty,
|
||||
"This VRF is exporting %s routes to the following VRFs:\n",
|
||||
afi_safi_print(afi, safi));
|
||||
for (ALL_LIST_ELEMENTS_RO(bgp->vpn_policy[afi].export_vrf, node,
|
||||
vname)) {
|
||||
@ -10970,7 +10976,8 @@ DEFUN (show_ip_bgp_route_leak,
|
||||
}
|
||||
/* [vrf VIEWVRFNAME] */
|
||||
if (argv_find(argv, argc, "view", &idx)) {
|
||||
vty_out(vty, "%% This command is not applicable to BGP views\n");
|
||||
vty_out(vty,
|
||||
"%% This command is not applicable to BGP views\n");
|
||||
return CMD_WARNING;
|
||||
}
|
||||
|
||||
@ -10982,7 +10989,8 @@ DEFUN (show_ip_bgp_route_leak,
|
||||
}
|
||||
|
||||
if (!((afi == AFI_IP || afi == AFI_IP6) && safi == SAFI_UNICAST)) {
|
||||
vty_out(vty, "%% This command is applicable only for unicast ipv4|ipv6\n");
|
||||
vty_out(vty,
|
||||
"%% This command is applicable only for unicast ipv4|ipv6\n");
|
||||
return CMD_WARNING;
|
||||
}
|
||||
|
||||
|
@ -941,7 +941,8 @@ static struct in6_addr *bgp_info_to_ipv6_nexthop(struct bgp_info *info,
|
||||
nexthop =
|
||||
&info->peer->su_remote->sin6.sin6_addr;
|
||||
if (IN6_IS_ADDR_LINKLOCAL(nexthop))
|
||||
*ifindex = info->peer->nexthop.ifp->ifindex;
|
||||
*ifindex =
|
||||
info->peer->nexthop.ifp->ifindex;
|
||||
} else {
|
||||
nexthop = &info->attr->mp_nexthop_local;
|
||||
if (IN6_IS_ADDR_LINKLOCAL(nexthop))
|
||||
@ -1198,9 +1199,10 @@ void bgp_zebra_announce(struct bgp_node *rn, struct prefix *p,
|
||||
|
||||
tag = info->attr->tag;
|
||||
|
||||
/* When we create an aggregate route we must also install a Null0 route
|
||||
* in
|
||||
* the RIB */
|
||||
/*
|
||||
* When we create an aggregate route we must also install a
|
||||
* Null0 route in the RIB
|
||||
*/
|
||||
if (info->sub_type == BGP_ROUTE_AGGREGATE)
|
||||
zapi_route_set_blackhole(&api, BLACKHOLE_NULL);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user