summaryrefslogtreecommitdiff
path: root/lib/plist_int.h
AgeCommit message (Collapse)Author
2023-02-09*: auto-convert to SPDX License IDsDavid Lamparter
Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-03-11lib: Convert prefix_master->str to a RB TreeDonald Sharp
The prefix_master->str data structure was a sorted list of the prefix names. Not that big of a deal other than insertion and deletion is insanely expensive when you have a large number of unique prefix-lists. In my test config file that I discovered this, I have 587 unique prefix lists spread out acros ~26k lines of prefix-lists. When reading this config file into FRR the read time goes from 690 seconds to 650 seconds. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-04-14*: cleanup number-named access-lists and prefix-listsIgor Ryzhov
A long time ago there was a difference between number-named and string-named access/prefix-lists. Currently we always treat the name as a string and there is no need for a separate list for number-named lists. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-06-05lib: fix route map crash on prefix list removalRafael Zalamena
Changes: - Refactor list entry deletion to use a function that properly notifies route map on deletion (fixes a heap-use-after-free). - Prefix list entry wild card sets `le` to maximum IP mask value and `any` is a boolean. - Fix prefix list trie removal order (in `prefix_list_entry_update_start`). - Let only the `any` callback change the value of field `any`. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-05lib: fix prefix list installationRafael Zalamena
Based on the function `prefix_list_entry_add` and `prefix_list_entry_delete` it was created two functions to replicate its functionality without the assumption we are always alocating a new prefix list entry. Since the prefix list entry is stored in the YANG private data structures, we want to avoid the allocation/free of memory that is hold by the schema. Every time a prefix list entry values change we must call `prefix_list_entry_update_start` to uninstall the entry from prefix list internal structures and then call `prefix_list_entry_update_finish` to put them back. The variable `installed` in the prefix list entry tracks the installation status of the internal structure. It is possible that a user unconfigures or forgets to add a `prefix` value and so we can't install the entry until then. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-05lib: export prefix-lists functionsRafael Zalamena
Export all functions that are going to be used by the northbound. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-04-16bgpd, lib: Use bool instead of uint8_t for community/prefix-list "any"Donatas Abraitis
That's only 0/1, useful to use just a bool for that. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-02-11lib: add extern "C" {} blocks to all libfrr headersRenato Westphal
These are necessary to use functions defined in these headers from C++. Signed-off-by: David Lamparter <equinox@diac24.net> Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-04-29lib: Convert internal sequence number to int64_tDonald Sharp
With the usage of a 32 bit number as a integer, but storing non-signed values in it, we have cases where numbers greater than 2 billion are being read in and stored and used before lower value numbers, which of course is awful and mean. Fixes: #2126 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-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>
2015-11-03lib: Fix missing plist_int.hDonald Sharp
Signed-off-by: Donald Sharpd <sharpd@cumulusnetworks.com>