diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-06-18 18:14:20 -0700 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetwroks.com> | 2016-05-25 20:38:32 -0400 |
| commit | dedccda63ff8d030bb655178c708a85ad9ba8652 (patch) | |
| tree | 3d0b741893997226a6a3ab7fc0ac2e6d72d65263 /pimd/pim_neighbor.c | |
| parent | 6250610a59397c2a54e4fa5f66a74a2e61aaa914 (diff) | |
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>
Diffstat (limited to 'pimd/pim_neighbor.c')
| -rw-r--r-- | pimd/pim_neighbor.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pimd/pim_neighbor.c b/pimd/pim_neighbor.c index 9404cec131..eaf36df35f 100644 --- a/pimd/pim_neighbor.c +++ b/pimd/pim_neighbor.c @@ -106,7 +106,7 @@ static void dr_election_by_pri(struct interface *ifp) PIM Hello message is received, when a neighbor times out, or when a router's own DR Priority changes. */ -void pim_if_dr_election(struct interface *ifp) +int pim_if_dr_election(struct interface *ifp) { struct pim_interface *pim_ifp = ifp->info; struct in_addr old_dr_addr; @@ -140,7 +140,10 @@ void pim_if_dr_election(struct interface *ifp) pim_if_update_join_desired(pim_ifp); pim_if_update_could_assert(ifp); pim_if_update_assert_tracking_desired(ifp); + return 1; } + + return 0; } static void update_dr_priority(struct pim_neighbor *neigh, |
