summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-03-29 23:23:25 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-03-30 09:34:03 -0400
commit71bbe73dc4fb308b1abca5a326c6c59e1193d794 (patch)
tree0aee0b31d087ff3fc558f2fe3ad8e6d9f3b9b0c4
parent34687162ce39d4c34bf60bc55ea13b597b04c2ac (diff)
pimd: Add code to allow backwards compatibility
This code change adds the ability to specify that we should be able to work with older versions of PIM. In future commits we will actually use this data. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
-rw-r--r--pimd/pim_cmd.c27
-rw-r--r--pimd/pim_vty.c6
-rw-r--r--pimd/pimd.c2
-rw-r--r--pimd/pimd.h2
4 files changed, 37 insertions, 0 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index cf101b3e24..66fc8185d0 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -3509,6 +3509,31 @@ DEFUN (no_ip_pim_packets,
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,
ip_pim_rp_cmd,
"ip pim rp A.B.C.D [A.B.C.D/M]",
@@ -6037,6 +6062,8 @@ void pim_cmd_init()
install_element (CONFIG_NODE, &no_ip_pim_keep_alive_cmd);
install_element (CONFIG_NODE, &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, &no_ip_ssmpingd_cmd);
install_element (CONFIG_NODE, &ip_msdp_peer_cmd);
diff --git a/pimd/pim_vty.c b/pimd/pim_vty.c
index 5b6a79b95a..9788c58cd9 100644
--- a/pimd/pim_vty.c
+++ b/pimd/pim_vty.c
@@ -148,6 +148,12 @@ int pim_global_config_write(struct vty *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);
if (qpim_register_suppress_time != PIM_REGISTER_SUPPRESSION_TIME_DEFAULT)
diff --git a/pimd/pimd.c b/pimd/pimd.c
index b67544b28e..9058e14b0a 100644
--- a/pimd/pimd.c
+++ b/pimd/pimd.c
@@ -109,6 +109,8 @@ pim_vrf_enable (struct vrf *vrf)
if (pimg == NULL)
zlog_err ("%s %s: pim class init failure ", __FILE__,
__PRETTY_FUNCTION__);
+
+ pimg->send_v6_secondary = 1;
}
return 0;
}
diff --git a/pimd/pimd.h b/pimd/pimd.h
index b3bdd9e243..8dc5899022 100644
--- a/pimd/pimd.h
+++ b/pimd/pimd.h
@@ -240,6 +240,8 @@ struct pim_instance
afi_t afi;
vrf_id_t vrf_id;
struct hash *rpf_hash;
+
+ int send_v6_secondary;
};
extern struct pim_instance *pimg; //Pim Global Instance