summaryrefslogtreecommitdiff
path: root/pimd/pim_igmpv3.c
AgeCommit message (Collapse)Author
2018-08-14*: rename zlog_fer -> flog_errQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-14pimd: Convert over to use LIB_ERR_XXX for zlog_errDonald Sharp
Convert, where appropriate, the zlog_err functions to zlog_ferr for the LIB_ERR_XXX enums Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-11*: ALLOC calls cannot failDonald Sharp
There is no need to check for failure of a ALLOC call as that any failure to do so will result in a assert happening. So we can safely remove all of this code. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-07-08pimd: Remove unnecessary alloc failuresDonald Sharp
Remove from pim unnecessary alloc failure testing as that alloc failure will cause an assert. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-04pimd: show ip igmp statistics commandMladen Sablic
Command showing IGMP Rx statistics, useful for analyzing IGMP activity on interfaces. Signed-off-by: Mladen Sablic <mladen.sablic@gmail.com>
2018-03-08pimd: mtrace only IGMP socketsMladen Sablic
Feature of mtrace only IGMP sockets on pim sm and pim ssm interfaces. Modifed IGMP socket creation and show igmp interface command output. Signed-off-by: Mladen Sablic <mladen.sablic@gmail.com>
2017-09-26pimd: add support for boundariesQuentin Young
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>
2017-07-24pimd: Cleanup pimg from pim_igmpv3.cDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Make XX_forward_start 'struct pim_instance *' awareDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-17*: reindentreindent-master-afterwhitespace / reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-05-17pimd: Thread changes allow pim to crash a booDonald Sharp
When we add a thread pointer to thread_add_XXX functions when the specified function is called, thread.c is setting the thread pointer to NULL. This was causing pim to liberally pull it's zassert grenade pin's. Additionally clean up code to not set the NULL pointer. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-15*: make consistent & update GPLv2 file headersDavid Lamparter
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>
2017-05-09*: remove THREAD_ON macros, add nullity checkQuentin Young
The way thread.c is written, a caller who wishes to be able to cancel a thread or avoid scheduling it twice must keep a reference to the thread. Typically this is done with a long lived pointer whose value is checked for null in order to know if the thread is currently scheduled. The check-and-schedule idiom is so common that several wrapper macros in thread.h existed solely to provide it. This patch removes those macros and adds a new parameter to all thread_add_* functions which is a pointer to the struct thread * to store the result of a scheduling call. If the value passed is non-null, the thread will only be scheduled if the value is null. This helps with consistency. A Coccinelle spatch has been used to transform code of the form: if (t == NULL) t = thread_add_* (...) to the form thread_add_* (..., &t) The THREAD_ON macros have also been transformed to the underlying thread.c calls. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-05-06pimd: fix channel_oil and upstream RPF in syncChirag Shah
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>
2017-03-01pimd: Fix use of value after freeDonald Sharp
Fix the usage of source after it has been explicitly free'd. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-14pimd: ifdown sequnce stale report entryChirag Shah
Ticket: CM-14652 Testing Done: Tested via sending IGMP report and flap port and verified pim upstream and mroute, the entry is deleted. Run pim-smoke Even after Report received port down event, IGMP entry alawys exists in upstream, mroute, kernel. The entry exist because it was recreated after delete due missing check if group has no more source list, mode is exclude, last source address was * means (*, G) so do not trigger to create entry. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@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: Use NULL to signify NULL pointerDonald Sharp
Use the NULL c symbol to signify that we are intentionally setting the pointer to NULL instead of 0. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Remove unnecessary assertsDonald Sharp
When we handle the thread arguments, there is no need to assert. As that if they are wrong, we are going down shortly anyways. 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 support for IGMPv2Daniel Walton
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Ticket: CM-7962
2016-12-21pimd: Fix some SA issuesDonald Sharp
SA found these two issues: 1) Check of ifp non-null caused other non-checks down code to assume ifp could be null. This is not the case. If we get a callback at this point we must have a valid ifp pointer. 2) We were inadvertently calling igmp_source_reset_gmi with a possible NULL source pointer. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Some SA analysis fixes.Donald Sharp
This commit addresses some SA issues found: 1) double set variables 2) value set but never used. 3) wrong return path used. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: igmpv3.c was causing prune/join messages to be sentDonald Sharp
We were erroneously sending a prune *,G immediately followed by a join *,G under certain situations 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: Use XCALLOC instead of XMALLOCDonald Sharp
Ensure that all data structures start out as 0 filled. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Fixup some dead codeDonald Sharp
Remove some dead code. 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: Stale IGMP groups left behindDonald Sharp
When a toin IGMPv3 join is received, the code was always auto creating the igmp group associated with the received packet. The RFC clearly states though that if a INCLUDE is received for a group with 0 sources and we have received nothing the igmpv3 packet should be ignored. Ticket: CM-11260 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-07-12pimd: IGMPv3 leave not deleting group entryDonald Sharp
After sending a IGMPv3 exclude report for a multicast address with 0 sources, send an include report for the same group and also 0 sources. This should cause IGMP to GS query and age/delete the entry. This fix addresses this issue. Ticket: CM-11685 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-06-29pimd: Fix igmp isex_exclDonald Sharp
When we receive an igmpv3 group report that has an implied *,g make sure that we look at the source for the g and handle it appropriately Ticket: CM-11396 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-06-29pimd: Pass the appropriate data structure aroundDonald Sharp
Several static functions were passing a list around when the reality is we are going to need to look at the group information in order to make an informated decision. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-06-17pimd: Separate pim vif index spot from ifindexDonald Sharp
Allow pim to separate out the pim vif index from the ifindex. This change will allow pim to work with up to 255(MAXVIFS) interfaces, while also allowing the interface ifindex to be whatever number it needs to be. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-06-09pimd: Fix of using uninitialized MemoryDonald Sharp
Valgrind is reporting that pimd is using uninitialized memory for comparisons. This commit addresses the issues found there. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-06-06pimd: igmp_add_group_by_addr remove unneeded parameterDonald Sharp
We were passing in the interface name when we were also passing in the igmp pointer which has this information. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-06-06pimd: Remove unnecessary parameterDonald Sharp
We were already passing in the interface name, no need to do it twice. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-05-25pimd: cast to sockaddr_in to sockaddrDavid Lamparter
While glibc seems to have something in the system headers that prevents this from triggering a warning, FreeBSD doesn't. Fix the warning. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-05-25pimd: merge pimd as of 2015-01-19David Lamparter
Welcome pimd to the Quagga daemon zoo! This is a merge of commit 77ae369 ("pimd: Log ifindex found for an interface when zebra lib reports a new connected address."), with the intermediate "reconnect" changes removed (c9adf00...d274381). d274381 is replaced with b162ab7, which includes some changes. In addition, 4 reconnect-related changes and 1 cosmetic one have been bumped out. The rebase command used to produce the branch that is merged here is: git rebase --onto b162ab7 c9adf00 77ae369 Note that 3 patches had their author rewritten from "Anonymous SR#108542 <>" (which is not a valid git author ID) to: "Savannah SR#108542 <nbahr@atcorp.com>" (which is the e-mail address listed in the associated Savannah ticket) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>