pimd: Add ability to set DR Priority for an interface
From RFC 4601, Section 4.3.1:
The DR_Priority Option allows a network administrator to give
preference to a particular router in the DR election process by
giving it a numerically larger DR Priority. The DR_Priority Option
SHOULD be included in every Hello message, even if no DR Priority is
explicitly configured on that interface. This is necessary because
priority-based DR election is only enabled when all neighbors on an
interface advertise that they are capable of using the DR_Priority
Option. The default priority is 1.
This modification allows the setting of the DR Priority on a per
interface basis.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
diff --git a/pimd/pim_vty.c b/pimd/pim_vty.c
index bcace95..e31e2d6 100644
--- a/pimd/pim_vty.c
+++ b/pimd/pim_vty.c
@@ -31,6 +31,7 @@
#include "pim_cmd.h"
#include "pim_str.h"
#include "pim_ssmpingd.h"
+#include "pim_pim.h"
int pim_debug_config_write(struct vty *vty)
{
@@ -134,6 +135,13 @@
++writes;
}
+ /* IF ip pim drpriority */
+ if (pim_ifp->pim_dr_priority != PIM_DEFAULT_DR_PRIORITY) {
+ vty_out(vty, " ip pim drpriority %d%s", pim_ifp->pim_dr_priority,
+ VTY_NEWLINE);
+ ++writes;
+ }
+
/* IF ip igmp */
if (PIM_IF_TEST_IGMP(pim_ifp->options)) {
vty_out(vty, " ip igmp%s", VTY_NEWLINE);