mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 06:50:25 +00:00
Merge pull request #726 from chiragshah6/pim_dev
pimd: move variable declartion outside of switch
This commit is contained in:
commit
44d7e121fd
@ -531,8 +531,8 @@ pim_ecmp_nexthop_search (struct pim_nexthop_cache *pnc,
|
||||
curr_route_valid = (nexthop->interface->ifindex == nh_node->ifindex);
|
||||
|
||||
if (curr_route_valid &&
|
||||
!pim_if_connected_to_source (nexthop->interface,
|
||||
src->u.prefix4))
|
||||
!pim_if_connected_to_source (nexthop->interface,
|
||||
src->u.prefix4))
|
||||
{
|
||||
nbr = pim_neighbor_find (nexthop->interface,
|
||||
nexthop->mrib_nexthop_addr.u.prefix4);
|
||||
@ -678,6 +678,9 @@ pim_parse_nexthop_update (int command, struct zclient *zclient,
|
||||
struct pim_nexthop_cache *pnc = NULL;
|
||||
struct pim_neighbor *nbr = NULL;
|
||||
struct interface *ifp = NULL;
|
||||
struct interface *ifp1 = NULL;
|
||||
struct pim_interface *pim_ifp = NULL;
|
||||
char str[INET_ADDRSTRLEN];
|
||||
|
||||
s = zclient->ibuf;
|
||||
memset (&p, 0, sizeof (struct prefix));
|
||||
@ -753,7 +756,7 @@ pim_parse_nexthop_update (int command, struct zclient *zclient,
|
||||
case NEXTHOP_TYPE_IPV6_IFINDEX:
|
||||
stream_get (&nexthop->gate.ipv6, s, 16);
|
||||
nexthop->ifindex = stream_getl (s);
|
||||
struct interface *ifp1 = if_lookup_by_index (nexthop->ifindex, VRF_DEFAULT);
|
||||
ifp1 = if_lookup_by_index (nexthop->ifindex, VRF_DEFAULT);
|
||||
nbr = pim_neighbor_find_if (ifp1);
|
||||
/* Overwrite with Nbr address as NH addr */
|
||||
if (nbr)
|
||||
@ -761,21 +764,20 @@ pim_parse_nexthop_update (int command, struct zclient *zclient,
|
||||
nexthop->gate.ipv4 = nbr->source_addr;
|
||||
if (PIM_DEBUG_TRACE)
|
||||
{
|
||||
char str[INET_ADDRSTRLEN];
|
||||
pim_inet4_dump ("<nht_nbr?>", nbr->source_addr, str,
|
||||
sizeof (str));
|
||||
zlog_debug ("%s: NHT using pim nbr addr %s interface %s as rpf",
|
||||
__PRETTY_FUNCTION__, str, ifp1->name);
|
||||
__PRETTY_FUNCTION__, str, ifp1->name);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (PIM_DEBUG_TRACE)
|
||||
{
|
||||
struct pim_interface *pim_ifp = ifp1->info;
|
||||
pim_ifp = ifp1->info;
|
||||
zlog_debug ("%s: NHT pim nbr not found on interface %s nbr count:%d ",
|
||||
__PRETTY_FUNCTION__, ifp1->name,
|
||||
pim_ifp->pim_neighbor_list->count);
|
||||
__PRETTY_FUNCTION__, ifp1->name,
|
||||
pim_ifp->pim_neighbor_list->count);
|
||||
}
|
||||
//Mark nexthop address to 0 until PIM Nbr is resolved.
|
||||
nexthop->gate.ipv4.s_addr = PIM_NET_INADDR_ANY;
|
||||
|
Loading…
Reference in New Issue
Block a user