summaryrefslogtreecommitdiffstats
path: root/pimd/pim_ssmpingd.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: reindentreindent-master-afterwhitespace / reindent2017-07-171-332/+353
| | | | | | indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pimd: Address PR CommentsDonald Sharp2017-05-181-3/+0
| | | | | | Remove a bit more dead code and unused variable. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Thread changes allow pim to crash a booDonald Sharp2017-05-181-4/+1
| | | | | | | | | | | 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>
* *: make consistent & update GPLv2 file headersDavid Lamparter2017-05-151-18/+17
| | | | | | | | | | | 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>
* *: remove THREAD_ON macros, add nullity checkQuentin Young2017-05-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* *: Remove non-vrf based ifindex lookupDonald Sharp2017-03-151-1/+2
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Cleanup the headers.Donald Sharp2017-01-191-4/+0
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Merge remote-tracking branch 'origin/master' into pim_lib_work2Donald Sharp2017-01-181-0/+3
|\
| * build: remove $Format tagsDavid Lamparter2016-12-201-2/+0
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | pimd: Allow storing of sg in string formatDonald Sharp2016-12-221-2/+1
| | | | | | | | | | | | | | | | 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>
* | pimd: Remove unnecessary assertsDonald Sharp2016-12-221-3/+0
| | | | | | | | | | | | | | | | | | 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>
* | pimd: replace grp_str[100] with grp_str[INET_ADDRSTRLEN]Daniel Walton2016-12-221-16/+16
| | | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
* | pimd: Remove unnecessary QuaggaIdDonald Sharp2016-12-221-1/+0
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: Use XCALLOC instead of XMALLOCDonald Sharp2016-12-221-2/+2
| | | | | | | | | | | | | | Ensure that all data structures start out as 0 filled. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: Fixup some dead codeDonald Sharp2016-12-221-4/+2
|/ | | | | | Remove some dead code. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: create a helper function to set the IP_MULTICAST_LOOP sockoptionRenato Westphal2016-11-251-11/+7
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* pimd/zebra: fix setting of IP_MULTICAST_LOOP on OpenBSDRenato Westphal2016-11-251-1/+1
| | | | | | | | | Linux, FreeBSD and NetBSD (and possibly others too) accept both uint8_t and int for the IP_MULTICAST_LOOP sockoption. OpenBSD, in the other hand, accepts only uint8_t. To make setting IP_MULTICAST_LOOP work on every supported platform, always pass a uint8_t variable as a parameter. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: use an ifindex_t type, defined in lib/if.h, for ifindex valuesPaul Jakma2016-08-181-1/+1
| | | | (cherry picked from commit 9099f9b2a66e86f8a90d7fe18f61bd2bb1bc6744)
* pimd: use IPPROTO_IP (not SOL_IP) for IP_PKTINFODavid Lamparter2016-05-261-2/+2
| | | | | | | Solaris uses the same socket API for IP_PKTINFO as Linux, but doesn't have a SOL_IP define. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pimd: cast to sockaddr_in to sockaddrDavid Lamparter2016-05-261-2/+3
| | | | | | | 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>
* pimd: merge pimd as of 2015-01-19David Lamparter2016-05-261-0/+448
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>