mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 15:23:39 +00:00
Merge pull request #726 from chiragshah6/pim_dev
pimd: move variable declartion outside of switch
This commit is contained in:
commit
44d7e121fd
@ -678,6 +678,9 @@ pim_parse_nexthop_update (int command, struct zclient *zclient,
|
|||||||
struct pim_nexthop_cache *pnc = NULL;
|
struct pim_nexthop_cache *pnc = NULL;
|
||||||
struct pim_neighbor *nbr = NULL;
|
struct pim_neighbor *nbr = NULL;
|
||||||
struct interface *ifp = NULL;
|
struct interface *ifp = NULL;
|
||||||
|
struct interface *ifp1 = NULL;
|
||||||
|
struct pim_interface *pim_ifp = NULL;
|
||||||
|
char str[INET_ADDRSTRLEN];
|
||||||
|
|
||||||
s = zclient->ibuf;
|
s = zclient->ibuf;
|
||||||
memset (&p, 0, sizeof (struct prefix));
|
memset (&p, 0, sizeof (struct prefix));
|
||||||
@ -753,7 +756,7 @@ pim_parse_nexthop_update (int command, struct zclient *zclient,
|
|||||||
case NEXTHOP_TYPE_IPV6_IFINDEX:
|
case NEXTHOP_TYPE_IPV6_IFINDEX:
|
||||||
stream_get (&nexthop->gate.ipv6, s, 16);
|
stream_get (&nexthop->gate.ipv6, s, 16);
|
||||||
nexthop->ifindex = stream_getl (s);
|
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);
|
nbr = pim_neighbor_find_if (ifp1);
|
||||||
/* Overwrite with Nbr address as NH addr */
|
/* Overwrite with Nbr address as NH addr */
|
||||||
if (nbr)
|
if (nbr)
|
||||||
@ -761,7 +764,6 @@ pim_parse_nexthop_update (int command, struct zclient *zclient,
|
|||||||
nexthop->gate.ipv4 = nbr->source_addr;
|
nexthop->gate.ipv4 = nbr->source_addr;
|
||||||
if (PIM_DEBUG_TRACE)
|
if (PIM_DEBUG_TRACE)
|
||||||
{
|
{
|
||||||
char str[INET_ADDRSTRLEN];
|
|
||||||
pim_inet4_dump ("<nht_nbr?>", nbr->source_addr, str,
|
pim_inet4_dump ("<nht_nbr?>", nbr->source_addr, str,
|
||||||
sizeof (str));
|
sizeof (str));
|
||||||
zlog_debug ("%s: NHT using pim nbr addr %s interface %s as rpf",
|
zlog_debug ("%s: NHT using pim nbr addr %s interface %s as rpf",
|
||||||
@ -772,7 +774,7 @@ pim_parse_nexthop_update (int command, struct zclient *zclient,
|
|||||||
{
|
{
|
||||||
if (PIM_DEBUG_TRACE)
|
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 ",
|
zlog_debug ("%s: NHT pim nbr not found on interface %s nbr count:%d ",
|
||||||
__PRETTY_FUNCTION__, ifp1->name,
|
__PRETTY_FUNCTION__, ifp1->name,
|
||||||
pim_ifp->pim_neighbor_list->count);
|
pim_ifp->pim_neighbor_list->count);
|
||||||
|
Loading…
Reference in New Issue
Block a user