summaryrefslogtreecommitdiffstats
path: root/pimd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #583 from chiragshah6/pim_dev_3_0Jafar Al-Gharaibeh2017-05-295-34/+48
|\ | | | | pimd: Fix to Transmit S,G Join when transitioning from SGRpt to Join state
| * pimd: Fix to Tx S,G Join when SGRpt->Join stateChirag Shah2017-05-185-34/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -Upon Rx (*,G) Join w/o SGRpt at RP, trigger (S,G) Join towards FHR, unset SGRpt flag from channel, add (*,G) oif to (S,G) entry. -Add I am not RP check to triger SGRpt on *,G path otherwise, send S,G Prune on SPT path from RP to FHR upon receving *,G Prune. -Upon Rx SGRpt receive, remove OIF(downstream where Prune received) from specific S,G. Testing Done: pim-smoke Ran 95 tests in 11790.552s FAILED (SKIP=10, failures=4) Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* | Merge pull request #586 from donaldsharp/msdp_crashaliciousDavid Lamparter2017-05-191-1/+1
|\ \ | |/ |/| pimd: Fix crash from cli missinterpertation
| * pimd: Fix crash from cli missinterpertationDonald Sharp2017-05-191-1/+1
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: Fix indentation issue that is causing clang unhappinessDonald Sharp2017-05-181-1/+1
| | | | | | | | | | | | | | The indentation of ifjoin_to_noinfo was not consistent with the rest of the function and caused clang to loose it's mind Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | Merge branch 'frr/pull/548' ("Pim dev 3.0 defect fixes")David Lamparter2017-05-187-65/+112
|\ \ | |/ |/| | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * pimd: Fix input value to boolChirag Shah2017-05-171-4/+4
| | | | | | | | Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
| * pimd: fix pim reg processing return 1 upon successChirag Shah2017-05-171-2/+2
| | | | | | | | | | | | | | | | | | | | pim register_recv api returns 1 instead of 0 upon succesfully processing REG message Testing Done: Verified At RP via receiving PIM (Data/Null) Register messages and checked show ip pim interface < > Received errors under Hello Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
| * pimd: fix ip pim hello option does not take in effectChirag Shah2017-05-171-4/+9
| | | | | | | | | | | | | | | | | | | | If frr.conf file has pim hello option setup prior to pim sm under an interface, upon frr start/restart hello option cli replayed prior to sm command from vtysh. Added a code in pim hello option cli handler to create pim vif if it does not exist. Testing Done: configure pim hello options before pim sm in frr.conf file and restart frr Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
| * pimd: IGMP Query Tx when Oth. Querier expChirag Shah2017-05-161-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Send IGMP General Query and Get Gen. Query timer, once Other Querier timer expired. Ticket:CM-13152 Reviewed By:CCR-6189 Testing Done: tor-4# show ip igmp interface Interface State Address V Querier Query Timer Uptime swp2 up 70.1.1.2 3 other --:--:-- 00:06:45 swp3 up 80.1.1.2 3 local 00:00:35 00:22:52 Upon disabling IGMP on remote igmp interface, after other querier expiry sends a query and elects as Querier tor-4# show ip igmp interface Interface State Address V Querier Query Timer Uptime swp2 up 70.1.1.2 3 local 00:01:29 00:10:16 swp3 up 80.1.1.2 3 local 00:01:14 00:26:23 Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
| * pimd: Avoid deleting SGRpt entry from PP->P stateChirag Shah2017-05-164-56/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -Upon Receving SGRpt Prune message, transitioning from Prune Pending state to NOINFO state, ifchannel entry was getting deleted in prune pending timer expiry. This can result in SGRpt ifhchannel deleted and recreated upon receving triggered or periodic SGRpt received from downstream. The automation test failed as it expected (check) SGRpt entry at RP after it triggers SPT switchover. - While transitioning from Prune-Pending state to NOINFO(Pruned) state, Trigger SGRpt message towards RP. - Add/del some of the debug traces Ticket:CM-16057 Reviewed By:CCR-6198 Testing Done: Rerun test08 multiple times and observed passing it. Pim-smoke with hardnode Ran 95 tests in 11219.420s FAILED (SKIP=10, failures=4) Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* | pimd: Fix core from json static mroute showDonald Sharp2017-05-161-1/+1
|/ | | | | | | | | | When we have no normal mroutes and only static mroutes there exists a code path where we attempted to dereference c_oil when we were showing static mroutes. Looks like a cut-n-paste error, we should be using s_route->c_oil there Ticket: CM-15013 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Fix WG/SGRpt & WG J/P processingChirag Shah2017-05-077-21/+30
| | | | | | | | | | | | | | | | | | | | 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>
* pimd: replay IGMP static group upon if creationChirag Shah2017-05-071-0/+34
| | | | | | | | | | | | | | | | Upon static IGMP configured port down igmp source info is destroyed. Upon port up or quagga restart (if addr add) register IGMP sock with port, source, group. Testing Done: Configure IGMPv3 Report on Host swpx, ifdown/ifup swpx, verify ip mroute containng IGMP mroute tor-1# show ip mroute Source Group Proto Input Output TTL Uptime 30.1.1.1 225.1.1.21 IGMP swp2 swp3 1 00:00:05 Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* pimd: fix pimd crash when pim interface disabledChirag Shah2017-05-071-1/+6
| | | | | | | | | | | | Upon pim enabled disabled, current upstreams entries rpf update callback, needs to check if old rpf is still pim enabled otherwise do not trigger prune towards old rpf. Testing Done: Verified by disabling pim enabled rpf interface and crash is not observed upon disabling pim on rpf interface. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* pimd: fix pim ecmp rebalance config writeChirag Shah2017-05-072-1/+11
| | | | | | | | | | | | | | | | | | | | | | | ip pim ecmp and ip pim ecmp rebalance configuration CLIs were not adding to Quagga.confg or running configuration. Added both the configuration write in Config write handler. Testing Done: Execute configuration cli and verified running config and Quagga.conf file containing both configuration. 03# show running-config Building configuration... Current configuration: ! ip multicast-routing ip pim rp 6.0.0.9 230.0.0.0/16 ip pim join-prune-interval 61 ip pim ecmp ip pim ecmp rebalance ! Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* pimd: fix channel_oil and upstream RPF in syncChirag Shah2017-05-078-228/+245
| | | | | | | | | | | | | | | | | | | | | | During PIM Neighbor change/UP event, pim_scan_oil api scans all channel oil to see any rpf impacted. Instead of passing current upstream's RPF it passes current RPF as 0 and does query to rib for nexhtop (without ECMP/Rebalance). This creates inconsist RPF between Upstream and Channel oil. In Channel Oil keep backward pointer to upstream DB and fetch up's RPF and passed to channel_oil scan. Decrement channel_oil ref_count in upstream_del when decrementing up ref_count and it is not the last. Created ECMP based FIB lookup API. Testing Done: Performed following testing on tester setup: 5 x LHR, 4 x MSDP Spines, 6 Sources each sending to 1023 groups from one of the spines. Total send rate 8Mpps. Test that caused problems was to reboot every device at the same time. After fix performed 5 iterations of reboot devices and show no sign of the problem. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* Merge pull request #465 from opensourcerouting/cli-fuzzer-fixesDonald Sharp2017-05-041-5/+5
|\ | | | | *: fix a bunch of segfaults detected by a CLI fuzzer
| * *: fix a bunch of segfaults detected by a CLI fuzzerRenato Westphal2017-05-041-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following segfaults: zebra aborted: vtysh -c "show ipv6 mroute" zebra aborted: vtysh -c "configure terminal" -c "debug zebra kernel msgdump" zebra aborted: vtysh -c "configure terminal" -c "interface eth99" -c "link-params" -c "no packet-loss" zebra aborted: vtysh -c "configure terminal" -c "interface eth99" -c "link-params" -c "no metric" zebra aborted: vtysh -c "configure terminal" -c "interface eth99" -c "link-params" -c "no ava-bw" zebra aborted: vtysh -c "configure terminal" -c "interface eth99" -c "link-params" -c "no res-bw" zebra aborted: vtysh -c "configure terminal" -c "interface eth99" -c "link-params" -c "no use-bw" ospfd aborted: vtysh -c "configure terminal" -c "router ospf" -c "area 1.1.1.1 nssa" ospfd aborted: vtysh -c "configure terminal" -c "router ospf" -c "area 4294967295 nssa" pimd aborted: vtysh -c "show ip msdp sa 1.1.1.1" pimd aborted: vtysh -c "configure terminal" -c "ip ssmpingd" pimd aborted: vtysh -c "configure terminal" -c "no ip ssmpingd" pimd aborted: vtysh -c "configure terminal" -c "no ip msdp mesh-group WORD source" pimd aborted: vtysh -c "configure terminal" -c "interface eth99" -c "ip pim hello 180" bgpd aborted: vtysh -c "show bgp l2vpn evpn rd 1:1" bgpd aborted: vtysh -c "clear vnc nve un *" bgpd aborted: vtysh -c "clear vnc nve un 1.1.1.1" bgpd aborted: vtysh -c "clear vnc nve un 2001:db8::1" bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 1.1.1.1 un 1.1.1.1 lifetime 4294967295" bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 1.1.1.1 un 1.1.1.1 cost 255 lifetime 4294967295" bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 1.1.1.1 un 1.1.1.1 cost 255" bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 1.1.1.1 un 1.1.1.1" bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 1.1.1.1 un 2001:db8::1 lifetime 4294967295" bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 1.1.1.1 un 2001:db8::1 cost 255 lifetime 4294967295" bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 1.1.1.1 un 2001:db8::1 cost 255" bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 1.1.1.1 un 2001:db8::1" bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 2001:db8::1 un 1.1.1.1 lifetime 4294967295" bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 2001:db8::1 un 1.1.1.1 cost 255 lifetime 4294967295" bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 2001:db8::1 un 1.1.1.1 cost 255" bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 2001:db8::1 un 1.1.1.1" bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 2001:db8::1 un 2001:db8::1 lifetime 4294967295" bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 2001:db8::1 un 2001:db8::1 cost 255 lifetime 4294967295" bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 2001:db8::1 un 2001:db8::1 cost 255" bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 2001:db8::1 un 2001:db8::1" bgpd aborted: vtysh -c "configure terminal" -c "router bgp 1" -c "no vnc export bgp ipv4 prefix-list NAME" bgpd aborted: vtysh -c "configure terminal" -c "router bgp 1" -c "no vnc export bgp ipv6 prefix-list NAME" bgpd aborted: vtysh -c "configure terminal" -c "router bgp 1" -c "no vnc export bgp route-map NAME" bgpd aborted: vtysh -c "configure terminal" -c "router bgp 1" -c "no vnc export zebra ipv4 prefix-list NAME" bgpd aborted: vtysh -c "configure terminal" -c "router bgp 1" -c "no vnc export zebra ipv6 prefix-list NAME" bgpd aborted: vtysh -c "configure terminal" -c "router bgp 1" -c "no vnc export zebra route-map NAME" bgpd aborted: vtysh -c "configure terminal" -c "route-map RMAP permit 1" -c "no set ipv6 vpn next-hop" bgpd aborted: vtysh -c "configure terminal" -c "route-map RMAP permit 1" -c "set vpnv4 next-hop" bgpd aborted: vtysh -c "configure terminal" -c "route-map RMAP permit 1" -c "set vpnv6 next-hop" bgpd aborted: vtysh -c "configure terminal" -c "router bgp" -c "address-family ipv6 vpn" -c "network 2001:db8::1/128 rd 1:1 tag WORD" bgpd aborted: vtysh -c "configure terminal" -c "router bgp" -c "address-family vpnv6 unicast" -c "network 2001:db8::1/128 rd 1:1 tag WORD" bgpd aborted: vtysh -c "configure terminal" -c "router bgp" -c "no neighbor WORD shutdown message MSG..." bgpd aborted: vtysh -c "configure terminal" -c "router bgp" -c "neighbor WORD shutdown message MSG..." More to come later. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | pimd: Note when a S,G stream should be a FHR as wellDonald Sharp2017-05-041-0/+10
| | | | | | | | | | | | | | | | | | | | When we have a S,G being created, that it might also be a FHR router as well. This happens when the FHR is in the path of the RP->LHR for when it builds it's SPT tree for the S,G. Ticket: CM-16056, CM-15836 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: Only compare the actual IIF of the *,G to S,GDonald Sharp2017-05-041-3/+2
|/ | | | | | | | | | | Now that pim has the ability to use ecmp, the Group path to the RP, may be different than what is choosen for the *,G IIF. As such when we are making the spt switchover decision, compare the S,G IIF to the *,G IIF. Ticket: CM-15870 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Fix: Off by one error, correct index for hold timerJafar Al-Gharaibeh2017-05-031-1/+1
| | | | Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
* Merge pull request #440 from donaldsharp/afi_safi3Jafar Al-Gharaibeh2017-05-021-10/+10
|\ | | | | Afi safi3
| * pimd: Fix cli uplift mistakesDonald Sharp2017-05-021-10/+10
| | | | | | | | | | | | | | | | | | When we uplifted the cli from old -> new, I did not properly handle the switch from <1-3> to (1-3) for number ranges. Also fix some minor variable renaming that happened? Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | Fix: reverse logic of when to pass the supplied group addressJafar Al-Gharaibeh2017-05-021-4/+5
|/ | | | | | | | This was causing a crash when no group address was passed because a garbage pointer valuse was used. It also was ignoring the group address when passing one. Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
* Merge branch 'stable/3.0' into pim_dev_3_0Jafar Al-Gharaibeh2017-04-289-142/+251
|\
| * pimd: Tweak pim_ifchannel_compare to be fasterDonald Sharp2017-04-201-13/+8
| | | | | | | | | | | | | | | | Tweak the ifchannel compare to sort based upon interface first Ticket: CM-15629 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * pimd: Convert pim_ifchannel_list to use up->ifchannelsDonald Sharp2017-04-201-54/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have a bunch of places where we iterate over the pim_ifchannel_list to find those ifchannels that match a certain upstream. Since we already know in the upstream the list of ifchannels associated with it, just look at those instead. Functions changed: forward_on forward_off pim_upstream_rpf_interface_changed pim_upstream_update_could_assert pim_upstream_update_my_assert_metric pim_upstream_update_assert_tracking_desired pim_upstream_is_sg_rpt Ticket: CM-15629 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * pimd: Add ability for upstream to know it's ifchannelsDonald Sharp2017-04-203-0/+10
| | | | | | | | | | | | | | | | | | | | | | Add a list structure to track the ifchannels associated with a particular upstream. We are not doing anything with this particular knowledge yet but it will be come useful in the near future. Ticket: CM-15629 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * pimd: Limit search to relevant ifchannels in some casesDonald Sharp2017-04-203-58/+80
| | | | | | | | | | | | | | | | | | | | | | | | When we are determining an inherited_olist, let's be allot smarter about what we look at. Before this code change we are looping over the entirety of all ifchannels in the system to find the relevant ones. Convert the code to *find*(hash table lookup) the specific ifchannels we are interested in. Ticket: CM-15629 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * pimd: When loosing *,G igmp report notify S,G tooDonald Sharp2017-04-201-2/+5
| | | | | | | | | | | | | | | | | | When we have a S,G that was created due to the *,G IGMP report going away, safely remove the S,G as well. Ticket: CM-15838 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
| * pimd: Add prefix list handling to spt-switchoverDonald Sharp2017-04-209-16/+139
| | | | | | | | | | | | | | | | | | | | | | To the 'ip pim spt-switchover infinity-and-beyond' command add 'prefix-list <PLIST>'. To the command. Use this as the basis to deny (Not immediate switchover) or permit (Immediate switchover), based upon matching the group address and the prefix-list. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: fix pimd crashes around pim rpfChirag Shah2017-04-257-24/+55
| | | | | | | | | | | | | | | | 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>
* | pimd: Fix WG/SGRpt & WG J/P processingChirag Shah2017-04-253-6/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | pimd: Enable igmp on igmp version change cliChirag Shah2017-04-253-26/+50
| | | | | | | | | | | | | | | | | | | | | | Execute ip igmp version 3 under swp interface, verified show running displayed 'ip igmp' configuration. Continuous sending group membership, performed 'no ip igmp' and verified, group membership flushed. Performed 'ip igmp version 3', verified 'show ip igmp groups' displaying igmp membership re-populated. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* | pimd: Pim Nexthop Tracking support with ECMPChirag Shah2017-04-2515-174/+1144
|/ | | | | | | | | | | | | | | | | | | | | | | In this patch, PIM nexthop tracking uses locally populated nexthop cached list to determine ECMP based nexthop (w/ ECMP knob enabled), otherwise picks the first nexthop as RPF. Introduced '[no] ip pim ecmp' command to enable/disable PIM ECMP knob. By default, PIM ECMP is disabled. Intorudced '[no] ip pim ecmp rebalance' command to provide existing mcache entry to switch new path based on hash chosen path. Introduced, show command to display pim registered addresses and respective nexthops. Introuduce, show command to find nexthop and out interface for (S,G) or (RP,G). Re-Register an address with nexthop when Interface UP event received, to ensure the PIM nexthop cache is updated (being PIM enabled). During PIM neighbor UP, traverse all RPs and Upstreams nexthop and determine, if any of nexthop's IPv4 address changes/resolves due to neigbor UP event. Testing Done: Run various LHR, RP and FHR related cases to resolve RPF using nexthop cache with ECMP knob disabled, performed interface/PIM neighbor flap events. Executed pim-smoke with knob disabled. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com> (cherry picked from commit cba444817883b8b3b22a7ed9958dc9ed77f76230)
* pimd: Add the ability to never SPT switchoverDonald Sharp2017-04-057-1/+87
| | | | | | | Add the ability to allow pim to determine if we should allow spt-switchover or not on the LHR. Signed-off-by: Donald Sharp
* pimd: Fix crash when failure to create upstreamDonald Sharp2017-04-051-0/+7
| | | | | | | | | | | | | | When we have a *,G mroute that starts receiving any particular S,G, we will get wholepkt callbacks due to the pimreg in the OIL for the *,G. So we need to do SPT switchover, but this can fail if we do not have a path to the S( but we do to the RP!). In this case fail gracefully. Ticket: CM-15621 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Allow SPT switchoverDonald Sharp2017-04-054-28/+72
| | | | | | | | | | | | | | | | | | | | | | This allows SPT switchover for S,G upon receipt of packets on the LHR. 1) When we create a *,G from a IGMP Group Report, install the *,G route with the pimreg device on the OIL. 2) When a packet hits the LHR that matches the *,G, we will get a WHOLEPKT callback from the kernel and if we cannot find the S,G, that means we have matched it on the LHR via the *,G mroute. Create the S,G start the KAT and run inherited_olist. 3) When the S,G times out, safely remove the S,G via the KAT expiry 4) When the *,G is removed, remove any S,G associated with it via the LHR flag. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Add # of ifchannels to 'show ip pim int'Donald Sharp2017-04-051-2/+8
| | | | | | | Add the ability to see the number of ifchannels associated with a particular interface. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Cleanup termination to avoid possible null ptr derefDonald Sharp2017-03-311-4/+16
| | | | | | | | When terminating pim, there existed( albeit small ) the chance to cause a crash. Cleanup the termination to not have that chance. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Fix incorrect indentationDonald Sharp2017-03-311-1/+1
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Remove impossible conditions from testDonald Sharp2017-03-313-50/+4
| | | | | | | | | | | | It is impossible for the list->cmp function to ever be handed NULL values as the arguments. Clean up this in the code. Additionally consolidate the exact same two functions into 1 function. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Cleanup api and stop crashDonald Sharp2017-03-313-16/+19
| | | | | | | | | | | | | There is no need for a function that calls another function. Additionally, nexthop_updates from zebra can be either ZEBRA_NEXTHOP_UPDATE -or- ZEBRA_IMPORT_CHECK_UPDATE If we were to receive a IMPORT_CHECK_UPDATE the code would cause a immediate crash. Fix this Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Cleanup unused variable writeDonald Sharp2017-03-313-11/+5
| | | | | | | | There exists a common pattern in pim where we were setting a variable to a value in the error case when we would no longer need it. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Merge branch 'master' into pim-ssmDonald Sharp2017-03-308-221/+102
|\
| * pimd: del_oif and pim_channel_del_oif are the same functionDonald Sharp2017-03-231-139/+10
| | | | | | | | | | | | These two functions do the exact same thing. Refactor Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * pimd: Update inherited_olist when receiving a pruneDonald Sharp2017-03-231-0/+1
| | | | | | | | | | | | | | We were not always updating the inherited_olist when we received a prune. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * pimd: Fix inherited_olist decision for *,GDonald Sharp2017-03-231-0/+10
| | | | | | | | | | | | | | When we had a *,G join but a Prune S,G,rpt we were not taking that into account. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * pimd: When deleting last intf from an OIL don't delete the mrouteDonald Sharp2017-03-231-16/+0
| | | | | | | | | | | | | | | | In certain conditions when we are deleting the interface from an OIL do not delete the mroute. That decision should be made by the state machine. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>