summaryrefslogtreecommitdiffstats
path: root/pimd/pim_jp_agg.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: Finish off the __PRETTY_FUNCTION__ to __func__Donald Sharp2020-03-061-2/+2
| | | | | | FINISH IT Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: jp-agg list update debug logsAnuradha Karuppiah2019-11-151-4/+33
| | | | | | | | | Added event logs around add/del of upstream entries into the nbr's jp-agg list. This is to help debug a problem with stale (deleted) upstream entries being present in the list causing pimd to crash on the periodic processing. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
* pimd: send an immediate XG JP message when switching from SPT to RPTAnuradha Karuppiah2019-11-151-4/+4
| | | | | | | | | | | Today we are only pruning the SPT when (S,G) upstream entry switches from Joined toNotJoined. This leaves the source still pruned along the RPT till the next periodic XG join-prune is sent to the RPF(RP). Traffic from the source will be blackholed for this duration. To prevent that we need send a new JP message to RPF(RP) immediately. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
* pimd: RPF change to unreachable was leaving a stale entry in the jp-agg listAnuradha Karuppiah2019-11-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was causing pimd to crash later; call-stack - (gdb) bt context=<optimized out>) at lib/sigevent.c:254 group=group@entry=0x7ffffa9797e0) at pimd/pim_rp.c:207 grp=grp@entry=0x7ffffa9799fe, sgs=sgs@entry=0x560ac069edb0, size=52) at pimd/pim_msg.c:200 groups=<optimized out>) at pimd/pim_join.c:562 at pimd/pim_neighbor.c:288 at lib/thread.c:1599 at lib/libfrr.c:1024 envp=<optimized out>) at pimd/pim_main.c:162 (gdb) fr 4 group=group@entry=0x7ffffa9797e0) at pimd/pim_rp.c:207 207 pimd/pim_rp.c: No such file or directory. (gdb) fr 6 grp=grp@entry=0x7ffffa9799fe, sgs=sgs@entry=0x560ac069edb0, size=52) at pimd/pim_msg.c:200 200 pimd/pim_msg.c: No such file or directory. (gdb) p source->up->sg_str $1 = '\000' <repeats 31 times>, <incomplete sequence \361> (gdb) This problem can manifest in the following event sequence - 1. upstream RPF neighbor is resolved 2. upstream RPF neighbor becomes unresolved (but upstream entry stays on the jp-agg list) 3. upstream entry is removed on the next old-neighbor jp-agg-list processing the stale entry is accessed resulting in the crash. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
* pimd: handle RPF resolution while in joined stateAnuradha Karuppiah2019-11-151-1/+7
| | | | | | | | If an dummy upstream entry (no RPF nbr) which is already in a JOINED state is resolved we were not triggering an immediate join via the per-interface upstream switch list. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
* pimd: `debug igmp trace` turns on non igmp debugsDonald Sharp2019-11-121-1/+1
| | | | | | | | | When you turn on `debug igmp trace` we are seeing a bunch of debugs associated with pim processing. This is because we were using PIM_DEBUG_TRACE which is both `debug igmp trace` and `debug pim trace` when tracing igmp code it would be nice to only see igmp work. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Handling Null incoming interface of dummy upstreamSarita Patra2019-02-251-2/+12
| | | | | | | | | | | When FRR receives IGMP/PIM (*, G) join and RP is not configured or not reachable, then we are creating a dummy upstream with incoming interface as NULL and upstream address as INADDR_ANY. Added upstream address and incoming interface validation where it is necessary, before doing any operation on the upstream. Signed-off-by: Sarita Patra <saritap@vmware.com>
* *: list_delete_and_null() -> list_delete()David Lamparter2018-10-021-3/+3
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* pimd: Remove unnecessary alloc failuresDonald Sharp2018-07-081-1/+0
| | | | | | | Remove from pim unnecessary alloc failure testing as that alloc failure will cause an assert. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: use the FOR_ALL_INTERFACES abstraction from babeldRenato Westphal2017-10-101-1/+1
| | | | | | | | | | 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>
* *: use rb-trees to store interfaces instead of sorted linked-listsRenato Westphal2017-10-101-2/+1
| | | | | | | | | | | 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>
* *: Convert list_delete(struct list *) to ** to allow nullingDonald Sharp2017-10-051-5/+3
| | | | | | | | | | | | | | | | | | | Convert the list_delete(struct list *) function to use struct list **. This is to allow the list pointer to be nulled. I keep running into uses of this list_delete function where we forget to set the returned pointer to NULL and attempt to use it and then experience a crash, usually after the developer has long since left the building. Let's make the api explicit in it setting the list pointer to null. Cynical Prediction: This code will expose a attempt to use the NULL'ed list pointer in some obscure bit of code. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Squash some more memory leaksDonald Sharp2017-08-021-0/+1
| | | | | | | | | | | When a interface is flapped we were leaking some memory associated with link lists. Especially in the jp_agg code. If your network was/is stable and you are not running at any scale you probably would not see this as impactful at all. Ticket: CM-16392 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Cleanup pim_jp_agg_upstream_verification functionDonald Sharp2017-07-241-2/+4
| | | | | | Do not use pimg, figure out which instance we are in and use that. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Cleanup use of VRF_DEFAULT to pimg->vrf_idDonald Sharp2017-07-241-1/+1
| | | | | | | Use the appropriate vrf_id instead of always defaulting to VRF_DEFAULT Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: reindentreindent-master-afterwhitespace / reindent2017-07-171-260/+235
| | | | | | indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: make consistent & update GPLv2 file headersDavid Lamparter2017-05-151-4/+3
| | | | | | | | | | | The FSF's address changed, and we had a mixture of comment styles for the GPL file header. (The style with * at the beginning won out with 580 to 141 in existing files.) Note: I've intentionally left intact other "variations" of the copyright header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pimd: Fix WG/SGRpt & WG J/P processingChirag Shah2017-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | 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: 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 pimd crashes around pim rpfChirag Shah2017-04-251-2/+3
| | | | | | | | 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: Ensure that *,G is first entry in srcs listDonald Sharp2017-03-231-2/+2
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Cleanup ref countingDonald Sharp2017-03-171-7/+6
| | | | | | | | | | | | | | pim_jp_agg list should not ref count pim_upstream as that the deletion of pim_upstream deletion should remove the pim_upstream from the j/p agg list. Cleanup a memory leag of jag Make comparison of js cleaner in add_group Move THREAD_OFF to before the neighbor find. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Add code to catch J/P Agg list issuesDonald Sharp2017-03-161-0/+69
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Cleanup JP Agg a bit moreDonald Sharp2017-03-161-9/+34
| | | | | | | | | | | | | | | The J/P Aggregation + the NHT tracking code was not playing nicely together 1) Clean up pim_upstream ref counting to keep a bit better track of it. 2) When we delete pim_upstream zero it out to hopefully catch issues faster in the future 3) Clean up J/P Agg source list a bit better to keep order Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Separate the register and upstream join states on the FHRanuradhak2017-03-101-0/+4
| | | | | | | | | | | | | | | | | | | | On the FHR upstream-join-state is not particularly relevant as we don't need to send upstream JPs for the SG. So that field was being overloaded with the register-state. However some of the events that triggered changes to the JoinDesired macro were accidentally overwriting the state with join info (instead of treating it as register info) confusing the register state machine. To make the PIM RFC macros' implemention simple I have separated out the register-state. And upstream->state now solely describes the upstream-join-state independent of the role of the PIM router. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-14700 Testing Done: verified pim-register state-machine with separate and combined FHR/RP routers. Also ran pim-smoke.
* pimd: Don't double include SourceDonald Sharp2017-03-081-5/+14
| | | | | | | | When we are adding to a J/P Agg list, don't double add the source. Ticket: CM-15189 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Fix various ifdown/ifup scenarios w/ J/P AggDonald Sharp2017-03-081-3/+15
| | | | | | | | There exists situations where we may have cleaned not properly cleaned up the various J/P aggregation lists. This commit fixes those issues. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Add copyright Information to pim_jp_agg.[ch]Donald Sharp2017-03-071-0/+20
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Join/Prune AggregationDonald Sharp2017-03-021-0/+228
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>