When PIM handles some MSDP commands, a repeated command
was causing a CMD_WARNING_CONFIG_FAILED. This should
be a CMD_WARNING. Fix the code to allow vtysh to handle
this appropriately.
Ticket: CM-19053
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
When we ask PIM to do a CLI search of a random (S,G) if the
(S,G) has no RPF due to no route, let the user know about
the issue instead of crashing.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This improves code readability and also future-proofs our codebase
against new changes in the data structure used to store interfaces.
The FOR_ALL_INTERFACES_ADDRESSES macro was also moved to lib/ but
for now only babeld is using it.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This is an important optimization for users running FRR on systems with
a large number of interfaces (e.g. thousands of tunnels). Red-black
trees scale much better than sorted linked-lists and also store the
elements in an ordered way (contrary to hash tables).
This is a big patch but the interesting bits are all in lib/if.[ch].
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
When displaying the 'show ip pim upstream' command.
Display proper information about the RPF address
choosen.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
When displaying the mroute table, add ability to fill
in all the missing data that for human eyes can be assumed.
This will allow people using grep over the command
can get more information.
sharpd@robot ~> sudo vtysh -c "show ip mroute fill"
Source Group Proto Input Output TTL Uptime
* 229.1.1.1 STATIC dum0 enp3s0 1 00:11:07 Default-IP-Routing-Table
* 229.1.1.1 STATIC dum0 virbr0 1 00:01:47 Default-IP-Routing-Table
sharpd@robot ~>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Adds the ability to filter PIM Joins & IGMP reports on an interface.
Enabling a multicast boundary on an interface for a particular group
will prevent the interface from appearing in the group's OIL.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
If pim/igmp is not enabled on an interface, the ->info pointer will be
null. Need to check that before dereferencing it.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This fixes the broken indentation of several foreach loops throughout
the code.
From clang's documentation[1]:
ForEachMacros: A vector of macros that should be interpreted as foreach
loops instead of as function calls.
[1] http://clang.llvm.org/docs/ClangFormatStyleOptions.html
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Start the conversion of pim configuration commands to use
the ferr side channel to allow more detailed information
to be returned to cli commands.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
All the rp debugs were a mish-mash of TRACE or ZEBRA,
but the reality they were all focused on handling NHT
issues associated with the RP's. So let's create
a new debug 'debug pim nht rp' if you are having
issues with RP's.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This feature does this:
Add the ability to store the non-prefix static RP
entries into a table. Then to lookup the G to
find the RP in that table, finding the longest
prefix match across both prefix-lists and
static RP's.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
1) Error check return from setsockopt and sockets
2) Check return codes for str2prefix
3) Clean up some potential NULL References
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
1) Clean up display of S,GRPt prune state to be more meaningful
2) Upon receipt of a S,GRPt prune make sure we transition to
the correct state
3) Upon loss of a S,GRPt prune make sure we transition to
the correct state as well as immediately send a *,G
join upstream to propagate the loss of the prune.
4) Removal of a weird S,G state being installed upon
loss of a S,G RPt prune.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
This could happen if routing isn't up yet but the command did take so we
should exit 0 here. Testing:
root@cel-redxp-10[frr-dwalton76]# vtysh -c 'conf t' -c' ip pim rp
11.11.11.11'
% No Path to RP address specified: 11.11.11.11
root@cel-redxp-10[frr-dwalton76]# echo $?
0
root@cel-redxp-10[frr-dwalton76]#
Upon frr restart vtysh replays pim bfd configuration
cli before pim sm command, this results in failure
of pim bfd config on the VIF as it is not pim enabled yet.
Inside pim bfd configuration, call to create PIM vif
handler if it is not created yet.
no ip pim bfd, if pim is not enabled display warning and return.
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
This patch does two things:
1) Converts the pim_ifp->ifchannel_list to a pim_ifp->ifchannel_rb
2) Removes the hashing to use the RB RB_FIND instead.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Remove the redundant information in pim_ifp->pim_ifchannel_list
just call it pim_ifp->ifchannel_list
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
The pim->ifchannel_list can be duplicated by iterating
over each vrf and then over each pim_ifp->pim_ifchannel_list
Since list handling is taking allot of time at scale
convert over to using this value.
Additionally clean up pim_cmd.c to have helper functions
to handle the actual encoding of data for output.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
'show ip mroute vrf all count' crashes currently
This commit fixes that issue
Ticket: CM-17052
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
In show ip pim interface and show ip pim interface <intf>
display State "down" pim enabled interfaces.
Ticket:CM-16809
Reviewed By:CCR-6398
Testing Done:
show ip pim interface
Interface State Address PIM Nbrs PIM DR FHR IfChannels
br1 up 2.0.1.1 0 local 0 0
lo up 6.0.0.1 0 local 0 0
pimreg up 0.0.0.0 0 local 0 0
swp1 down 6.0.1.1 0 local 0 0
swp2 up 6.0.2.1 1 local 0 0
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>