summaryrefslogtreecommitdiff
path: root/vrrpd/vrrp_northbound.c
AgeCommit message (Collapse)Author
2023-11-29lib: all: remove './' from xpath 22% speedupChristian Hopps
fixes #8299 Signed-off-by: Christian Hopps <chopps@labn.net>
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-11-25vrrpd: add IPv4 pseudoheader option for VRRPv3Siger Yang
This commit adds a new option to control whether a VRRPv3 group accepts / computes its checksum with a prepended IPv4 pseudoheader. This should improve interoperability with other devices. Signed-off-by: Siger Yang <siger.yang@outlook.com>
2022-01-27vrrpd: use ipaddr_is_zero when neededIgor Ryzhov
Replace custom implementation or call to ipaddr_isset with a call to ipaddr_is_zero. ipaddr_isset is not fully correct, because it's fine to have some non-zero bytes at the end of the struct in case of IPv4 and the function doesn't allow that. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-08-11vrrpd: log errmsg, stricter nb validationQuentin Young
* When failing a config transaction due to a VRID conflict, describe the error in the provided space * When validating, allow the NB userdata lookup for interface object to soft fail; but when applying, assert if it does not exist Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2020-08-11vrrpd: fix improper NB query during validationQuentin Young
We were querying the NB for an interface and expecting it to exist, but we were doing this during a validation run when the interface hasn't yet been created, resulting in an abort. Adjust validation checks to handle this scenario. Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2020-08-11vrrpd: don't allow autocreated vr's in NB layerQuentin Young
Changing properties on an autoconfigured VRRP instance results in its pointer being stored as a userdata in the NB tree, leading to UAF when autoconfigure deletes the instance and then later NB operations take place using the now-stale pointer. Ticket: CM-29850 Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-07-14*: remove PRI[udx](8|16|32)David Lamparter
These are completely pointless and break coccinelle string replacements. Scripted commit, idempotent to running: ``` python3 tools/stringmangle.py --pri8-16-32 `git ls-files | egrep '\.[ch]$'` ``` Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-23*: change the signature of the northbound callbacks to be more flexibleRenato Westphal
Having a fixed set of parameters for each northbound callback isn't a good idea since it makes it difficult to add new parameters whenever that becomes necessary, as several hundreds or thousands of existing callbacks need to be updated accordingly. To remediate this issue, this commit changes the signature of all northbound callbacks to have a single parameter: a pointer to a 'nb_cb_x_args' structure (where x is different for each type of callback). These structures encapsulate all real parameters (both input and output) the callbacks need to have access to. And adding a new parameter to a given callback is as simple as adding a new field to the corresponding 'nb_cb_x_args' structure, without needing to update any instance of that callback in any daemon. This commit includes a .cocci semantic patch that can be used to update old code to the new format automatically. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-12-09vrrpd, yang: cleanup vrrp nb conversionQuentin Young
- Use correct units and conversions in model & code - Fix incorrect CLI help string for V6 virtual addrs - Fix nb get-entry callback for virtual router - Fix a couple style nits - Simplify some CLI code - Remove unused code - Remove unused YANG definitions - Update sighup() to handle reloads - Update interface level config writer to use NB callbacks - Add simplified `no` forms for priority and advertisement-interval commands Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-09vrrpd: remove unused variablesQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-09vrrpd: remove unused variable in nbQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-09vrrpd: northbound conversionQuentin Young
Convert VRRPD to use the northbound API. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>