bgp->update_delay_over = 0;
if (!found)
- vty_out(vty, "%%BGP: No %s peer configured",
+ vty_out(vty, "%%BGP: No %s peer configured\n",
afi_safi_print(afi, safi));
return CMD_SUCCESS;
int idx_asn = 2;
int idx_view_vrf = 3;
int idx_vrf = 4;
+ int is_new_bgp = 0;
int ret;
as_t as;
struct bgp *bgp;
inst_type = BGP_INSTANCE_TYPE_VIEW;
}
+ if (inst_type == BGP_INSTANCE_TYPE_DEFAULT)
+ is_new_bgp = (bgp_lookup(as, name) == NULL);
+
ret = bgp_get(&bgp, &as, name, inst_type);
switch (ret) {
case BGP_ERR_MULTIPLE_INSTANCE_NOT_SET:
* any pending VRF-VPN leaking that was configured via
* earlier "router bgp X vrf FOO" blocks.
*/
- if (inst_type == BGP_INSTANCE_TYPE_DEFAULT)
+ if (is_new_bgp && inst_type == BGP_INSTANCE_TYPE_DEFAULT)
vpn_leak_postchange_all();
/* Pending: handle when user tries to change a view to vrf n vv.