diff --git a/pimd/pim6_stubs.c b/pimd/pim6_stubs.c index 818b137abf..cf61685fb1 100644 --- a/pimd/pim6_stubs.c +++ b/pimd/pim6_stubs.c @@ -37,22 +37,6 @@ void pim_nht_bsr_del(struct pim_instance *pim, struct in_addr addr) { } -int zclient_lookup_nexthop(struct pim_instance *pim, - struct pim_zlookup_nexthop nexthop_tab[], - const int tab_size, pim_addr addr, - int max_lookup) -{ - return -1; -} - -void zclient_lookup_new(void) -{ -} - -void zclient_lookup_free(void) -{ -} - /* * PIM register */ diff --git a/pimd/pim_addr.h b/pimd/pim_addr.h index eca907da37..90862520af 100644 --- a/pimd/pim_addr.h +++ b/pimd/pim_addr.h @@ -31,6 +31,8 @@ typedef struct in_addr pim_addr; #define PIM_ADDRSTRLEN INET_ADDRSTRLEN #define PIM_AF AF_INET #define PIM_AFI AFI_IP +#define PIM_IPADDR IPADDR_V4 +#define ipaddr_pim ipaddr_v4 #define PIM_MAX_BITLEN IPV4_MAX_BITLEN #define PIM_AF_NAME "ip" @@ -52,6 +54,8 @@ typedef struct in6_addr pim_addr; #define PIM_ADDRSTRLEN INET6_ADDRSTRLEN #define PIM_AF AF_INET6 #define PIM_AFI AFI_IP6 +#define PIM_IPADDR IPADDR_V6 +#define ipaddr_pim ipaddr_v6 #define PIM_MAX_BITLEN IPV6_MAX_BITLEN #define PIM_AF_NAME "ipv6" diff --git a/pimd/pim_zlookup.c b/pimd/pim_zlookup.c index 79969ce9f0..0df7e4235e 100644 --- a/pimd/pim_zlookup.c +++ b/pimd/pim_zlookup.c @@ -199,11 +199,12 @@ static int zclient_read_nexthop(struct pim_instance *pim, stream_get_ipaddr(s, &raddr); - if (raddr.ipa_type != IPADDR_V4 || - raddr.ipaddr_v4.s_addr != addr.s_addr) + if (raddr.ipa_type != PIM_IPADDR || + pim_addr_cmp(raddr.ipaddr_pim, addr)) { zlog_warn("%s: address mismatch: addr=%pPA(%s) raddr=%pIA", __func__, &addr, pim->vrf->name, &raddr); - /* warning only */ + /* warning only */ + } distance = stream_getc(s); metric = stream_getl(s); @@ -328,8 +329,8 @@ static int zclient_lookup_nexthop_once(struct pim_instance *pim, return -1; } - ipaddr.ipa_type = IPADDR_V4; - ipaddr.ipaddr_v4 = addr; + ipaddr.ipa_type = PIM_IPADDR; + ipaddr.ipaddr_pim = addr; s = zlookup->obuf; stream_reset(s); @@ -480,6 +481,7 @@ void pim_zlookup_show_ip_multicast(struct vty *vty) } } +#if PIM_IPV == 4 int pim_zlookup_sg_statistics(struct channel_oil *c_oil) { struct stream *s = zlookup->obuf; @@ -568,3 +570,4 @@ int pim_zlookup_sg_statistics(struct channel_oil *c_oil) return 0; } +#endif diff --git a/pimd/subdir.am b/pimd/subdir.am index ba7bdb3493..41fc6dc632 100644 --- a/pimd/subdir.am +++ b/pimd/subdir.am @@ -55,6 +55,7 @@ pim_common = \ pimd/pim_util.c \ pimd/pim_vty.c \ pimd/pim_zebra.c \ + pimd/pim_zlookup.c \ pimd/pim_vxlan.c \ pimd/pimd.c \ # end @@ -75,7 +76,6 @@ pimd_pimd_SOURCES = \ pimd/pim_msdp_socket.c \ pimd/pim_register.c \ pimd/pim_signals.c \ - pimd/pim_zlookup.c \ pimd/pim_zpthread.c \ pimd/pim_mroute_msg.c \ # end