mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 13:33:15 +00:00
commit
b43d5ea330
@ -817,6 +817,7 @@ static void pim_show_interfaces_single(struct vty *vty, const char *ifname, u_ch
|
|||||||
mloop = pim_socket_mcastloop_get(pim_ifp->pim_sock_fd);
|
mloop = pim_socket_mcastloop_get(pim_ifp->pim_sock_fd);
|
||||||
|
|
||||||
if (uj) {
|
if (uj) {
|
||||||
|
char pbuf[PREFIX2STR_BUFFER];
|
||||||
json_row = json_object_new_object();
|
json_row = json_object_new_object();
|
||||||
json_object_pim_ifp_add(json_row, ifp);
|
json_object_pim_ifp_add(json_row, ifp);
|
||||||
|
|
||||||
@ -828,7 +829,10 @@ static void pim_show_interfaces_single(struct vty *vty, const char *ifname, u_ch
|
|||||||
|
|
||||||
sec_list = json_object_new_array();
|
sec_list = json_object_new_array();
|
||||||
for (ALL_LIST_ELEMENTS_RO(pim_ifp->sec_addr_list, sec_node, sec_addr)) {
|
for (ALL_LIST_ELEMENTS_RO(pim_ifp->sec_addr_list, sec_node, sec_addr)) {
|
||||||
json_object_array_add(sec_list, json_object_new_string(inet_ntoa(sec_addr->addr)));
|
json_object_array_add(sec_list,
|
||||||
|
json_object_new_string(prefix2str(&sec_addr->addr,
|
||||||
|
pbuf,
|
||||||
|
sizeof(pbuf))));
|
||||||
}
|
}
|
||||||
json_object_object_add(json_row, "secondaryAddressList", sec_list);
|
json_object_object_add(json_row, "secondaryAddressList", sec_list);
|
||||||
}
|
}
|
||||||
@ -919,11 +923,14 @@ static void pim_show_interfaces_single(struct vty *vty, const char *ifname, u_ch
|
|||||||
vty_out(vty, "Use Source : %s%s", inet_ntoa(pim_ifp->update_source), VTY_NEWLINE);
|
vty_out(vty, "Use Source : %s%s", inet_ntoa(pim_ifp->update_source), VTY_NEWLINE);
|
||||||
}
|
}
|
||||||
if (pim_ifp->sec_addr_list) {
|
if (pim_ifp->sec_addr_list) {
|
||||||
|
char pbuf[PREFIX2STR_BUFFER];
|
||||||
vty_out(vty, "Address : %s (primary)%s",
|
vty_out(vty, "Address : %s (primary)%s",
|
||||||
inet_ntoa(ifaddr), VTY_NEWLINE);
|
inet_ntoa(ifaddr), VTY_NEWLINE);
|
||||||
for (ALL_LIST_ELEMENTS_RO(pim_ifp->sec_addr_list, sec_node, sec_addr)) {
|
for (ALL_LIST_ELEMENTS_RO(pim_ifp->sec_addr_list, sec_node, sec_addr)) {
|
||||||
vty_out(vty, " %s%s",
|
vty_out(vty, " %s%s",
|
||||||
inet_ntoa(sec_addr->addr), VTY_NEWLINE);
|
prefix2str(&sec_addr->addr,
|
||||||
|
pbuf,
|
||||||
|
sizeof(pbuf)), VTY_NEWLINE);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
vty_out(vty, "Address : %s%s", inet_ntoa(ifaddr), VTY_NEWLINE);
|
vty_out(vty, "Address : %s%s", inet_ntoa(ifaddr), VTY_NEWLINE);
|
||||||
@ -1614,13 +1621,9 @@ static void pim_show_neighbors_secondary(struct vty *vty)
|
|||||||
neigh_src_str, sizeof(neigh_src_str));
|
neigh_src_str, sizeof(neigh_src_str));
|
||||||
|
|
||||||
for (ALL_LIST_ELEMENTS_RO(neigh->prefix_list, prefix_node, p)) {
|
for (ALL_LIST_ELEMENTS_RO(neigh->prefix_list, prefix_node, p)) {
|
||||||
char neigh_sec_str[INET_ADDRSTRLEN];
|
char neigh_sec_str[PREFIX2STR_BUFFER];
|
||||||
|
|
||||||
if (p->family != AF_INET)
|
prefix2str(p, neigh_sec_str, sizeof(neigh_sec_str));
|
||||||
continue;
|
|
||||||
|
|
||||||
pim_inet4_dump("<src?>", p->u.prefix4,
|
|
||||||
neigh_sec_str, sizeof(neigh_sec_str));
|
|
||||||
|
|
||||||
vty_out(vty, "%-9s %-15s %-15s %-15s%s",
|
vty_out(vty, "%-9s %-15s %-15s %-15s%s",
|
||||||
ifp->name,
|
ifp->name,
|
||||||
@ -3545,6 +3548,31 @@ DEFUN (no_ip_pim_packets,
|
|||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFUN (ip_pim_v6_secondary,
|
||||||
|
ip_pim_v6_secondary_cmd,
|
||||||
|
"ip pim send-v6-secondary",
|
||||||
|
IP_STR
|
||||||
|
"pim multicast routing\n"
|
||||||
|
"Send v6 secondary addresses\n")
|
||||||
|
{
|
||||||
|
pimg->send_v6_secondary = 1;
|
||||||
|
|
||||||
|
return CMD_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
DEFUN (no_ip_pim_v6_secondary,
|
||||||
|
no_ip_pim_v6_secondary_cmd,
|
||||||
|
"no ip pim send-v6-secondary",
|
||||||
|
NO_STR
|
||||||
|
IP_STR
|
||||||
|
"pim multicast routing\n"
|
||||||
|
"Send v6 secondary addresses\n")
|
||||||
|
{
|
||||||
|
pimg->send_v6_secondary = 0;
|
||||||
|
|
||||||
|
return CMD_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
DEFUN (ip_pim_rp,
|
DEFUN (ip_pim_rp,
|
||||||
ip_pim_rp_cmd,
|
ip_pim_rp_cmd,
|
||||||
"ip pim rp A.B.C.D [A.B.C.D/M]",
|
"ip pim rp A.B.C.D [A.B.C.D/M]",
|
||||||
@ -6224,6 +6252,8 @@ void pim_cmd_init()
|
|||||||
install_element (CONFIG_NODE, &no_ip_pim_keep_alive_cmd);
|
install_element (CONFIG_NODE, &no_ip_pim_keep_alive_cmd);
|
||||||
install_element (CONFIG_NODE, &ip_pim_packets_cmd);
|
install_element (CONFIG_NODE, &ip_pim_packets_cmd);
|
||||||
install_element (CONFIG_NODE, &no_ip_pim_packets_cmd);
|
install_element (CONFIG_NODE, &no_ip_pim_packets_cmd);
|
||||||
|
install_element (CONFIG_NODE, &ip_pim_v6_secondary_cmd);
|
||||||
|
install_element (CONFIG_NODE, &no_ip_pim_v6_secondary_cmd);
|
||||||
install_element (CONFIG_NODE, &ip_ssmpingd_cmd);
|
install_element (CONFIG_NODE, &ip_ssmpingd_cmd);
|
||||||
install_element (CONFIG_NODE, &no_ip_ssmpingd_cmd);
|
install_element (CONFIG_NODE, &no_ip_ssmpingd_cmd);
|
||||||
install_element (CONFIG_NODE, &ip_msdp_peer_cmd);
|
install_element (CONFIG_NODE, &ip_msdp_peer_cmd);
|
||||||
|
@ -428,15 +428,14 @@ int pim_hello_recv(struct interface *ifp,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int pim_hello_build_tlv(const char *ifname,
|
int pim_hello_build_tlv(struct interface *ifp,
|
||||||
uint8_t *tlv_buf, int tlv_buf_size,
|
uint8_t *tlv_buf, int tlv_buf_size,
|
||||||
uint16_t holdtime,
|
uint16_t holdtime,
|
||||||
uint32_t dr_priority,
|
uint32_t dr_priority,
|
||||||
uint32_t generation_id,
|
uint32_t generation_id,
|
||||||
uint16_t propagation_delay,
|
uint16_t propagation_delay,
|
||||||
uint16_t override_interval,
|
uint16_t override_interval,
|
||||||
int can_disable_join_suppression,
|
int can_disable_join_suppression)
|
||||||
struct list *ifconnected)
|
|
||||||
{
|
{
|
||||||
uint8_t *curr = tlv_buf;
|
uint8_t *curr = tlv_buf;
|
||||||
uint8_t *pastend = tlv_buf + tlv_buf_size;
|
uint8_t *pastend = tlv_buf + tlv_buf_size;
|
||||||
@ -454,7 +453,7 @@ int pim_hello_build_tlv(const char *ifname,
|
|||||||
if (!curr) {
|
if (!curr) {
|
||||||
if (PIM_DEBUG_PIM_HELLO) {
|
if (PIM_DEBUG_PIM_HELLO) {
|
||||||
zlog_debug("%s: could not set PIM hello Holdtime option for interface %s",
|
zlog_debug("%s: could not set PIM hello Holdtime option for interface %s",
|
||||||
__PRETTY_FUNCTION__, ifname);
|
__PRETTY_FUNCTION__, ifp->name);
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -468,7 +467,7 @@ int pim_hello_build_tlv(const char *ifname,
|
|||||||
if (!tmp) {
|
if (!tmp) {
|
||||||
if (PIM_DEBUG_PIM_HELLO) {
|
if (PIM_DEBUG_PIM_HELLO) {
|
||||||
zlog_debug("%s: could not set PIM LAN Prune Delay option for interface %s",
|
zlog_debug("%s: could not set PIM LAN Prune Delay option for interface %s",
|
||||||
__PRETTY_FUNCTION__, ifname);
|
__PRETTY_FUNCTION__, ifp->name);
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -485,7 +484,7 @@ int pim_hello_build_tlv(const char *ifname,
|
|||||||
if (!curr) {
|
if (!curr) {
|
||||||
if (PIM_DEBUG_PIM_HELLO) {
|
if (PIM_DEBUG_PIM_HELLO) {
|
||||||
zlog_debug("%s: could not set PIM hello DR Priority option for interface %s",
|
zlog_debug("%s: could not set PIM hello DR Priority option for interface %s",
|
||||||
__PRETTY_FUNCTION__, ifname);
|
__PRETTY_FUNCTION__, ifp->name);
|
||||||
}
|
}
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
@ -498,23 +497,38 @@ int pim_hello_build_tlv(const char *ifname,
|
|||||||
if (!curr) {
|
if (!curr) {
|
||||||
if (PIM_DEBUG_PIM_HELLO) {
|
if (PIM_DEBUG_PIM_HELLO) {
|
||||||
zlog_debug("%s: could not set PIM hello Generation ID option for interface %s",
|
zlog_debug("%s: could not set PIM hello Generation ID option for interface %s",
|
||||||
__PRETTY_FUNCTION__, ifname);
|
__PRETTY_FUNCTION__, ifp->name);
|
||||||
}
|
}
|
||||||
return -3;
|
return -3;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Secondary Address List */
|
/* Secondary Address List */
|
||||||
if (ifconnected) {
|
if (ifp->connected->count) {
|
||||||
curr = pim_tlv_append_addrlist_ucast(curr,
|
curr = pim_tlv_append_addrlist_ucast(curr,
|
||||||
pastend,
|
pastend,
|
||||||
ifconnected);
|
ifp->connected,
|
||||||
|
AF_INET);
|
||||||
if (!curr) {
|
if (!curr) {
|
||||||
if (PIM_DEBUG_PIM_HELLO) {
|
if (PIM_DEBUG_PIM_HELLO) {
|
||||||
zlog_debug("%s: could not set PIM hello Secondary Address List option for interface %s",
|
zlog_debug("%s: could not set PIM hello v4 Secondary Address List option for interface %s",
|
||||||
__PRETTY_FUNCTION__, ifname);
|
__PRETTY_FUNCTION__, ifp->name);
|
||||||
}
|
}
|
||||||
return -4;
|
return -4;
|
||||||
}
|
}
|
||||||
|
if (pimg->send_v6_secondary)
|
||||||
|
{
|
||||||
|
curr = pim_tlv_append_addrlist_ucast(curr,
|
||||||
|
pastend,
|
||||||
|
ifp->connected,
|
||||||
|
AF_INET6);
|
||||||
|
if (!curr) {
|
||||||
|
if (PIM_DEBUG_PIM_HELLO) {
|
||||||
|
zlog_debug("%s: could not sent PIM hello v6 secondary Address List option for interface %s",
|
||||||
|
__PRETTY_FUNCTION__, ifp->name);
|
||||||
|
}
|
||||||
|
return -4;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return curr - tlv_buf;
|
return curr - tlv_buf;
|
||||||
|
@ -29,15 +29,14 @@ int pim_hello_recv(struct interface *ifp,
|
|||||||
struct in_addr src_addr,
|
struct in_addr src_addr,
|
||||||
uint8_t *tlv_buf, int tlv_buf_size);
|
uint8_t *tlv_buf, int tlv_buf_size);
|
||||||
|
|
||||||
int pim_hello_build_tlv(const char *ifname,
|
int pim_hello_build_tlv(struct interface *ifp,
|
||||||
uint8_t *tlv_buf, int tlv_buf_size,
|
uint8_t *tlv_buf, int tlv_buf_size,
|
||||||
uint16_t holdtime,
|
uint16_t holdtime,
|
||||||
uint32_t dr_priority,
|
uint32_t dr_priority,
|
||||||
uint32_t generation_id,
|
uint32_t generation_id,
|
||||||
uint16_t propagation_delay,
|
uint16_t propagation_delay,
|
||||||
uint16_t override_interval,
|
uint16_t override_interval,
|
||||||
int can_disable_join_suppression,
|
int can_disable_join_suppression);
|
||||||
struct list *ifconnected);
|
|
||||||
|
|
||||||
void pim_hello_require(struct interface *ifp);
|
void pim_hello_require(struct interface *ifp);
|
||||||
|
|
||||||
|
@ -324,12 +324,29 @@ static int pim_sec_addr_comp(const void *p1, const void *p2)
|
|||||||
const struct pim_secondary_addr *sec1 = p1;
|
const struct pim_secondary_addr *sec1 = p1;
|
||||||
const struct pim_secondary_addr *sec2 = p2;
|
const struct pim_secondary_addr *sec2 = p2;
|
||||||
|
|
||||||
if (ntohl(sec1->addr.s_addr) < ntohl(sec2->addr.s_addr))
|
if (sec1->addr.family == AF_INET &&
|
||||||
|
sec2->addr.family == AF_INET6)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (ntohl(sec1->addr.s_addr) > ntohl(sec2->addr.s_addr))
|
if (sec1->addr.family == AF_INET6 &&
|
||||||
|
sec2->addr.family == AF_INET)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
if (sec1->addr.family == AF_INET)
|
||||||
|
{
|
||||||
|
if (ntohl(sec1->addr.u.prefix4.s_addr) < ntohl(sec2->addr.u.prefix4.s_addr))
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if (ntohl(sec1->addr.u.prefix4.s_addr) > ntohl(sec2->addr.u.prefix4.s_addr))
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return memcmp (&sec1->addr.u.prefix6,
|
||||||
|
&sec2->addr.u.prefix6,
|
||||||
|
sizeof (struct in6_addr));
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -339,7 +356,7 @@ static void pim_sec_addr_free(struct pim_secondary_addr *sec_addr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct pim_secondary_addr *
|
static struct pim_secondary_addr *
|
||||||
pim_sec_addr_find(struct pim_interface *pim_ifp, struct in_addr addr)
|
pim_sec_addr_find(struct pim_interface *pim_ifp, struct prefix *addr)
|
||||||
{
|
{
|
||||||
struct pim_secondary_addr *sec_addr;
|
struct pim_secondary_addr *sec_addr;
|
||||||
struct listnode *node;
|
struct listnode *node;
|
||||||
@ -349,7 +366,7 @@ pim_sec_addr_find(struct pim_interface *pim_ifp, struct in_addr addr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (ALL_LIST_ELEMENTS_RO(pim_ifp->sec_addr_list, node, sec_addr)) {
|
for (ALL_LIST_ELEMENTS_RO(pim_ifp->sec_addr_list, node, sec_addr)) {
|
||||||
if (sec_addr->addr.s_addr == addr.s_addr) {
|
if (prefix_cmp(&sec_addr->addr, addr)) {
|
||||||
return sec_addr;
|
return sec_addr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -364,7 +381,7 @@ static void pim_sec_addr_del(struct pim_interface *pim_ifp,
|
|||||||
pim_sec_addr_free(sec_addr);
|
pim_sec_addr_free(sec_addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pim_sec_addr_add(struct pim_interface *pim_ifp, struct in_addr addr)
|
static int pim_sec_addr_add(struct pim_interface *pim_ifp, struct prefix *addr)
|
||||||
{
|
{
|
||||||
int changed = 0;
|
int changed = 0;
|
||||||
struct pim_secondary_addr *sec_addr;
|
struct pim_secondary_addr *sec_addr;
|
||||||
@ -391,7 +408,7 @@ static int pim_sec_addr_add(struct pim_interface *pim_ifp, struct in_addr addr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
changed = 1;
|
changed = 1;
|
||||||
sec_addr->addr = addr;
|
sec_addr->addr = *addr;
|
||||||
listnode_add_sort(pim_ifp->sec_addr_list, sec_addr);
|
listnode_add_sort(pim_ifp->sec_addr_list, sec_addr);
|
||||||
|
|
||||||
return changed;
|
return changed;
|
||||||
@ -433,10 +450,6 @@ static int pim_sec_addr_update(struct interface *ifp)
|
|||||||
for (ALL_LIST_ELEMENTS_RO(ifp->connected, node, ifc)) {
|
for (ALL_LIST_ELEMENTS_RO(ifp->connected, node, ifc)) {
|
||||||
struct prefix *p = ifc->address;
|
struct prefix *p = ifc->address;
|
||||||
|
|
||||||
if (p->family != AF_INET) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (PIM_INADDR_IS_ANY(p->u.prefix4)) {
|
if (PIM_INADDR_IS_ANY(p->u.prefix4)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -446,7 +459,7 @@ static int pim_sec_addr_update(struct interface *ifp)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pim_sec_addr_add(pim_ifp, p->u.prefix4)) {
|
if (pim_sec_addr_add(pim_ifp, p)) {
|
||||||
changed = 1;
|
changed = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -571,12 +584,15 @@ void pim_if_addr_add(struct connected *ifc)
|
|||||||
|
|
||||||
detect_address_change(ifp, 0, __PRETTY_FUNCTION__);
|
detect_address_change(ifp, 0, __PRETTY_FUNCTION__);
|
||||||
|
|
||||||
|
if (ifc->address->family != AF_INET)
|
||||||
|
return;
|
||||||
|
|
||||||
if (PIM_IF_TEST_IGMP(pim_ifp->options)) {
|
if (PIM_IF_TEST_IGMP(pim_ifp->options)) {
|
||||||
struct igmp_sock *igmp;
|
struct igmp_sock *igmp;
|
||||||
|
|
||||||
/* lookup IGMP socket */
|
/* lookup IGMP socket */
|
||||||
igmp = pim_igmp_sock_lookup_ifaddr(pim_ifp->igmp_socket_list,
|
igmp = pim_igmp_sock_lookup_ifaddr(pim_ifp->igmp_socket_list,
|
||||||
ifaddr);
|
ifaddr);
|
||||||
if (!igmp) {
|
if (!igmp) {
|
||||||
/* if addr new, add IGMP socket */
|
/* if addr new, add IGMP socket */
|
||||||
pim_igmp_sock_add(pim_ifp->igmp_socket_list, ifaddr, ifp);
|
pim_igmp_sock_add(pim_ifp->igmp_socket_list, ifaddr, ifp);
|
||||||
@ -675,14 +691,17 @@ void pim_if_addr_del(struct connected *ifc, int force_prim_as_any)
|
|||||||
ifp = ifc->ifp;
|
ifp = ifc->ifp;
|
||||||
zassert(ifp);
|
zassert(ifp);
|
||||||
|
|
||||||
|
if (ifc->address->family != AF_INET)
|
||||||
|
return;
|
||||||
|
|
||||||
if (PIM_DEBUG_ZEBRA) {
|
if (PIM_DEBUG_ZEBRA) {
|
||||||
char buf[BUFSIZ];
|
char buf[BUFSIZ];
|
||||||
prefix2str(ifc->address, buf, BUFSIZ);
|
prefix2str(ifc->address, buf, BUFSIZ);
|
||||||
zlog_debug("%s: %s ifindex=%d disconnected IP address %s %s",
|
zlog_debug("%s: %s ifindex=%d disconnected IP address %s %s",
|
||||||
__PRETTY_FUNCTION__,
|
__PRETTY_FUNCTION__,
|
||||||
ifp->name, ifp->ifindex, buf,
|
ifp->name, ifp->ifindex, buf,
|
||||||
CHECK_FLAG(ifc->flags, ZEBRA_IFA_SECONDARY) ?
|
CHECK_FLAG(ifc->flags, ZEBRA_IFA_SECONDARY) ?
|
||||||
"secondary" : "primary");
|
"secondary" : "primary");
|
||||||
}
|
}
|
||||||
|
|
||||||
detect_address_change(ifp, force_prim_as_any, __PRETTY_FUNCTION__);
|
detect_address_change(ifp, force_prim_as_any, __PRETTY_FUNCTION__);
|
||||||
@ -709,12 +728,9 @@ void pim_if_addr_add_all(struct interface *ifp)
|
|||||||
struct prefix *p = ifc->address;
|
struct prefix *p = ifc->address;
|
||||||
|
|
||||||
if (p->family != AF_INET)
|
if (p->family != AF_INET)
|
||||||
{
|
v6_addrs++;
|
||||||
v6_addrs++;
|
else
|
||||||
continue;
|
v4_addrs++;
|
||||||
}
|
|
||||||
|
|
||||||
v4_addrs++;
|
|
||||||
pim_if_addr_add(ifc);
|
pim_if_addr_add(ifc);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1105,6 +1121,7 @@ struct pim_neighbor *pim_if_find_neighbor(struct interface *ifp,
|
|||||||
struct listnode *neighnode;
|
struct listnode *neighnode;
|
||||||
struct pim_neighbor *neigh;
|
struct pim_neighbor *neigh;
|
||||||
struct pim_interface *pim_ifp;
|
struct pim_interface *pim_ifp;
|
||||||
|
struct prefix p;
|
||||||
|
|
||||||
zassert(ifp);
|
zassert(ifp);
|
||||||
|
|
||||||
@ -1116,6 +1133,10 @@ struct pim_neighbor *pim_if_find_neighbor(struct interface *ifp,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p.family = AF_INET;
|
||||||
|
p.u.prefix4 = addr;
|
||||||
|
p.prefixlen = IPV4_MAX_PREFIXLEN;
|
||||||
|
|
||||||
for (ALL_LIST_ELEMENTS_RO(pim_ifp->pim_neighbor_list, neighnode, neigh)) {
|
for (ALL_LIST_ELEMENTS_RO(pim_ifp->pim_neighbor_list, neighnode, neigh)) {
|
||||||
|
|
||||||
/* primary address ? */
|
/* primary address ? */
|
||||||
@ -1123,7 +1144,7 @@ struct pim_neighbor *pim_if_find_neighbor(struct interface *ifp,
|
|||||||
return neigh;
|
return neigh;
|
||||||
|
|
||||||
/* secondary address ? */
|
/* secondary address ? */
|
||||||
if (pim_neighbor_find_secondary(neigh, addr))
|
if (pim_neighbor_find_secondary(neigh, &p))
|
||||||
return neigh;
|
return neigh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ enum pim_secondary_addr_flags {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct pim_secondary_addr {
|
struct pim_secondary_addr {
|
||||||
struct in_addr addr;
|
struct prefix addr;
|
||||||
enum pim_secondary_addr_flags flags;
|
enum pim_secondary_addr_flags flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -34,7 +34,11 @@
|
|||||||
From:
|
From:
|
||||||
http://www.iana.org/assignments/address-family-numbers
|
http://www.iana.org/assignments/address-family-numbers
|
||||||
*/
|
*/
|
||||||
#define PIM_MSG_ADDRESS_FAMILY_IPV4 (1)
|
enum pim_msg_address_family {
|
||||||
|
PIM_MSG_ADDRESS_FAMILY_RESERVED,
|
||||||
|
PIM_MSG_ADDRESS_FAMILY_IPV4,
|
||||||
|
PIM_MSG_ADDRESS_FAMILY_IPV6,
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Network Order pim_msg_hdr
|
* Network Order pim_msg_hdr
|
||||||
|
@ -423,6 +423,31 @@ void pim_neighbor_free(struct pim_neighbor *neigh)
|
|||||||
XFREE(MTYPE_PIM_NEIGHBOR, neigh);
|
XFREE(MTYPE_PIM_NEIGHBOR, neigh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct pim_neighbor *
|
||||||
|
pim_neighbor_find_by_secondary (struct interface *ifp,
|
||||||
|
struct prefix *src)
|
||||||
|
{
|
||||||
|
struct pim_interface *pim_ifp;
|
||||||
|
struct listnode *node, *pnode;
|
||||||
|
struct pim_neighbor *neigh;
|
||||||
|
struct prefix *p;
|
||||||
|
|
||||||
|
pim_ifp = ifp->info;
|
||||||
|
if (!pim_ifp)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
for (ALL_LIST_ELEMENTS_RO(pim_ifp->pim_neighbor_list, node, neigh))
|
||||||
|
{
|
||||||
|
for (ALL_LIST_ELEMENTS_RO(neigh->prefix_list, pnode, p))
|
||||||
|
{
|
||||||
|
if (prefix_same (p, src))
|
||||||
|
return neigh;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
struct pim_neighbor *pim_neighbor_find(struct interface *ifp,
|
struct pim_neighbor *pim_neighbor_find(struct interface *ifp,
|
||||||
struct in_addr source_addr)
|
struct in_addr source_addr)
|
||||||
{
|
{
|
||||||
@ -669,7 +694,7 @@ void pim_neighbor_delete_all(struct interface *ifp,
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct prefix *pim_neighbor_find_secondary(struct pim_neighbor *neigh,
|
struct prefix *pim_neighbor_find_secondary(struct pim_neighbor *neigh,
|
||||||
struct in_addr addr)
|
struct prefix *addr)
|
||||||
{
|
{
|
||||||
struct listnode *node;
|
struct listnode *node;
|
||||||
struct prefix *p;
|
struct prefix *p;
|
||||||
@ -678,14 +703,11 @@ struct prefix *pim_neighbor_find_secondary(struct pim_neighbor *neigh,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
for (ALL_LIST_ELEMENTS_RO(neigh->prefix_list, node, p)) {
|
for (ALL_LIST_ELEMENTS_RO(neigh->prefix_list, node, p)) {
|
||||||
if (p->family == AF_INET) {
|
if (prefix_same (p, addr))
|
||||||
if (addr.s_addr == p->u.prefix4.s_addr) {
|
return p;
|
||||||
return p;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -729,7 +751,7 @@ static void delete_from_neigh_addr(struct interface *ifp,
|
|||||||
for (ALL_LIST_ELEMENTS_RO(pim_ifp->pim_neighbor_list, neigh_node,
|
for (ALL_LIST_ELEMENTS_RO(pim_ifp->pim_neighbor_list, neigh_node,
|
||||||
neigh)) {
|
neigh)) {
|
||||||
{
|
{
|
||||||
struct prefix *p = pim_neighbor_find_secondary(neigh, addr->u.prefix4);
|
struct prefix *p = pim_neighbor_find_secondary(neigh, addr);
|
||||||
if (p) {
|
if (p) {
|
||||||
char addr_str[INET_ADDRSTRLEN];
|
char addr_str[INET_ADDRSTRLEN];
|
||||||
char this_neigh_str[INET_ADDRSTRLEN];
|
char this_neigh_str[INET_ADDRSTRLEN];
|
||||||
|
@ -50,7 +50,8 @@ void pim_neighbor_timer_reset(struct pim_neighbor *neigh, uint16_t holdtime);
|
|||||||
void pim_neighbor_free(struct pim_neighbor *neigh);
|
void pim_neighbor_free(struct pim_neighbor *neigh);
|
||||||
struct pim_neighbor *pim_neighbor_find(struct interface *ifp,
|
struct pim_neighbor *pim_neighbor_find(struct interface *ifp,
|
||||||
struct in_addr source_addr);
|
struct in_addr source_addr);
|
||||||
|
struct pim_neighbor *pim_neighbor_find_by_secondary (struct interface *ifp,
|
||||||
|
struct prefix *src);
|
||||||
struct pim_neighbor *pim_neighbor_find_if (struct interface *ifp);
|
struct pim_neighbor *pim_neighbor_find_if (struct interface *ifp);
|
||||||
|
|
||||||
|
|
||||||
@ -77,7 +78,7 @@ void pim_neighbor_update(struct pim_neighbor *neigh,
|
|||||||
uint32_t dr_priority,
|
uint32_t dr_priority,
|
||||||
struct list *addr_list);
|
struct list *addr_list);
|
||||||
struct prefix *pim_neighbor_find_secondary(struct pim_neighbor *neigh,
|
struct prefix *pim_neighbor_find_secondary(struct pim_neighbor *neigh,
|
||||||
struct in_addr addr);
|
struct prefix *addr);
|
||||||
int pim_if_dr_election(struct interface *ifp);
|
int pim_if_dr_election(struct interface *ifp);
|
||||||
|
|
||||||
#endif /* PIM_NEIGHBOR_H */
|
#endif /* PIM_NEIGHBOR_H */
|
||||||
|
@ -627,7 +627,7 @@ static int hello_send(struct interface *ifp,
|
|||||||
listcount(ifp->connected));
|
listcount(ifp->connected));
|
||||||
}
|
}
|
||||||
|
|
||||||
pim_tlv_size = pim_hello_build_tlv(ifp->name,
|
pim_tlv_size = pim_hello_build_tlv(ifp,
|
||||||
pim_msg + PIM_PIM_MIN_LEN,
|
pim_msg + PIM_PIM_MIN_LEN,
|
||||||
sizeof(pim_msg) - PIM_PIM_MIN_LEN,
|
sizeof(pim_msg) - PIM_PIM_MIN_LEN,
|
||||||
holdtime,
|
holdtime,
|
||||||
@ -635,8 +635,7 @@ static int hello_send(struct interface *ifp,
|
|||||||
pim_ifp->pim_generation_id,
|
pim_ifp->pim_generation_id,
|
||||||
pim_ifp->pim_propagation_delay_msec,
|
pim_ifp->pim_propagation_delay_msec,
|
||||||
pim_ifp->pim_override_interval_msec,
|
pim_ifp->pim_override_interval_msec,
|
||||||
PIM_IF_TEST_PIM_CAN_DISABLE_JOIN_SUPRESSION(pim_ifp->options),
|
PIM_IF_TEST_PIM_CAN_DISABLE_JOIN_SUPRESSION(pim_ifp->options));
|
||||||
ifp->connected);
|
|
||||||
if (pim_tlv_size < 0) {
|
if (pim_tlv_size < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -249,7 +249,7 @@ pim_rp_check_interface_addrs(struct rp_info *rp_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (ALL_LIST_ELEMENTS_RO(pim_ifp->sec_addr_list, node, sec_addr)) {
|
for (ALL_LIST_ELEMENTS_RO(pim_ifp->sec_addr_list, node, sec_addr)) {
|
||||||
if (sec_addr->addr.s_addr == rp_info->rp.rpf_addr.u.prefix4.s_addr) {
|
if (prefix_same(&sec_addr->addr, &rp_info->rp.rpf_addr)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -94,6 +94,7 @@ uint8_t *pim_tlv_append_uint32(uint8_t *buf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define ucast_ipv4_encoding_len (2 + sizeof(struct in_addr))
|
#define ucast_ipv4_encoding_len (2 + sizeof(struct in_addr))
|
||||||
|
#define ucast_ipv6_encoding_len (2 + sizeof(struct in6_addr))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* An Encoded-Unicast address takes the following format:
|
* An Encoded-Unicast address takes the following format:
|
||||||
@ -135,6 +136,14 @@ pim_encode_addr_ucast (uint8_t *buf, struct prefix *p)
|
|||||||
memcpy (buf, &p->u.prefix4, sizeof (struct in_addr));
|
memcpy (buf, &p->u.prefix4, sizeof (struct in_addr));
|
||||||
return ucast_ipv4_encoding_len;
|
return ucast_ipv4_encoding_len;
|
||||||
break;
|
break;
|
||||||
|
case AF_INET6:
|
||||||
|
*(uint8_t *)buf = PIM_MSG_ADDRESS_FAMILY_IPV6;
|
||||||
|
++buf;
|
||||||
|
*(uint8_t *)buf = 0;
|
||||||
|
++buf;
|
||||||
|
memcpy (buf, &p->u.prefix6, sizeof (struct in6_addr));
|
||||||
|
return ucast_ipv6_encoding_len;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
break;
|
break;
|
||||||
@ -216,12 +225,13 @@ pim_encode_addr_group (uint8_t *buf, afi_t afi, int bidir, int scope, struct in_
|
|||||||
|
|
||||||
uint8_t *pim_tlv_append_addrlist_ucast(uint8_t *buf,
|
uint8_t *pim_tlv_append_addrlist_ucast(uint8_t *buf,
|
||||||
const uint8_t *buf_pastend,
|
const uint8_t *buf_pastend,
|
||||||
struct list *ifconnected)
|
struct list *ifconnected,
|
||||||
|
int family)
|
||||||
{
|
{
|
||||||
struct listnode *node;
|
struct listnode *node;
|
||||||
uint16_t option_len = 0;
|
uint16_t option_len = 0;
|
||||||
|
|
||||||
uint8_t *curr;
|
uint8_t *curr;
|
||||||
|
size_t uel;
|
||||||
|
|
||||||
node = listhead(ifconnected);
|
node = listhead(ifconnected);
|
||||||
|
|
||||||
@ -230,8 +240,10 @@ uint8_t *pim_tlv_append_addrlist_ucast(uint8_t *buf,
|
|||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Skip first address (primary) */
|
if (family == AF_INET)
|
||||||
node = listnextnode(node);
|
uel = ucast_ipv4_encoding_len;
|
||||||
|
else
|
||||||
|
uel = ucast_ipv6_encoding_len;
|
||||||
|
|
||||||
/* Scan secondary address list */
|
/* Scan secondary address list */
|
||||||
curr = buf + 4; /* skip T and L */
|
curr = buf + 4; /* skip T and L */
|
||||||
@ -240,8 +252,14 @@ uint8_t *pim_tlv_append_addrlist_ucast(uint8_t *buf,
|
|||||||
struct prefix *p = ifc->address;
|
struct prefix *p = ifc->address;
|
||||||
int l_encode;
|
int l_encode;
|
||||||
|
|
||||||
if ((curr + ucast_ipv4_encoding_len) > buf_pastend)
|
if (!CHECK_FLAG(ifc->flags, ZEBRA_IFA_SECONDARY))
|
||||||
return 0;
|
continue;
|
||||||
|
|
||||||
|
if ((curr + uel) > buf_pastend)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (p->family != family)
|
||||||
|
continue;
|
||||||
|
|
||||||
l_encode = pim_encode_addr_ucast (curr, p);
|
l_encode = pim_encode_addr_ucast (curr, p);
|
||||||
curr += l_encode;
|
curr += l_encode;
|
||||||
@ -251,7 +269,7 @@ uint8_t *pim_tlv_append_addrlist_ucast(uint8_t *buf,
|
|||||||
if (PIM_DEBUG_PIM_TRACE_DETAIL) {
|
if (PIM_DEBUG_PIM_TRACE_DETAIL) {
|
||||||
zlog_debug("%s: number of encoded secondary unicast IPv4 addresses: %zu",
|
zlog_debug("%s: number of encoded secondary unicast IPv4 addresses: %zu",
|
||||||
__PRETTY_FUNCTION__,
|
__PRETTY_FUNCTION__,
|
||||||
option_len / ucast_ipv4_encoding_len);
|
option_len / uel);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (option_len < 1) {
|
if (option_len < 1) {
|
||||||
@ -491,9 +509,23 @@ pim_parse_addr_ucast (struct prefix *p,
|
|||||||
|
|
||||||
p->family = AF_INET; /* notice: AF_INET != PIM_MSG_ADDRESS_FAMILY_IPV4 */
|
p->family = AF_INET; /* notice: AF_INET != PIM_MSG_ADDRESS_FAMILY_IPV4 */
|
||||||
memcpy(&p->u.prefix4, addr, sizeof(struct in_addr));
|
memcpy(&p->u.prefix4, addr, sizeof(struct in_addr));
|
||||||
|
p->prefixlen = IPV4_MAX_PREFIXLEN;
|
||||||
addr += sizeof(struct in_addr);
|
addr += sizeof(struct in_addr);
|
||||||
|
|
||||||
|
break;
|
||||||
|
case PIM_MSG_ADDRESS_FAMILY_IPV6:
|
||||||
|
if ((addr + sizeof(struct in6_addr)) > pastend) {
|
||||||
|
zlog_warn ("%s: IPv6 unicast address overflow: left=%zd needed %zu",
|
||||||
|
__PRETTY_FUNCTION__,
|
||||||
|
pastend - addr, sizeof(struct in6_addr));
|
||||||
|
return -3;
|
||||||
|
}
|
||||||
|
|
||||||
|
p->family = AF_INET6;
|
||||||
|
p->prefixlen = IPV6_MAX_PREFIXLEN;
|
||||||
|
memcpy(&p->u.prefix6, addr, sizeof(struct in6_addr));
|
||||||
|
addr += sizeof(struct in6_addr);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
@ -706,6 +738,8 @@ int pim_tlv_parse_addr_list(const char *ifname, struct in_addr src_addr,
|
|||||||
addr_str, src_str, ifname);
|
addr_str, src_str, ifname);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case AF_INET6:
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
char src_str[INET_ADDRSTRLEN];
|
char src_str[INET_ADDRSTRLEN];
|
||||||
@ -759,8 +793,7 @@ int pim_tlv_parse_addr_list(const char *ifname, struct in_addr src_addr,
|
|||||||
FREE_ADDR_LIST(*hello_option_addr_list);
|
FREE_ADDR_LIST(*hello_option_addr_list);
|
||||||
return -3;
|
return -3;
|
||||||
}
|
}
|
||||||
p->family = tmp.family;
|
prefix_copy(p, &tmp);
|
||||||
p->u.prefix4 = tmp.u.prefix4;
|
|
||||||
listnode_add(*hello_option_addr_list, p);
|
listnode_add(*hello_option_addr_list, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +80,8 @@ uint8_t *pim_tlv_append_uint32(uint8_t *buf,
|
|||||||
uint32_t option_value);
|
uint32_t option_value);
|
||||||
uint8_t *pim_tlv_append_addrlist_ucast(uint8_t *buf,
|
uint8_t *pim_tlv_append_addrlist_ucast(uint8_t *buf,
|
||||||
const uint8_t *buf_pastend,
|
const uint8_t *buf_pastend,
|
||||||
struct list *ifconnected);
|
struct list *ifconnected,
|
||||||
|
int family);
|
||||||
|
|
||||||
int pim_tlv_parse_holdtime(const char *ifname, struct in_addr src_addr,
|
int pim_tlv_parse_holdtime(const char *ifname, struct in_addr src_addr,
|
||||||
pim_hello_options *hello_options,
|
pim_hello_options *hello_options,
|
||||||
|
@ -150,6 +150,12 @@ int pim_global_config_write(struct vty *vty)
|
|||||||
|
|
||||||
writes += pim_msdp_config_write (vty);
|
writes += pim_msdp_config_write (vty);
|
||||||
|
|
||||||
|
if (!pimg->send_v6_secondary)
|
||||||
|
{
|
||||||
|
vty_out (vty, "no ip pim send-v6-secondary%s", VTY_NEWLINE);
|
||||||
|
++writes;
|
||||||
|
}
|
||||||
|
|
||||||
writes += pim_rp_config_write (vty);
|
writes += pim_rp_config_write (vty);
|
||||||
|
|
||||||
if (qpim_register_suppress_time != PIM_REGISTER_SUPPRESSION_TIME_DEFAULT)
|
if (qpim_register_suppress_time != PIM_REGISTER_SUPPRESSION_TIME_DEFAULT)
|
||||||
|
@ -258,31 +258,11 @@ static int pim_zebra_if_address_add(int command, struct zclient *zclient,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p->family != AF_INET)
|
|
||||||
{
|
|
||||||
struct listnode *cnode;
|
|
||||||
struct connected *conn;
|
|
||||||
int v4addrs = 0;
|
|
||||||
|
|
||||||
for (ALL_LIST_ELEMENTS_RO (c->ifp->connected, cnode, conn))
|
|
||||||
{
|
|
||||||
if (conn->address->family == AF_INET)
|
|
||||||
v4addrs++;
|
|
||||||
}
|
|
||||||
if (!v4addrs && pim_ifp)
|
|
||||||
{
|
|
||||||
pim_ifp->primary_address = pim_find_primary_addr (c->ifp);
|
|
||||||
pim_if_addr_add_all (c->ifp);
|
|
||||||
pim_if_add_vif (c->ifp);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!CHECK_FLAG(c->flags, ZEBRA_IFA_SECONDARY)) {
|
if (!CHECK_FLAG(c->flags, ZEBRA_IFA_SECONDARY)) {
|
||||||
/* trying to add primary address */
|
/* trying to add primary address */
|
||||||
|
|
||||||
struct in_addr primary_addr = pim_find_primary_addr(c->ifp);
|
struct in_addr primary_addr = pim_find_primary_addr(c->ifp);
|
||||||
if (primary_addr.s_addr != p->u.prefix4.s_addr) {
|
if (p->family != AF_INET || primary_addr.s_addr != p->u.prefix4.s_addr) {
|
||||||
if (PIM_DEBUG_ZEBRA) {
|
if (PIM_DEBUG_ZEBRA) {
|
||||||
/* but we had a primary address already */
|
/* but we had a primary address already */
|
||||||
|
|
||||||
|
@ -222,6 +222,7 @@ static int zclient_read_nexthop(struct zclient *zlookup,
|
|||||||
for (i = 0; i < nexthop_num; ++i) {
|
for (i = 0; i < nexthop_num; ++i) {
|
||||||
enum nexthop_types_t nexthop_type;
|
enum nexthop_types_t nexthop_type;
|
||||||
struct pim_neighbor *nbr;
|
struct pim_neighbor *nbr;
|
||||||
|
struct prefix p;
|
||||||
|
|
||||||
nexthop_type = stream_getc(s);
|
nexthop_type = stream_getc(s);
|
||||||
if (num_ifindex >= tab_size) {
|
if (num_ifindex >= tab_size) {
|
||||||
@ -251,9 +252,24 @@ static int zclient_read_nexthop(struct zclient *zlookup,
|
|||||||
break;
|
break;
|
||||||
case NEXTHOP_TYPE_IPV6_IFINDEX:
|
case NEXTHOP_TYPE_IPV6_IFINDEX:
|
||||||
nexthop_tab[num_ifindex].nexthop_addr.family = AF_INET6;
|
nexthop_tab[num_ifindex].nexthop_addr.family = AF_INET6;
|
||||||
stream_get (&nexthop_tab[num_ifindex].nexthop_addr.u.prefix6, s, 16);
|
stream_get (&nexthop_tab[num_ifindex].nexthop_addr.u.prefix6,
|
||||||
|
s,
|
||||||
|
sizeof(struct in6_addr));
|
||||||
nexthop_tab[num_ifindex].ifindex = stream_getl (s);
|
nexthop_tab[num_ifindex].ifindex = stream_getl (s);
|
||||||
nbr = pim_neighbor_find_if (if_lookup_by_index (nexthop_tab[num_ifindex].ifindex, VRF_DEFAULT));
|
|
||||||
|
p.family = AF_INET6;
|
||||||
|
p.prefixlen = IPV6_MAX_PREFIXLEN;
|
||||||
|
memcpy (&p.u.prefix6,
|
||||||
|
&nexthop_tab[num_ifindex].nexthop_addr.u.prefix6,
|
||||||
|
sizeof(struct in6_addr));
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If we are sending v6 secondary assume we receive v6 secondary
|
||||||
|
*/
|
||||||
|
if (pimg->send_v6_secondary)
|
||||||
|
nbr = pim_neighbor_find_by_secondary(if_lookup_by_index (nexthop_tab[num_ifindex].ifindex, VRF_DEFAULT), &p);
|
||||||
|
else
|
||||||
|
nbr = pim_neighbor_find_if (if_lookup_by_index (nexthop_tab[num_ifindex].ifindex, VRF_DEFAULT));
|
||||||
if (nbr)
|
if (nbr)
|
||||||
{
|
{
|
||||||
nexthop_tab[num_ifindex].nexthop_addr.family = AF_INET;
|
nexthop_tab[num_ifindex].nexthop_addr.family = AF_INET;
|
||||||
|
@ -115,7 +115,10 @@ pim_vrf_enable (struct vrf *vrf)
|
|||||||
* We will crash and burn otherwise
|
* We will crash and burn otherwise
|
||||||
*/
|
*/
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pimg->send_v6_secondary = 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -251,7 +251,10 @@ struct pim_instance
|
|||||||
enum pim_spt_switchover spt_switchover;
|
enum pim_spt_switchover spt_switchover;
|
||||||
|
|
||||||
struct hash *rpf_hash;
|
struct hash *rpf_hash;
|
||||||
|
|
||||||
void *ssm_info; /* per-vrf SSM configuration */
|
void *ssm_info; /* per-vrf SSM configuration */
|
||||||
|
|
||||||
|
int send_v6_secondary;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct pim_instance *pimg; //Pim Global Instance
|
extern struct pim_instance *pimg; //Pim Global Instance
|
||||||
|
Loading…
Reference in New Issue
Block a user