Commit graph

8 commits

Author SHA1 Message Date
Donald Sharp 6d80d0c595 bfdd: Use pass by reference instead of pass by value for a struct
The function bfd_key_lookup is currently sending by value for
a now very large structure.  Let's convert this over to pass
by reference.  This is noticed by coverity.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-02-05 08:42:00 -05:00
wumu.zsl e58f018e43 bfdd: implement Xpath callbacks for SBFD
Signed-off-by: wumu.zsl <wumu.zsl@alibaba-inc.com>
2025-01-23 02:30:44 +00:00
wumu.zsl c4f9964aec bfdd: add bfdname in bfd_key
sbfd will use bfdname for key hash, We introduced a bfd-name for every sbfd session, normal BFD sessions can leave it as NULL.
A unique bfd-name can be used to identify a sbfd session quickly. This is quite useful in our Srv6 deployment for path protection case.
For example, if use the sbfd session to protect the SRv6 path A-B-D, we would assign the name 'path-a-b-d' or 'a-b-d' to the session.

Signed-off-by: wumu.zsl <wumu.zsl@alibaba-inc.com>
2025-01-22 15:00:24 +00:00
David Lamparter acddc0ed3c *: auto-convert to SPDX License IDs
Done with a combination of regex'ing and banging my head against a wall.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-02-09 14:09:11 +01:00
Igor Ryzhov 874ca76997 bfdd: forbid setting interface for multihop sessions
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-06-01 18:08:29 +03:00
Renato Westphal 60ee8be107 *: change the signature of the northbound callbacks to be more flexible
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>
2020-04-23 10:14:32 -03:00
Rafael Zalamena b88113ef73 bfdd: remove BFD_*_FLAG macros
Lets use what FRR provide us instead of implementing a new macros.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-04-09 16:54:11 -03:00
Renato Westphal 6c57402944 bfdd: split northbound callbacks into multiple files
Rearrange the bfdd northbound callbacks as following:
* bfd_nb.h: prototypes of all northbound callbacks.
* bfd_nb.c: definition of all northbound callbacks and their
  associated YANG data paths.
* bfd_nb_config.c: implementation of YANG configuration nodes.
* bfd_nb_state.c: implementation of YANG state nodes.

This should help to keep to code more organized and easier to
maintain.

No behavior changes intended.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-10-30 10:32:51 -03:00