Commit Graph

262 Commits

Author SHA1 Message Date
Donald Sharp
c8ae3ce8b6 pimd: Modify the RP data structure.
Modify the RP data structure to know how to get to it from here.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-05-25 20:38:35 -04:00
Donald Sharp
b45cefcb44 pimd: Register with kernel to get unknown multicast packets
Start the process of creating the pimreg vif device so that
we can get the callbacks from the kernel with the multicast packets

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-05-25 20:38:34 -04:00
Donald Sharp
981d6c7a1f Implement "ip pim rp X.Y.Z.A" and "ip pim sm" commands
Allow the user to specify the static Rendevous point
as well as specifying that an interface is Sparse Mode.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-05-25 20:38:33 -04:00
Paul Jakma
02e51cad49 pimd: Fix compile warning (error with Werror) on BSD
* ioctl commands can vary in type between systems, cast to an unsigned long
  before passing to format command.
2016-05-25 20:38:33 -04:00
Donald Sharp
7960fa8f75 pimd: Create ability to modify hell and hold timers per interface
Create new per interface command:
'ip pim hello <1-180> {<1-180>}'

The first number is the Hello Timer for this interface
The second number is the Hold Timer to pass to neighbors on this interface.
The second number is optional.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-05-25 20:38:33 -04:00
Donald Sharp
6c44fe2294 pimd: Change ioctl call failure from vty_out to zlog_warn
The command 'show ip multicast' when run, iterates over all interfaces
on the router, if you do not have pim configured on that interface
it would generate an error message:

Interface Address         ifi Vif  PktsIn PktsOut    BytesIn   BytesOut
br1       20.0.15.1         7   7       0       0          0          0
swp1      169.254.0.10      3   3       0       0          0          0
swp2      169.254.0.26      4   4       0       0          0          0
ioctl(SIOCGETVIFCNT=35296) failure for interface swp3 vif_index=-1: errno=22: Invalid argument
ioctl(SIOCGETVIFCNT=35296) failure for interface swp4 vif_index=-1: errno=22: Invalid argument

This fixes the issue to display this instead:

Interface Address         ifi Vif  PktsIn PktsOut    BytesIn   BytesOut
br1       20.0.15.1         7   7       0       0          0          0
swp1      169.254.0.10      3   3       0       0          0          0
swp2      169.254.0.26      4   4       0       0          0          0
swp3      0.0.0.0           5  -1       0       0          0          0
swp4      0.0.0.0           6  -1       0       0          0          0

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-05-25 20:38:33 -04:00
Donald Sharp
dedccda63f 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>
2016-05-25 20:38:32 -04:00
Jafar Al-Gharaibeh
6250610a59 pimd: add support for configuring multicast static routes
Hi,

This patch adds the ability to configure multicast static routes
directly into pimd. Two source files are introduced to implement the new
feature in addition to changes to existing files.

Here is how it can be used the CLI:

interface <incoming interface>
ip mroute <outgoing interface> <group addr>                          #
for asm
or ip mroute <outgoing interface> <group addr> <source>    # for ssm

Please let me know if you have any questions or concerns,

Regards,
Jafar

Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-05-25 20:38:32 -04:00
Donald Sharp
7a1d58cec7 pim: 'show debugging' collision
The 'show debugging' cli as setup by pim collided with 'show debugging isis'.
Fix that and clean up cli help commands to actually display correctly.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-05-25 20:38:32 -04:00
David Lamparter
1cb17fc701 pimd: cast ioctl values when printing them
ioctl values might be int or long, cast them to unsigned long for
consistent printing.  (They're long on FreeBSD, but were printed with
%d.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-05-25 20:38:32 -04:00
Donald Sharp
469351b349 pimd: Rework pim to handle changes between us and upstream
The code in pimd needs to be updated to handle the changes
we've made to api's that it depends on.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-05-25 20:38:32 -04:00
David Lamparter
12e41d03bd pimd: merge pimd as of 2015-01-19
Welcome pimd to the Quagga daemon zoo!

This is a merge of commit 77ae369 ("pimd: Log ifindex found for an
interface when zebra lib reports a new connected address."), with
the intermediate "reconnect" changes removed (c9adf00...d274381).
d274381 is replaced with b162ab7, which includes some changes.  In
addition, 4 reconnect-related changes and 1 cosmetic one have been
bumped out.

The rebase command used to produce the branch that is merged here is:
  git rebase --onto b162ab7 c9adf00 77ae369

Note that 3 patches had their author rewritten from
    "Anonymous SR#108542 <>" (which is not a valid git author ID)
to: "Savannah SR#108542 <nbahr@atcorp.com>" (which is the e-mail address
                               listed in the associated Savannah ticket)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-05-25 20:38:32 -04:00