summaryrefslogtreecommitdiff
path: root/pimd/pim_msdp.c
AgeCommit message (Collapse)Author
2021-05-03pimd: show MSDP configurationRafael Zalamena
Display the MSDP peer configuration in `show running-config` so it can be saved on configuration write. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-10-06pimd: MSDP SA forwardingAdriano Marto Reis
* If the MSDP peer receives the SA from a non-RPF peer towards the originating RP, it will drop the message. * SA messages are forwarded away from the RP address only. * SA messages are not forwarded within the mesh group. * Preventing the MSDP connection from being dropped due to RPF check failure (RFC3618, section 13 "MSDP Error Handling") Signed-off-by: Adriano Marto Reis <adrianomarto@gmail.com> Signed-off-by: Adriano Reis <areis@barrukka.local>
2020-04-20*: sprintf -> snprintfQuentin Young
Replace sprintf with snprintf where straightforward to do so. - sprintf's into local scope buffers of known size are replaced with the equivalent snprintf call - snprintf's into local scope buffers of known size that use the buffer size expression now use sizeof(buffer) - sprintf(buf + strlen(buf), ...) replaced with snprintf() into temp buffer followed by strlcat Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-04-13pimd: added no ip msdp mesh-group <word>Sarita Patra
Issue: no ip msdp mesh-group <word> source command deleting the mesh group, which might be used by the member. Solution: no ip msdp mesh-group <word> source command, deletes the mesh-group source. Add a new cli command "no ip msdp mesh-group <word>" to delete the mesh group. Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-03-05*: Replace __PRETTY_FUNCTION__/__FUNCTION__ to __func__Donatas Abraitis
Just keep the code cool. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-02-06*: Replace s_addr 0 => INADDR_ANYDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-02-04*: remove null check before XFREEQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-01-03pimd: Convert the upstream_list and hash to a rb treeDonald Sharp
Convert the upstream_list and hash to a rb tree, Significant time was being spent in the listnode_add_sort. This reduces this time greatly. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-11-15pimd: fixup JD macro to use "peer-msdp-sa" check instead of I_am_RP checkAnuradha Karuppiah
JD macro is defined by the RFC as - bool JoinDesired(S,G) { return (immediate_olist(S,G) != NULL OR (KeepaliveTimer(S,G) is running AND inherited_olist(S,G) != NULL)) } However for MSDP synced SA the KAT will not be running so an exception is needed. Earlier I had done this by relaxing KAT_run requirements entirely on the RP. However as that prevents the source from being aged out in some cases I have made the check more narrow i.e. has to an MSDP peer added entry. Ticket: CM-24398 Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-11-15pimd: replace direct accesses to t_ka_timer with a kat_running macroAnuradha Karuppiah
No functional change, simple cleanup to improve readability Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-05-29pimd: strcpy -> strlcpyQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-05-14lib: hashing functions should take const argumentsQuentin Young
It doesn't make much sense for a hash function to modify its argument, so const the hash input. BGP does it in a couple places, those cast away the const. Not great but not any worse than it was. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-02-25*: remove null check before XFREEQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-01-04pimd: Remove pim_msdp_config_write as it was never usedDonald Sharp
This function was never used, additionally rename the _helper function to this name. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-10-25*: spelchekDavid Lamparter
Signed-off-by: David Lamparter <equinox@diac24.net>
2018-10-19*: Replace hash_cmp function return value to a boolDonald Sharp
The ->hash_cmp and linked list ->cmp functions were sometimes being used interchangeably and this really is not a good thing. So let's modify the hash_cmp function pointer to return a boolean and convert everything to use the new syntax. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-10-02*: list_delete_and_null() -> list_delete()David Lamparter
Signed-off-by: David Lamparter <equinox@diac24.net>
2018-09-13*: style for EC replacementsQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-09-13*: LIB_[ERR|WARN] -> EC_LIBQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
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-02pimd: Cleanup msdp.mg on shutdownDonald Sharp
When shutting down PIM, ensure that hte pim->msdp.mg is cleaned up. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-02pim: Clean up some data on shutdown in msdpDonald Sharp
We were leaking some msdp hash backets and a msdp stream data pointer on shutdown. 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-30pimd: hash_get w/ hash_alloc_intern cannot failDonald Sharp
The assignment of sa with the usage of hash_get and hash_alloc_intern can never fail. No need to look for a failure case. Found by Coverity SA. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-11pimd: Cleanup msdp shutdownDonald Sharp
Shutdown pim msdp code a bit better. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-01pimd: Fix some msdp crashes when some fundamentals changeDonald Sharp
When the underlying networking subsystem is fundamentally changed via some system controls. If we have msdp running there exists a possibility that we need to stop some running timers to prevent a crash. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-05*: Convert list_delete(struct list *) to ** to allow nullingDonald Sharp
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>
2017-08-02pimd: Squash some more memory leaksDonald Sharp
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>
2017-07-28pimd: Fix msdp cleanup issuesDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-25pimd: Setup hash names appropriatelyDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Put 'struct pim_instance *' as the first function parameterDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Fix code to not send joins when SGRPT Prune is receivedDonald Sharp
When we receive a SGRPT Prune we were switching the upstream to JOINED and immediately sending a join. This was not the right thing to do. This was happening because we were making decisions about the new ifchannel before it was fully formed. Rework ifchannel startup to provide enough information to the pim upstream data structure to make the right decisions Ticket: CM-16425 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Fix crash when attempting to use channel_oil->pim before it is assignedDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Cleanup some basic crashes from mistakes made converting to vrfDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Cleanup the rest of the global config to be vrf aware for spacingDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Get show run to display vrf sub modeDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Make msdp `struct pim_instance *` awareDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Make pim MSDP pim instance aware to some extentDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Convert pim_rp.c to use 'struct pim_instance *'Donald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Remove pimg from pim_upstream.cDonald Sharp
Move the upstream_list, hash and wheel into 'struct pim_instance' Remove all pimg to pim in pim_upstream Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-22Revert "*: reindent pt. 2"David Lamparter
This reverts commit c14777c6bfd0a446c85243d3a9835054a259c276. clang 5 is not widely available enough for people to indent with. This is particularly problematic when rebasing/adjusting branches. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-17*: reindent pt. 2whitespace / reindent
w/ clang 5 * reflow comments * struct members go 1 per line * binpack algo was adjusted
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-07-13*: ditch vty_outln(), part 1 of 2David Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-01*: update hash_create(), hash_create_size()Quentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-29*: use vty_outlnQuentin Young
Saves 400 lines Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
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>