Merge pull request #556 from dslicenc/bgp-fixes

Bgp fixes
This commit is contained in:
Renato Westphal 2017-05-17 21:37:01 -03:00 committed by GitHub
commit be371e2318
2 changed files with 3 additions and 2 deletions

View File

@ -1026,7 +1026,7 @@ bgp_stop (struct peer *peer)
zlog_info ("%%ADJCHANGE: neighbor %s(%s) in vrf %s Down %s",
peer->host,
(peer->hostname) ? peer->hostname : "Unknown",
(vrf->vrf_id != VRF_DEFAULT) ? vrf->name : "Default",
vrf ? ((vrf->vrf_id != VRF_DEFAULT) ? vrf->name : "Default") : "",
peer_down_str [(int) peer->last_reset]);
}

View File

@ -1469,7 +1469,8 @@ bgp_zebra_announce (struct prefix *p, struct bgp_info *info, struct bgp *bgp,
if (!ifindex)
{
if (info->peer->conf_if || info->peer->ifname)
ifindex = if_nametoindex (info->peer->conf_if ? info->peer->conf_if : info->peer->ifname);
ifindex = ifname2ifindex_vrf (info->peer->conf_if ? info->peer->conf_if :
info->peer->ifname, bgp->vrf_id);
else if (info->peer->nexthop.ifp)
ifindex = info->peer->nexthop.ifp->ifindex;
}