summaryrefslogtreecommitdiffstats
path: root/bfdd/config.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #8121 from opensourcerouting/macro-cleanupDonatas Abraitis2021-03-221-1/+1
|\ | | | | *: require ISO C11 + semicolons after file-scope macros
| * *: require semicolon after DEFINE_MTYPE & coDavid Lamparter2021-03-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Back when I put this together in 2015, ISO C11 was still reasonably new and we couldn't require it just yet. Without ISO C11, there is no "good" way (only bad hacks) to require a semicolon after a macro that ends with a function definition. And if you added one anyway, you'd get "spurious semicolon" warnings on some compilers... With C11, `_Static_assert()` at the end of a macro will make it so that the semicolon is properly required, consumed, and not warned about. Consistently requiring semicolons after "file-level" macros matches Linux kernel coding style and helps some editors against mis-syntax'ing these macros. Signed-off-by: David Lamparter <equinox@diac24.net>
* | bfdd: separate echo rx/tx timersIgor Ryzhov2021-03-161-9/+17
|/ | | | | | | | | | Currently there is a single interval for both RX and TX echo functions. This commit introduces separate RX and TX timers for echo packets. The main advantage is to be able to set the receive interval to zero when we don't want to receive echo packets from the remote system. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* bfdd: use standard log macrosRafael Zalamena2020-04-101-41/+42
| | | | | | Remove old log_* macros and standardize on FRR's logging infrastructure. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* bfdd: remove BFD_*_FLAG macrosRafael Zalamena2020-04-091-4/+4
| | | | | | Lets use what FRR provide us instead of implementing a new macros. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* *: fix format string warningsDavid Lamparter2020-03-291-3/+3
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* *: remove tabs from log messagesDavid Lamparter2020-03-241-19/+22
| | | | | | | Some logging systems are, er, "allergic" to tabs in log messages. (RFC5424: "The syslog application SHOULD avoid octet values below 32") Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* bfdd: fix format stringsDavid Lamparter2020-01-211-2/+3
| | | | | | ... now that we get warnings about them ... Signed-off-by: David Lamparter <equinox@diac24.net>
* bfdd: use MTYPE_STATICDavid Lamparter2019-06-211-0/+2
| | | | | | | MTYPE definitions should be local to the file using them whereever possible. Also remove some superfluous ; Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* bfdd: move bfd_ses_[xx] to bfd_sess_[xx] like other routinesPhilippe Guibert2019-05-071-1/+1
| | | | | | | this is a change to be more consistent with function naming convention in bfd. a small change for 3 functions. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* bfdd: change session lookup data structureRafael Zalamena2019-03-121-28/+18
| | | | | | | | Use simplier data structure key to avoid having to do complex and error-prone key building (e.g. avoid expecting caller to know IPv6 scope id, interface index, vrf index etc...). Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* *: do not check XMALLOC / XCALLOC for null retQuentin Young2019-02-261-2/+0
| | | | | | They never return NULL Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* bfdd: implement session interface observerRafael Zalamena2019-02-141-6/+6
| | | | | | | | Allow `bfdd` to configure inexisting interfaces / VRF and only activate them once the interface/VRF start existing. This implementation doesn't handle dynamic VRFs yet. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* bfdd: refactor session lookupRafael Zalamena2019-02-141-9/+8
| | | | | | | | | | | Use internal data to lookup sessions. This approach has two main advantages: * it uses less memory because it doesn't use strings for interface / vrf, it uses OS indexes instead; * prepares code to support VRF; Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* bfdd: simplify timer data structureRafael Zalamena2019-02-141-1/+2
| | | | | | | | | | | | | | | Remove some legacy left overs of the old timer data structure bits and use a simpler version: We always keep the current configuration in the timer structure, but also keep the running timers (before poll transition) in `cur_timers`. With this we can remove `new_timers` and avoid timer copy configuration copy on final handler (this also simplifies peer show command). Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* bfdd: remove VxLAN codeRafael Zalamena2018-09-031-4/+0
| | | | | | | | Remove all VxLAN code. There are probably better ways to write VxLAN support without having to use raw sockets and depend on extra user configuration input. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* bfdd: imported new daemon source codeRafael Zalamena2018-08-081-0/+606
Import source code from external `bfdd` daemon ported from Cumulus PTM. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>