summaryrefslogtreecommitdiff
path: root/pimd/pim_join.c
AgeCommit message (Collapse)Author
2017-05-06pimd: Fix WG/SGRpt & WG J/P processingChirag Shah
During processing of Join/Prune, for a S,G entry, current state is SGRpt, when only *,G is received, need to clear SGRpt and add/inherit the *,G OIF to S,G so it can forward traffic to downstream where *,G is received. Upon receiving SGRpt prune remove the inherited *,G OIF. From, downstream router received *,G Prune along with SGRpt prune. Avoid sending *,G and SGRpt Prune together. Reset upstream_del reset ifchannel to NULL. Testing Done: Run failed smoke test of sending data packets, trigger SPT switchover, *,G path received SGRpt later data traffic stopped S,G ages out from LHR, sends only *,G join to upstream, verified S,G entry inherit the OIF. Upon receiving SGRpt deletes inherited oif and retains in SGRpt state. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-05-01pimd: Introduce show command for protocol countersChirag Shah
For all pim enabled interfaces and single pim enable interface command. Clear command to clear protocol counters stats. 'show ip pim interface traffic {WORD} {json}' 'clear ip pim interface traffic' Testing Done: bringup Pim configuration and form RPT and SPT and check show ip pim interface traffic command output, perform clear form of interface traffic command and verified all counters reset via show form of command. tor-21# show ip pim interface traffic swp2 Interface HELLO JOIN PRUNE REGISTER REGISTER-STOP ASSERT Rx/Tx Rx/Tx Rx/Tx Rx/Tx Rx/Tx Rx/Tx --------------------------------------------------------------------------------------------------------------- swp2 22/22 0/10 0/0 0/0 0/0 0/0 leaf-22# show ip pim interface traffic swp3 Interface HELLO JOIN PRUNE REGISTER REGISTER-STOP ASSERT Rx/Tx Rx/Tx Rx/Tx Rx/Tx Rx/Tx Rx/Tx --------------------------------------------------------------------------------------------------------------- swp3 23/22 10/0 0/0 0/0 0/0 0/0 spine-1#show ip pim interface traffic Interface HELLO JOIN PRUNE REGISTER REGISTER-STOP ASSERT Rx/Tx Rx/Tx Rx/Tx Rx/Tx Rx/Tx Rx/Tx --------------------------------------------------------------------------------------------------------------- br1 0/1 0/0 0/0 0/0 0/0 0/0 lo 0/0 0/0 0/0 0/0 0/0 0/0 swp1 0/1 0/0 0/0 0/0 0/0 0/0 swp2 0/1 0/0 0/0 0/0 0/0 0/0 Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-04-25pimd: fix pimd crashes around pim rpfChirag Shah
During neighbor down event, all upstream entries rpf lookup may result into nhop address with 0.0.0.0 and rpf interface info being NULL. Put preventin check where rpf interface info is accessed. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-04-25pimd: Fix WG/SGRpt & WG J/P processingChirag Shah
During processing of Join/Prune, for a S,G entry, current state is SGRpt, when only *,G is received, need to clear SGRpt and add/inherit the *,G OIF to S,G so it can forward traffic to downstream where *,G is received. Upon receiving SGRpt prune remove the inherited *,G OIF. Testing Done: Trigger SPT switchover, *,G path received SGRpt later data traffic stopped S,G ages out from LHR, sends only *,G join to upstream, verified S,G entry inherit the OIF. Upon receiving SGRpt deletes inherited oif and retains in SGRpt state. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-03-23pimd: Optimize group size figuring out.Donald Sharp
We were figuring out the group size 2 times. Figure it out 1 time and then pass it around. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-03-16pimd: Remove unneeded debug statementDonald Sharp
Left over debug statement that is not needed anymore Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-03-02pimd: Join/Prune AggregationDonald Sharp
Add the ability for PIM to send Join/Prunes as an aggregated message instead of individual messages for each S,G. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-24pimd: Refactor pim_joinprune_sendDonald Sharp
Refactor pim_joinprune_send to use 'struct rpf' Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-14Fix PIM DBG messageChirag Shah
Ticket: CM-13771 Reviewed By: CCR-5537 Testing Done: yes Fix to CM-13771 where DBG message was out of order. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-01-19pimd: Cleanup the headers.Donald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-17Merge remote-tracking branch 'origin/master' into pim_lib_work2Donald Sharp
2016-12-21pimd: Fix where we handle the inherited_olist for ifchannelDonald Sharp
When we receive a new *,G ifchannel, handle the inherited_olist for S,G mroutes in a place where it is more appropriate. Ticket: CM-13892 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2016-12-21pimd: Remove redundant loggingDonald Sharp
When receiving a JOIN/PRUNE message if we have trace turned on we output this: 2016/11/28 17:11:46.368827 PIM: pim_socket_recvfromto: HAVE_IP_PKTINFO to=224.0.0.13,103 2016/11/28 17:11:46.368956 PIM: Recv PIM JOINPRUNE packet from 169.254.0.6 to 224.0.0.13 on swp31s1: ttl=255 pim_version=2 pim_msg_size=34 checksum=e623 2016/11/28 17:11:46.369003 PIM: pim_joinprune_recv: from 169.254.0.6 on swp31s1 2016/11/28 17:11:46.369053 PIM: recv_prune: prune (S,G)=(20.0.11.253,229.1.2.3) rpt=0 wc=0 upstream=169.254.0.5 holdtime=210 from 169.254.0.6 on swp31s1 2016/11/28 17:11:46.369099 PIM: nonlocal_upstream: recv prune (S,G)=(20.0.11.253,229.1.2.3) to local upstream=169.254.0.5 on swp31s1 Clean up the messaging to this: 2016/11/28 17:11:46.368956 PIM: Recv PIM JOINPRUNE packet from 169.254.0.6 to 224.0.0.13 on swp31s1: ttl=255 pim_version=2 pim_msg_size=34 checksum=e623 2016/11/28 17:11:46.369053 PIM: recv_prune: prune (S,G)=(20.0.11.253,229.1.2.3) rpt=0 wc=0 upstream=169.254.0.5 holdtime=210 from 169.254.0.6 on swp31s1 Ticket: CM-13752 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
2016-12-21pimd: Allow storing of sg in string formatDonald Sharp
Debugs are extremely expensive currently. Let's store 'struct prefix_sg sg' string format in the ifchannel, upstream and msdp_sa structures. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Add code to handle pim prune(S,G) with sptbitDonald Sharp
Add some more code to handle the prune(S,G) with the sptbit set. Turns this ifchannel into a (S,G,rpt). Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Add Handler for Receive (*,G) join for (S,G,rpt)Donald Sharp
According to Figure 5( Downstream per-interface (S,G,rpt) state when we receive a (*,G) we need to move (S,G,rpt) children of the (*,G) into different states. This implements that. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Ensure 'struct prefix sg' is inited in right orderDonald Sharp
When we called pim_parse_addr_group, don't reinitialize the 'struct prefix_sg' *after* we've parsed the group. Ensure in other places that we do this work, we initialize prior as well. Ticket: CM-13510 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: use 'struct prefix_sg' for recv_join and _pruneDonald Sharp
When we read in the S,G from the join/prune message, convert it into a 'struct prefix_sg' at an earlier point in time. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Modify pim_parse_addr_source to use 'struct prefix_sg'Donald Sharp
Modify the pim_parse_addr_source function to take a 'struct prefix_sg' and to fill in the src data. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Modify pim_parse_addr_group to use 'struct prefix_sg'Donald Sharp
Modify the pim_parse_addr_group to use 'struct prefix_sg sg'. This is the first of 2 commits to clean up this parsing to be a bit better. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: pim upstream child listDonald Sharp
Add the ability to keep the list of S,G's associated with a *,G. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Pass in upstream to pim_msg_join_prune_encode.Donald Sharp
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>
2016-12-21pimd: Convert pim_joinprune_send to receive upstreamDonald Sharp
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>
2016-12-21pimd: replace grp_str[100] with grp_str[INET_ADDRSTRLEN]Daniel Walton
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-12-21pimd: Add hash lookups for upstreamDonald Sharp
2016-12-21pimd: Fix crash when looking at S,G from *,GDonald Sharp
When looping over S,G's associated with a *,G, there can exist situations where we have not created the channel oil for the S,G yet. Don't allow this to crash the system. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Remove some more unprotected warnings/debugsDonald Sharp
Pim is outputting a bunch of unprotected debugs. In a system with a high # of events even with no logging we will receive lots of messages. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Stop join/prunes from crashingDonald Sharp
When we receive a join/prune for a upstream that we are unable to create, safely ignore the request until the situation resolves itself. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21PIM: prefix-list support for selecting RPDaniel Walton
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: CCR-5173 Ticket: CM-12819
2016-12-21pimd: switch pim_rpf.h to use 'struct prefix' for addressDonald Sharp
mrib_nexthop_addr and rpf_addr should be 'struct prefix' so that we can safely handle unnumbered data from a nexthop lookup in zebra Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Remove unprotected debug logDonald Sharp
Upon receiving *,G joins from downstream we were outputing a unprotected debug. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Fix pim to use correct src address for packetsDonald Sharp
When sending register packets to the RP from the FHR we should be using the ip address of the incoming interface that received the mcast packet. Ticket: CM-12445 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Fix some null register issuesDonald Sharp
The Null register bit was not properly being set and the total length was wrong as well. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Fix join_desired for (*,G) statesDonald Sharp
When we are evaluating if we have a inherited_olist, include the *,G state in determing what to do. Additionally when we receive a join or prune of *,G do the right thing. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Was removing the wrong channel.Donald Sharp
When receiving a prune (*,G), we were removing from the wrong channel. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21lib, pimd: Fix borked up prefix codeDonald Sharp
Fix the struct prefix to be an actual struct prefix_sg. This cleans up a bunch of code to make it look nicer. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Send join when a S,G is prunedDonald Sharp
When a *,G is received, and we have S,G that is in a non-joined state, Send the join to the S,G. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: change from ifchannels to oil'sDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: pim_str_sg_dump can't be called 2 times in the same debugDonald Sharp
When we call pim_str_sg_dump we cannot call the variable twice for the same debug. This fixes this issue in the 2 places it was borked. Ticket: CM-12045 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Fix *,g pruningDonald Sharp
We were not properly handling the receipt of prune *,g messages. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Revamp send of join/prune to actually set bits right.Donald Sharp
When a *,G report is sent, the RPT and WC bits are set as well as the source is the RP address for the group. If this routers idea of the RP for this group is different than the idea of the RP from the sender than that particular *,G can be dropped. Ticket: CM-12031 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Start abstraction for WC and RPT bitsDonald Sharp
Start the abstraction of the WC and RPT bits so we can send the data as appropriate. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Fix Join/Prune loggingDonald Sharp
For some reason Join/Prune debugs were being turned on by trace not by the 'debug pim packets join' command. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Allow (*,G) joins to join a (s,g) that pre-existsDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Remove unnecessary QuaggaIdDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Convert pim_ifchannel_prune to use struct prefix *sgDonald Sharp
Convert the pim_ifchannel_prune function to use a struct prefix *sg for the source group. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Convert pim_ifchannel_join_add to struct prefix *sgDonald Sharp
Convert the pim_ifchannel_join_add to use a struct prefix *sg instead of struct in_addr's. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Refactor s,g information to struct prefix in pim_upstream.hDonald Sharp
This change allows us to pass the (s,g) state around as a prefix. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-20build: remove $Format tagsDavid Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-07-12pimd: Refactor some encode/decode functionsDonald Sharp
Some encode/decode functions are needed in multiple places. Start the refactoring to be able to use them in a more generic manner. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>