[PATCH] static: Support for BFD controlled static routes
Hi, This is my first submission into the community, it is a change to the static protocol to support the addition / deletion of static routes based on the availability of the gateway as determined by BFD. This was implemented as a proof of concept for one of our customers, it appears to work although has only been tested against the bfd-beacon, with routes exported to a remote BGP associated router. There two non-related changes to the which move the declaration of some variable to the start of the appropriate function, this is because we are using a very only GCC compiler that doesn't allow declaration mid code. Regards Steve ======================= Steve Atkinson CEng BEng(hon) MIET Teligent Ltd 2 Kings Hill Avenue West Malling Kent ME19 4AQ Telephone: +44(0) 1732 879 655 Fax: +44 (0) 1732 879601 [YourHomePhoneIsAnywhere] The information in this email is confidential. The contents may not be disclosed or used by anyone other than the addressee. If you are not the intended recipient, please notify the sender immediately at the above address. The sender cannot accept any responsibility for the accuracy or completeness of this message as it has been transmitted over a public network. [BSI] Teligent Ltd is registered in England and Wales, registration number 2893478. Registered office Lion House, Red Lion Street, London WC1R 4GB. VAT registration GB639938577.
Hi, On Tue, Jul 14, 2015 at 06:33:30 +0000, Steve Atkinson wrote:
Hi,
This is my first submission into the community, it is a change to the static protocol to support the addition / deletion of static routes based on the availability of the gateway as determined by BFD. This was implemented as a proof of concept for one of our customers, it appears to work although has only been tested against the bfd-beacon, with routes exported to a remote BGP associated router.
Interesting idea, really. I am not a bird developer, just stumbled over some cosmetic things: diff -Naur bird-1.5.0/proto/static/static.c bird/proto/static/static.c --- bird-1.5.0/proto/static/static.c 2015-06-08 11:11:21.000000000 +0000 +++ bird/proto/static/static.c 2015-06-23 07:59:24.000000000 +0000 @@ -47,6 +47,12 @@ #include "static.h" +#ifdef HACK_BFD_IN +#include "nest/bfd.h" +#endif You should move this into static.h, as static.h uses bfd_request, so it needs this too. + +void static_bfd_notify(struct bfd_request *req); + Make that into a "static void"? It's only needed in this file, so no need to have it non-static.
Regards
Steve [...]
Cheers Christian -- www.cosmokey.com
On Tue, Jul 14, 2015 at 06:33:30AM +0000, Steve Atkinson wrote:
Hi,
This is my first submission into the community, it is a change to the static protocol to support the addition / deletion of static routes based on the availability of the gateway as determined by BFD. This was implemented as a proof of concept for one of our customers, it appears to work although has only been tested against the bfd-beacon, with routes exported to a remote BGP associated router.
Hello Thanks for the patch. It is one thing i wanted to have implemented, just i hadn't found the time to do it. There were some problems with the patch (like not handling protocol reconfiguration, unnecessary function locate_route_with_bfd_req() and some minor issues) and it is a simple thing i rather implemented it anew. See: https://gitlab.labs.nic.cz/labs/bird/commit/538264cf1a7690d90b2953aebff21958... It depends on a previous patch for general route options. There is a slightly different syntax, 'bfd' is one option in a block of options: route 10.0.0.0/24 via 10.1.1.1 { bfd; }; Also there is a minor semantic change - BFD session is required to be established before the route is activated. Although other BFD-enhanced protocols use BFD just in advisory manner (i.e. if BFD session cannot be established, it is just disregarded), seems to me that for static protocol, which does not have native way to establish liveness of a neighbor, the mandatory manner (no session -> no route) makes much more sense. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
participants (3)
-
Christian Tacke -
Ondrej Zajicek -
Steve Atkinson