summaryrefslogtreecommitdiffstats
path: root/bfdd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #16987 from opensourcerouting/bfd-echo-sockRuss White2024-11-262-48/+105
|\ | | | | bfdd: disable echo socket when not using it
| * bfdd: disable echo socket when not using itRafael Zalamena2024-11-132-48/+105
| | | | | | | | | | | | | | | | | | | | | | Lets avoid a performance penalty in forwarding when not using the BFD echo feature. The echo socket uses raw packet capturing along with a BPF filter which causes performance issues. While here change code to use `-1` for closed sockets instead of valid FD number `0`. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* | bfdd: retain remote dplane client socketMark Stapp2024-11-191-0/+3
|/ | | | | | | When using bfd in remote-dataplane client mode, don't close a new client socket if we're going to try to use it. Signed-off-by: Mark Stapp <mjs@cisco.com>
* bfdd, doc, yang: change bfd timer and multiplier valuesPhilippe Guibert2024-10-081-12/+12
| | | | | | | | | | | | | | | | | The minimum and maximum values for BFD timers and multiplier settings have been updated to align with RFC 5880 requirements. Since the values inputted via VTY are in milliseconds, the maximum permissible value on the VTY interface is 4,294,967 milliseconds. For the multiplier setting, the minimum value is now restricted to be greater than zero, as zero is not allowed. The minimum transmit interval has been set to 10 milliseconds to ensure reliable service performance. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com> Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* bfdd: add no variants to all configurationsLouis Scalbert2024-10-031-4/+7
| | | | | | | Continue the work of b70835d690 ("bfdd: add no variants to interval configurations") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* bfdd: add no variants to interval configurationsRafael Zalamena2024-10-011-16/+25
| | | | | | Add missing no commands to various interval configurations. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* bfdd: remove control socket obsolete codeRafael Zalamena2024-07-2510-1809/+76
| | | | | | | | Let's remove the obsolete BFD control socket. If the functionality is needed then YANG/northbound notifications / getting should be used instead. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* bfdd: changes for code maintainabilitysri-mohan12024-07-163-16/+17
| | | | | | these changes are for improving the code maintainability and readability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
* bfdd: fix BFD_GETCBITIgor Ryzhov2024-04-151-1/+1
| | | | | | The macro should check C bit, not F bit. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* Merge pull request #15697 from zmw12306/bfd_check_MflagIgor Ryzhov2024-04-122-0/+8
|\ | | | | bfdd: Add check for flag Multipoint (M)
| * bfdd: add check for flag Mzmw123062024-04-122-0/+8
| | | | | | | | Signed-off-by: zmw12306 <zmw12306@gmail.com>
* | *: create a single registry of daemons' default port valuesMark Stapp2024-02-011-1/+1
| | | | | | | | | | | | | | | | Create a single registry of default port values that daemons are using. Most of these are vty ports, but there are some others for features like ospfapi and zebra FPM. Signed-off-by: Mark Stapp <mjs@labn.net>
* | *: fix `frr_daemon_info` indentationDavid Lamparter2024-01-271-6/+13
| | | | | | | | | | | | | | | | | | | | clang-format doesn't understand FRR_DAEMON_INFO is a long macro where laying out items semantically makes sense. (Also use only one `FRR_DAEMON_INFO(` in isisd so editors don't get confused with the mismatching `( ( )`. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | build: nuke `BFDD_CONTROL_SOCKET`David Lamparter2024-01-273-8/+7
| | | | | | | | | | | | This just unnecessarily complicates things by involving autoconf. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: zebra.h should not have fcntl.hDonald Sharp2024-01-091-0/+2
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | *: remove sys/stat.h from zebra.hDonald Sharp2024-01-091-0/+1
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | *: Remove sys/ioctl.h from zebra.hDonald Sharp2024-01-041-0/+1
| | | | | | | | | | | | | | Practically no-one uses this and ioctls are pretty much wrappered. Further wrappering could make this even better. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | lib: all: remove './' from xpath 22% speedupChristian Hopps2023-11-292-17/+17
| | | | | | | | | | | | fixes #8299 Signed-off-by: Christian Hopps <chopps@labn.net>
* | Merge pull request #14811 from donaldsharp/zebra_final_shutdown_finallyChristian Hopps2023-11-283-0/+8
|\ \ | | | | | | Zebra final shutdown finally
| * | bfdd: Free zclient memory on shutdownDonald Sharp2023-11-213-0/+8
| | | | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | | *: Let's use the native IFNAMSIZ instead of INTERFACE_NAMSIZDonald Sharp2023-11-211-1/+1
|/ / | | | | | | | | | | | | | | INTERFACE_NAMSIZ is just a redefine of IFNAMSIZ and IFNAMSIZ is the standard for interface name length on all platforms that FRR currently compiles on. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | *: Remove netlink headers from lib/zebra.hDonald Sharp2023-11-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | The headers associated with netlink code really only belong in those that need it. Move these headers out of lib/zebra.h and into more appropriate places. bgp's usage of the RT_TABLE_XXX defines are probably not appropriate and will be cleaned up in future commits. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | lib: convert if_zapi_callbacks into actual hooksDavid Lamparter2023-11-031-1/+2
| | | | | | | | | | | | | | | | | | ...so that multiple functions can be subscribed. The create/destroy hooks are renamed to real/unreal because that's what they *actually* signal. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: remove ZEBRA_INTERFACE_VRF_UPDATEanlan_cs2023-10-071-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently when one interface changes its VRF, zebra will send these messages to all daemons in *order*: 1) `ZEBRA_INTERFACE_DELETE` ( notify them delete from old VRF ) 2) `ZEBRA_INTERFACE_VRF_UPDATE` ( notify them move from old to new VRF ) 3) `ZEBRA_INTERFACE_ADD` ( notify them added into new VRF ) When daemons deal with `VRF_UPDATE`, they use `zebra_interface_vrf_update_read()->if_lookup_by_name()` to check the interface exist or not in old VRF. This check will always return *NULL* because `DELETE` ( deleted from old VRF ) is already done, so can't find this interface in old VRF. Send `VRF_UPDATE` is redundant and unuseful. `DELETE` and `ADD` are enough, they will deal with RB tree, so don't send this `VRF_UPDATE` message when vrf changes. Since all daemons have good mechanism to deal with changing vrf, and don't use this `VRF_UPDATE` mechanism. So, it is safe to completely remove all the code with `VRF_UPDATE`. Signed-off-by: anlan_cs <anlan_cs@tom.com>
* | bfdd: add debug flag around loglynnemorrison2023-07-281-3/+4
| | | | | | | | Signed-off-by: Lynne Morrison <lynne.morrison@ibm.com>
* | bfdd: add additional parameters to json commandlynnemorrison2023-07-281-0/+6
| | | | | | | | | | | | | | Add parameters to the "show bfd peers json" command to display interface and type of BFD session. Signed-off-by: Lynne Morrison <lynne.morrison@ibm.com>
* | Merge pull request #13675 from zmw12306/bfd_version_checkIgor Ryzhov2023-06-111-1/+1
|\ \ | | | | | | bfd:fix version bits check
| * | bfdd: fix version bits check.zmw123062023-06-031-1/+1
| |/ | | | | | | | | The version of bfd pkt is represented by 3 bits in B[0]. Signed-off-by: zmw12306 <zmw12306@gmail.com>
* | Merge pull request #13364 from zmw12306/bfd_authDonatas Abraitis2023-06-082-0/+52
|\ \ | | | | | | bfd: fix missing Authentication in control pkt
| * | bfd: fix missing Authentication in control pktzmw123062023-04-252-0/+52
| |/ | | | | | | | | According RFC 5880, add a simpilfed version handling authentication Signed-off-by: zmw12306 <zmw12306@gmail.com>
* | bfdd: remove redundant nb destroy callbacksIgor Ryzhov2023-05-313-43/+0
| | | | | | | | | | | | | | | | | | | | Fixes warning logs: ``` 2023/05/29 20:11:50 BFD: [ZKB8W-3S2Q4][EC 100663330] unneeded 'destroy' callback for '/frr-bfdd:bfdd/bfd/profile/minimum-ttl' 2023/05/29 20:11:50 BFD: [ZKB8W-3S2Q4][EC 100663330] unneeded 'destroy' callback for '/frr-bfdd:bfdd/bfd/sessions/multi-hop/minimum-ttl' ``` Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* | Merge pull request #13556 from donaldsharp/token_to_descRuss White2023-05-231-2/+2
|\ \ | | | | | | memory desciprtion shortening
| * | bfdd: Use shorter memory names so that they fit in vty outputDonald Sharp2023-05-201-2/+2
| |/ | | | | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* / bfdd: Fix malformed session with vrfanlan_cs2023-05-111-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | With this configuration: ``` bfd peer 33:33::66 local-address 33:33::88 vrf vrf8 interface enp1s0 exit ! exit ``` The bfd session can't be established with error: ``` bfdd[18663]: [YA0Q5-C0BPV] control-packet: wrong vrfid. [mhop:no peer:33:33::66 local:33:33::88 port:2 vrf:61] ``` The vrf check should use the carefully adjusted `vrfid`, which is based on globally/reliable interface. We can't believe the `bvrf->vrf->vrf_id` because the `/proc/sys/net/ipv4/udp_l3mdev_accept` maybe is set "1" in VRF-lite backend even with security drawback. Just correct the vrf check. Signed-off-by: anlan_cs <vic.lan@pica8.com>
* *: Convert event.h to frrevent.hDonald Sharp2023-03-241-1/+1
| | | | | | | We should probably prevent any type of namespace collision with something else. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert `struct event_master` to `struct event_loop`Donald Sharp2023-03-242-2/+2
| | | | | | Let's find a better name for it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert THREAD_XXX macros to EVENT_XXX macrosDonald Sharp2023-03-245-38/+38
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert struct thread_master to struct event_master and it's ilkDonald Sharp2023-03-242-2/+2
| | | | | | | Convert the `struct thread_master` to `struct event_master` across the code base. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert thread_cancelXXX to event_cancelXXXDonald Sharp2023-03-241-4/+4
| | | | | | Modify the code base so that thread_cancel becomes event_cancel Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert thread_add_XXX functions to event_add_XXXDonald Sharp2023-03-246-61/+61
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Rename `struct thread` to `struct event`Donald Sharp2023-03-245-34/+34
| | | | | | | | | Effectively a massive search and replace of `struct thread` to `struct event`. Using the term `thread` gives people the thought that this event system is a pthread when it is not Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Rename thread.[ch] to event.[ch]Donald Sharp2023-03-241-1/+1
| | | | | | | | | | | This is a first in a series of commits, whose goal is to rename the thread system in FRR to an event system. There is a continual problem where people are confusing `struct thread` with a true pthread. In reality, our entire thread.c is an event system. In this commit rename the thread.[ch] files to event.[ch]. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* bfdd: Remove useless check for ECHO packetanlan_cs2023-03-031-7/+1
| | | | | | | | | | The check with `ip->daddr == ip->saddr` in `bfd_recv_ipv4_fp()` is useless, instead of it the ECHO packets should simply exit with TTL checking failure regardless of this condition check. Just remove the check. Signed-off-by: anlan_cs <vic.lan@pica8.com>
* *: auto-convert to SPDX License IDsDavid Lamparter2023-02-0916-232/+16
| | | | | | Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: manual SPDX License ID conversionsDavid Lamparter2023-02-091-18/+1
| | | | | | | | | | The files converted in this commit either had some random misspelling or formatting weirdness that made them escape automated replacement, or have a particularly "weird" licensing setup (e.g. dual-licensed.) This also marks a bunch of "public domain" files as SPDX License "NONE". Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* bfdd: fix size_t format stringDavid Lamparter2023-01-271-1/+1
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: apply proper format string attributesDavid Lamparter2023-01-272-0/+2
| | | | | | So that we get warnings about broken format strings. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* bfdd: validate incoming control message lengthMark Stapp2023-01-101-0/+9
| | | | | | | Apply upper bound on incoming control messages, drop invalid messages. Signed-off-by: Mark Stapp <mjs@labn.net>
* bfdd: fix IPv4 socket source selectionRafael Zalamena2022-11-241-2/+0
| | | | | | | | | | The imported BFD code had some logic to ignore the source address when using single hop IPv4. The BFD peer socket function should allow the source to be selected so we can: 1. Select the source address in the outgoing packets 2. Only receive packets from that specific source Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* build, vtysh: extract vtysh commands from .xrefDavid Lamparter2022-10-263-6/+0
| | | | | | | | | | | | | | | | | | | Rather than running selected source files through the preprocessor and a bunch of perl regex'ing to get the list of all DEFUNs, use the data collected in frr.xref. This not only eliminates issues we've been having with preprocessor failures due to nonexistent header files, but is also much faster. Where extract.pl would take 5s, this now finishes in 0.2s. And since this is a non-parallelizable build step towards the end of the build (dependent on a lot of other things being done already), the speedup is actually noticeable. Also files containing CLI no longer need to be listed in `vtysh_scan` since the .xref data covers everything. `#ifndef VTYSH_EXTRACT_PL` checks are equally obsolete. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>