summaryrefslogtreecommitdiffstats
path: root/pimd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* pim-msdp: part-2: SA cache supportanuradhak2016-12-2213-56/+892
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit includes - 1. Maintaining SA cache with local and remote entries. 2. Local SA entries - there are two cases where we pick up these - - We are RP and got a source-register from the FHR. - We are RP and FHR and learnt a new directly connected source on a DR interface. 3. Local entries are pushed to peers immediately on addition and periodically. An immediate push is also done when peer session is established. 4. Remote SA entries - from other peers in the mesh group and passed peer-RPF checks. 5. Remote entries are aged out. No other way to del them currently. In the future we may add a knob to flush entries on peer-down. Testing done - Misc topologies with CL routers plus basic interop with another vendor ( we can process their SA updates and they ours). Sample output - root@rp:~# vtysh -c "show ip msdp sa" Source Group RP Uptime 33.1.1.1 239.1.1.2 local 00:02:34 33.1.1.1 239.1.1.3 local 00:02:19 44.1.1.1 239.1.1.4 100.1.3.1 00:01:12 44.1.1.1 239.1.1.5 100.1.3.1 00:00:55 root@rp:~# Ticket: CM-13306 Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com> Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Store ifchannel information in a global list too.Donald Sharp2016-12-226-420/+350
| | | | | | | | | This fix handles two issues: 1) Searching entire vrf_iflist to get per interface pim_ifchannel_list 2) Display of ifchannel information in pim not being ordered correctly. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Allow further refinement of pim join orderDonald Sharp2016-12-221-8/+25
| | | | | | | | When a 'show ip pim join' is issued and we have (S,G,rpt) being sent back up to us. We need to order correctly for this situation. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Protect some zlog_debug messagesDonald Sharp2016-12-221-123/+120
| | | | | | | Protect some zlog_debug messages with if(...) so we don't see them all the time. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Protect debug messages.Donald Sharp2016-12-221-12/+18
| | | | | | Protect some debug messages from being displayed always. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Add some explanatory debugging for a error condition.Donald Sharp2016-12-221-1/+6
| | | | | | | | When we decide to ignore a incoming packet, allow detailed debugging to give a pointer to where to go to understand the issue. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Fix test for (S,G,rpt) prune inclusion.Donald Sharp2016-12-221-1/+1
| | | | | | | The (S,G,rpt) prune inclusion was incorrectly considering if the RPF' was the same for (S,G) and (*,G). Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: No need to reset uptime if state is the sameDonald Sharp2016-12-221-1/+2
| | | | | | | Do not reset the time the mroute has been in it's current state if we get a transition to the same state. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Abstract setting of the spt bit a bit moreDonald Sharp2016-12-223-35/+81
| | | | | | | Allow the spt bit to be set appropriately from multiple places. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Add ability to set SPTBIT on a S,G streamDonald Sharp2016-12-221-4/+82
| | | | | | Implement 4.2.2 for setting the SPT bit. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Start addition of timer wheelDonald Sharp2016-12-221-0/+28
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Start coding of sending Prune (s,g,rpt) with *,g prune.Donald Sharp2016-12-221-2/+51
| | | | | | | | Add logic to show that we are making decisions about the s,g,rpt prune send. We are not actually sending anything yet. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Add some helper functions.Donald Sharp2016-12-222-0/+17
| | | | | | | Currently these are stubs to help debug logic. Will be filled in as we go. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Add the ability to test if the RPF' is the sameDonald Sharp2016-12-222-0/+10
| | | | | | | Test the ability to see if two RPF' are the same or not. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* PIM After LHR swp bounce toward rx host, igmp_source_forward_startDaniel Walton2016-12-221-2/+5
| | | | | | | | failure message repeats in log Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Ticket: CM-13340
* pimd: Add ability to listen to igmp messages on 224.0.0.2Donald Sharp2016-12-221-3/+0
| | | | | | | | Some igmpv2 messages are sent to 224.0.0.2. We were not listening for these messages and as such we were ignoring some withdrawals. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Fix 'ip igmp join ..'Donald Sharp2016-12-222-2/+2
| | | | | | | | | When a static igmp join is issued, before routing has come up, the ability to recover was accidently removed from the code. Ticket: CM-13379 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: When nexthop lookup fails, back out gracefullyDonald Sharp2016-12-221-2/+10
| | | | | | | | When the nexthop lookup fails when establishing the upstream state as part of a register receive, kill the upstream state. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Allow FHR/RP/LHR to be one and the sameDonald Sharp2016-12-221-5/+14
| | | | | | | | | | When we have a FHR/RP/LHR all on the same box, we were experiencing a situation where we were not sending a register stop nor where we setting the sptbit. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> fd
* pimd: Modify Debug to be betterDonald Sharp2016-12-222-9/+14
| | | | | | | Make debugs of some pim processes easier to interpret and understand. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Be more careful looking up mroute statisticsDonald Sharp2016-12-221-0/+3
| | | | | | | | When we get a request to look up the mroute statistics from the kernel, ensure that the interface returned is a valid usable interface. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: pim upstream child listDonald Sharp2016-12-224-141/+155
| | | | | | | Add the ability to keep the list of S,G's associated with a *,G. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pim-msdp: part-1 - initial protocol infra.anuradhak2016-12-2214-42/+1609
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit includes the following changes - 1. Support for MSDP peer DB (hash and sorted list). 2. Support for the following timers - keepalive, connect-retry, hold. 3. TCP session management (lower-ip is active, higher-ip is passive). 4. MSDP KA packet rx/tx. 5. Limited temporary config (will be replaced with the more automation friendly RP-set). Testing done - Peer bringup/deletion (including interop with another vendor) Sample out - root@dell-s6000-04:~# sudo vtysh -c "show ip msdp peer" Peer Local Mesh-group State Uptime 100.1.1.1 100.1.2.1 default established 00:07:27 100.1.3.1 100.1.2.1 default established 00:31:50 root@dell-s6000-04:~# Coming soon - 1. part-2: SA cache management. 2. part-3: SPT setup using source in SA cache. 3. part-4: CLI cleanup. Ticket: CM-13306 Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com> Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Fix gcc compile issue.Donald Sharp2016-12-221-4/+0
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Pass in upstream to pim_msg_join_prune_encode.Donald Sharp2016-12-223-12/+11
| | | | | | | | Pass in the upstream data structure to pim_msg_join_prune_encode so it can decide to send (S,G,rpt) information if it wants to or not. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Remove unused/unmaintained test commandsDonald Sharp2016-12-221-738/+0
| | | | | | | | | | The test commands are not being maintained and are not out of date with the rest of the system. There are better ways to test code and in addition these commands if entered by a user could seriously impact their running system. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Convert pim_joinprune_send to receive upstreamDonald Sharp2016-12-225-11/+11
| | | | | | | | When sending a join/prune send in the upstream pointer. this will allow us to implement some of the other state machines necessary. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: When nexthop_lookup fails allow a retry.Donald Sharp2016-12-221-5/+1
| | | | | | | | We are seeing situations where nexthop lookups are failing unexpectedly. Don't consider the lookup to have succeeded in this case to allow the next lookup to work? Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Ignore (S,G) Prunes with no current stateDonald Sharp2016-12-221-0/+9
| | | | | | | If we get a (S,G) Prune with no current ifchannel state, ignore the neighbors request. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Find an interface that is both connected and setup for pimDonald Sharp2016-12-223-11/+19
| | | | | | | | | | When we are looking up the incoming interface for the ipmr call back socket from the kernel, look to see if the src is connected as well as has a valid pim_ifp to use. This is to allow vrr configuration in a mlag env. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Start (S,G,rpt) codingDonald Sharp2016-12-222-3/+23
| | | | | | Start putting some infrastructure for (S,G,rpt) handling Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Clean up the interface deletionDonald Sharp2016-12-225-9/+38
| | | | | | | When cleaning up the interface, actually clean up data associated with that interface. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Make sure we have valid pointer when printing debugsDonald Sharp2016-12-221-4/+11
| | | | | | | | | When we print a debug in the pim_upstream_add, there exists failure cases for pim_upstream_new where we cannot create a upstream data structure. Make sure the debug handles it right. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Fix possible crash using 'struct pim_nexthop'Donald Sharp2016-12-221-0/+1
| | | | | | | When passing in a nexthop data structure to nexthop_lookup ensure that it is zero'ed out. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Ensure 'struct nexthop' has been zeroedDonald Sharp2016-12-221-0/+1
| | | | | | | When calling nexthop_lookup, the code assumes that the nexthop passed in has been 0'ed out. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Fix crash when cannot find igmpDonald Sharp2016-12-221-5/+5
| | | | | | | When we look up a igmp data structure, if we don't find it, safely do nothing. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Add basic nexthop lookup cached information.Donald Sharp2016-12-224-4/+63
| | | | | | | Cache the last time we looked up the nexthop for this particular address. Store time to usec accuracy. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Add the ability to get time in usecDonald Sharp2016-12-222-0/+20
| | | | | | Add ability to return a int64_t time in usec. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Fix possible double free of upstreamDonald Sharp2016-12-225-21/+35
| | | | | | | | Fix possible double free of upstream and in addition add some debug code to help find where the problem is coming from. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Fix crash when igmp message comes in on non-configured interfaceDonald Sharp2016-12-221-0/+8
| | | | | | | | | When we receive a igmp message through the kernel upcall, make sure that we are configured to work on that interface via pim/igmp before attempting to use that interface. Ticket: CM-13338 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Fix child ifchannel overwrite parent ifchannelDonald Sharp2016-12-221-2/+2
| | | | | | | When we look for child channels, don't overwrite the parents ifchannel. Leave that one alone. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: always build json for show commandsDaniel Walton2016-12-221-69/+108
| | | | | | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> This cleans up the following so that they always collect the data to display in json structures and then either dumps the json output or traverses it to produce the non-json output. show ip pim local-membership show ip pim interface
* pimd: Fix pim_nexthop_lookupDonald Sharp2016-12-221-9/+12
| | | | | | | There are situations where we may never look at a better route for nexthop_lookup. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Fix uninitialized valueDonald Sharp2016-12-221-2/+0
| | | | | | | When handling a igmp request, fill in group address before we attempt to output debug information on it. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Add interface to ifchannel debugsDonald Sharp2016-12-222-6/+11
| | | | | | | When outputting data about ifchannels due to debug include the interface this is happening on. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Add debug for packet statsDonald Sharp2016-12-221-0/+7
| | | | | | | Allow us to figure out what is going wrong in some situations, so add some debugs. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Fix ifchannel being left aroundDonald Sharp2016-12-221-28/+5
| | | | | | | In some situations, the deletion of the ifchannel would not ocurr if the last flag cleared was the assert flag. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Fix show of 'ip pim rp keep-alive-timerDonald Sharp2016-12-221-1/+1
| | | | | | | When displaying this changed value, we were using an incorrect data value. Signed-off-by: Donald Sharpd <sharpd@cumulusnetworks.com>
* pimd: replace grp_str[100] with grp_str[INET_ADDRSTRLEN]Daniel Walton2016-12-2226-363/+363
| | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
* pimd: add support for IGMPv2Daniel Walton2016-12-2212-669/+888
| | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Ticket: CM-7962