summaryrefslogtreecommitdiffstats
path: root/vrrpd/vrrp_northbound.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* vrrpd: log errmsg, stricter nb validationQuentin Young2020-08-111-2/+8
| | | | | | | | | * 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>
* vrrpd: fix improper NB query during validationQuentin Young2020-08-111-5/+8
| | | | | | | | | 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>
* vrrpd: don't allow autocreated vr's in NB layerQuentin Young2020-08-111-3/+13
| | | | | | | | | | 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>
* *: remove PRI[udx](8|16|32)David Lamparter2020-07-141-1/+1
| | | | | | | | | | | 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>
* *: change the signature of the northbound callbacks to be more flexibleRenato Westphal2020-04-231-143/+123
| | | | | | | | | | | | | | | | | | | | | 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>
* vrrpd, yang: cleanup vrrp nb conversionQuentin Young2019-12-091-10/+5
| | | | | | | | | | | | | | | | - 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>
* vrrpd: remove unused variablesQuentin Young2019-12-091-4/+1
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: remove unused variable in nbQuentin Young2019-12-091-4/+2
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vrrpd: northbound conversionQuentin Young2019-12-091-0/+814
Convert VRRPD to use the northbound API. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>