summaryrefslogtreecommitdiff
path: root/babeld/kernel.c
AgeCommit message (Collapse)Author
2024-09-23babeld: Do not remove route when replacingDonald Sharp
When sending down a babel route do not remove then add it back. Just send down the change. This change will not cause packets to be dropped now. Signed-off-by: Donald Sharp <sharpd@nvidia.com> (cherry picked from commit 63e2c092a363bf6ff8ca434d1f68bc29fa5b4dac)
2024-01-09*: zebra.h should not have fcntl.hDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert event.h to frrevent.hDonald Sharp
We should probably prevent any type of namespace collision with something else. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Rename thread.[ch] to event.[ch]Donald Sharp
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>
2023-02-09*: auto-convert to SPDX License IDsDavid Lamparter
Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-08-24babeld: Remove return value for gettime()Donald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-07-01*: Convert numeric 32 into IPV4_MAX_BITLEN for prefixlenDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-02-13*: Remove break after returnDonatas Abraitis
Just a deadcode. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2018-09-08*: fix config.h/zebra.h include orderDavid Lamparter
config.h (or, transitively, zebra.h) must be the first include file listed for autoconf things like _GNU_SOURCE and _POSIX_C_SOURCE to work correctly. Signed-off-by: David Lamparter <equinox@diac24.net>
2018-08-11babeld: Use enum instead of #defines for kernel route type informationDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-03-27*: use C99 standard fixed-width integer typesQuentin Young
The following types are nonstandard: - u_char - u_short - u_int - u_long - u_int8_t - u_int16_t - u_int32_t Replace them with the C99 standard types: - uint8_t - unsigned short - unsigned int - unsigned long - uint8_t - uint16_t - uint32_t Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-02-08*: Track vrfs per nexthop not per route entryDonald Sharp
Track the vfrs on a per nexthop basis instead of on a per route entry basis. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-12*: Send/receive the nexthop vrf_idDonald Sharp
Modify the code to send and receive to/from zebra the nexthops vrf_id. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-12-04babeld: if_eui64 never uses ifnameDonald Sharp
Remove this variable. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-28*: remove ZEBRA_FLAG_{BLACKHOLE,REJECT} from APIDavid Lamparter
FLAG_BLACKHOLE is used for different things in different places. remove it from the zclient API, instead indicate blackholes as proper nexthops inside the message. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-23babeld: unify kernel_route_v4() and kernel_route_v6()Renato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-08-23lib/zserv: introduce address-family independent ZAPI message typesRenato Westphal
As noticed in 657cde1, the zapi_ipv[4|6]_route functions are broken in many ways and that's the reason that many client daemons (e.g. ospfd, isisd) need to send handcrafted messages to zebra. The zapi_route() function introduced by Donald solves the problem by providing a consistent way to send ipv4/ipv6 routes to zebra with nexthops of any type, in all possible combinations including IPv4 routes with IPv6 nexthops (for BGP unnumbered routes). This patch goes a bit further and creates two new address-family independent ZAPI message types that the client daemons can use to advertise route information to zebra: ZEBRA_ROUTE_ADD and ZEBRA_ROUTE_DELETE. The big advantage of having address-family independent messages is that it allows us to remove a lot of duplicate code in zebra and in the client daemons. This patch also introduces the zapi_route_decode() function. It will be used by zebra to decode route messages sent by the client daemons using zclient_route_send(), which calls zapi_route_encode(). Later on we'll use this same pair of encode/decode functions to send/receive redistributed routes from zebra to the client daemons, taking the idea of removing code duplication to the next level. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-08-23lib: updates to zapi_routeRenato Westphal
This patch introduces the following changes to the zapi_route structure and associated code: * Use a fixed-size array to store the nexthops instead of a pointer. This makes the zapi_route() function much easier to use when we have multiple nexthops to send. It's also much more efficient to put everything on the stack rather than allocating an array in the heap every time we need to send a route to zebra; * Use the new 'zapi_nexthop' structure. This will allow the client daemons to send labeled routes without having to allocate memory for the labels (the 'nexthop' structure was designed to be memory efficient and doesn't have room for MPLS labels, only a pointer). Also, 'zapi_nexthop' is more compact and more clean from an API perspective; * Embed the route prefix inside the zapi_route structure. Since the route's prefix is sent along with its nexthops and attributes, it makes sense to pack everything inside the same structure. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-06-13babeld: install directly connected IPv4 as suchDavid Lamparter
babeld would install "1.2.3.4 on eth0" as "1.2.3.4 via 1.2.3.4 on eth0". Remove the superfluous nexthop and send to zebra as directly-connected route. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-06-04babeld: Modify code to use zapi_route functionDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumuusnetworks.com>
2017-05-26babeld: The sockaddr code is not passed through anymoreDonald Sharp
The hw_addr_len and hw_addr are properly setup on all the different systems. We no longer need to have individual daemons know anything about this underlying mechanism to get the data from the kernel. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-26babeld: Remove comment (fixed by 64682f5e69).Matthieu Boutier
Signed-off-by: Matthieu Boutier <boutier@irif.fr>
2017-05-24babel: Make sure instance is 0Donald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-24babeld: Send in the ifindex to zebra for route installDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-24babeld: Fix VRF for zebra route messages.Matthieu Boutier
Signed-off-by: Matthieu Boutier <boutier@pps.univ-paris-diderot.fr>
2017-05-13*: Initial Import of Babeld into FRRDonald Sharp
This is a direct copy of: https://github.com/boutier/quagga-merge From the branch babel-merge I copied the babeld directory into FRR and then fixed up everything to compile. Babeld at this point in time when run will more than likely crash and burn in it's interfactions with zebra. I might have messed up the cli, which will need to be looked at extract.pl.in and vtysh.c need to be fixed up. Additionally we probably need to work on DEFUN_NOSH conversion in babeld as well This code comes from: Matthieu Boutier <boutier@irif.fr> Juliusz Chroboczek <jch@irif.fr> Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-02-11quagga: remove babelDaniel Walton
Ticket: CM-9274 Reviewed By: sharpd@cumulusnetworks.com Testing Done: <DETAILED DESCRIPTION (REPLACE)>
2015-11-20Quagga: vrf_id not being set correctlyDonald Sharp
Several routing protocols use the zapi_ipv[4|6] api to talk to zebra. There are some instances where the api.vrf_id was not being set. Since the practice is to declare the api structure on the stack, the data inside is not being set to 0. As such random vrf_id values were being passed to zebrad causing rage and confusion. Ticket: CM-8287 Reviewed-by: CCR-3841 Testing: Test suites no longer crashing and burning Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2012-04-28babeld: merge kernel_zebra.c into kernel.c.Juliusz Chroboczek
In upstream babel, we include different kernel_foo files depending on the platform we compile for. In Quagga, this is not needed, and it avoids tricky autotools issues. (All autotools issues are tricky.) [David: without this commit, build breaks.] From: Juliusz Chroboczek <jch@pps.jussieu.fr> Signed-off-by: David Lamparter <equinox@diac24.net>
2012-03-25babeld: Use quagga_gettime.Juliusz Chroboczek
2012-03-25babeld: Initial import, for Babel routing protocol.Paul Jakma
* Initial import of the Babel routing protocol, ported to Quagga. * LICENCE: Update the original LICENCE file to include all known potentially applicable copyright claims. Ask that any future contributors to babeld/ grant MIT/X11 licence to their work. * *.{c,h}: Add GPL headers, in according with the SFLC guidance on dealing with potentially mixed GPL/other licensed work, at: https://www.softwarefreedom.org/resources/2007/gpl-non-gpl-collaboration.html