summaryrefslogtreecommitdiff
path: root/eigrpd/eigrp_update.c
AgeCommit message (Collapse)Author
2023-07-25* : include event ptr in event_execute apiMark Stapp
Include an event ptr-to-ptr in the event_execute() api call, like the various schedule api calls. This allows the execute() api to cancel an existing scheduled task if that task is being executed inline. Signed-off-by: Mark Stapp <mjs@labn.net>
2023-06-01eigrpd: dest_addr does not need to be set to NULLDonald Sharp
All paths of the loop set dest_addr at the start of the loop. No need to set it to NULL to immediately set it too something else. 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*: Convert THREAD_XXX macros to EVENT_XXX macrosDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert thread_execute to event_executeDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert thread_add_XXX functions to event_add_XXXDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Rename `struct thread` to `struct event`Donald Sharp
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>
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-02-23*: Change thread->func to return void instead of intDonald Sharp
The int return value is never used. Modify the code base to just return a void instead. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-10-04eigrpd: Ensure better `struct thread *` semanticsDonald Sharp
1) Do not explicitly set the thread pointer to NULL. FRR should only ever use the appropriate THREAD_ON/THREAD_OFF semantics. This is espacially true for the functions we end up calling the thread for. 2) Fix mixup of `struct eigrp_interface` and `struct eigrp` usage of the same thread pointer. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-03-22eigrpd: kill eigrp_memory.h, use MTYPE_STATICDavid Lamparter
Same as previous commit -- convert most DEFINE_MTYPE into the _STATIC variant, and move the remaining non-static ones to appropriate places. Signed-off-by: David Lamparter <equinox@diac24.net>
2021-01-12eigrpd: Introduce eigrp_metric.[ch] and eigrp_types.hDonnie Savage
Add these file and introduce some new fundamental types Signed-off-by: Donald Sharp <sharpd@nvidia.com> Signed-off-by: Donnie Savage <diivious@hotmail.com>
2021-01-12eigrpd: Rename nexthop_entry and prefix_entry to better namesDonnie Savage
Rename struct eigrp_nexthop_entry to struct eigrp_route_descriptor Rename struct eigrp_prefix_entry to struct eigrp_prefix_descriptor Fix all the associated function names as well. Signed-off-by: Donald Sharp <sharpd@nvidia.com> Signed-off-by: Donnie SAvage <diivious@hotmail.com>
2020-10-22Merge pull request #7343 from ton31337/fix/prefix2str_to_pFXDonald Sharp
:* Convert prefix2str to %pFX
2020-10-22:* Convert prefix2str to %pFXDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-10-21eigrpd: Replace inet_ntoa with %pI4Donald Sharp
Search and destroy the inet_ntoa usage in eigrp Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2019-08-06eigrpd: Update eigrp_topology.c to not use VRF_DEFAULTDonald Sharp
Push out the pass in of struct eigrp to all functions in eigrp_topology.c so we do not lookup the eigrp pointer. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-08-06eigrpd: Use the eigrp->vrf_id where we can immediately transformDonald Sharp
For those places where we can immediately transform the usage of VRF_DEFAULT to eigrp->vrf_id do so. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-10-02*: list_delete_and_null() -> list_delete()David Lamparter
Signed-off-by: David Lamparter <equinox@diac24.net>
2018-06-19eigrpd, lib, tests, vtysh: security (cppcheck)paco
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-05-04eigrpd: Use EIGRP_PACKET_MTU(mtu) macroPiotr Jurkiewicz
Signed-off-by: Piotr Jurkiewicz <piotr.jerzy.jurkiewicz@gmail.com>
2018-05-04eigrpd: Correctly calculate EIGRP packet MTUPiotr Jurkiewicz
Someone forgot that EIGRP packets are encapsulated in IP. Signed-off-by: Piotr Jurkiewicz <piotr.jerzy.jurkiewicz@gmail.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-03-06*: conform with COMMUNITY.md formatting rules, via 'make indent'Lou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2017-11-02eigrpd: Create consts for TLV sizeDonald Sharp
1) Create #defines for TLV SIZE and use them 2) Speed up prefix length by using a switch statement Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-24eigrpd: Convert topology list to a tableDonald Sharp
The EIGRP topology list is an extremely inefficient way to store data about the known routes. Convert to using a table. Signed-off-by: Donald Sharp <sharpd@cumulusnetorks.com>
2017-10-05*: Convert list_delete(struct list *) to ** to allow nullingDonald Sharp
Convert the list_delete(struct list *) function to use struct list **. This is to allow the list pointer to be nulled. I keep running into uses of this list_delete function where we forget to set the returned pointer to NULL and attempt to use it and then experience a crash, usually after the developer has long since left the building. Let's make the api explicit in it setting the list pointer to null. Cynical Prediction: This code will expose a attempt to use the NULL'ed list pointer in some obscure bit of code. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-02eigrpd: Remove ei mapping to connected routesDonald Sharp
We need one struct eigrp_interface per ifp structure not a ifp->info structure with a ei per connected. Some minor code cleanup as well with macros and their weird usage. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-09-05Merge pull request #1051 from donaldsharp/plistsDavid Lamparter
Refactor Access and Prefix Lists application
2017-08-26eigrpd: eigrp_neighbor_entry to eigrp_nexthop_entryDonald Sharp
The struct 'eigrp_neighbor_entry' really represents a nexthop for a prefix. Rename the structure to better represent what we are representing. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-26eigrpd: Refactor access/prefix list applicationsDonald Sharp
There was allot of code cut-n-pasting to apply the prefix/access lists. Refactor to simplify code. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-26eigrpd: Make code a bit easier to read in eigrp_update.cDonald Sharp
Lots of multiple pointer dereferences that made the code lines really long, so let's properly setup the pointers in a way that makes it easier to read. No need to lookup the eigrp pointer because we already have it, so let's use this( this will be good for the future too when we have VRF's). Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-26eigrpd: Fix access/prefix list handling in updatesDonald Sharp
Use eigrp pointer passed in instead of looking it up, additionally we should actually look at the correct access list. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-24eigrpd: Cleanup various SA IssuesDonald Sharp
1) Handle key value not found on interface 2) Handle various NULL pointer possibilities 3) Fix possible integer overflow 4) Fix memory leak 5) Check return codes on sscanf Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-24eigrpd: Refactor eigrp_topoloy_table_lookup_ipv4Donald Sharp
Allow eigrp_topology_table_lookup_ipv4 to use 'struct prefix' Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-24eigrpd: Convert pe->destination_ipv4 to pe->destinationDonald Sharp
Convert the destination_ipv4 to a struct prefix and just call it destination. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-24eigrpd: No need to create TLV typeDonald Sharp
There is no need to create a TLV type to pass in for the FSM message. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-24eigrpd: Remove union from FSM msgDonald Sharp
Remove the union of passing the TLV and just pass the metric in. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-24eigrpd: make fsm msg data_type an enumDonald Sharp
We need to eventually be able to handle multiple data types to figure out if the distance is better worse. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-24eigrpd: Refactor FSM callingDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-24eigrpd: Fix memory leak in FSMDonald Sharp
The FSM was never freeing the msg. Since we do not have a special queue for it, just don't allocate the memory. In the future we can put this back. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-24eigrpd: Start split-horizonDonald Sharp
EIGRP was not handling split-horizon. This code starts down the path of properly considering it. There still exists situations where we are not properly handling it though. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-19eigrpd: fix crash when external route is receivedDonnie Savage (dsavage)
When an external route is received, eigrpd will crash. For now, quietly discard the TLV. Work must be done to handle tlv processing and changes needed to FSM so it understands an external should not be chooses if an internal exist. Signed-off-by: Donnie Savage <diivious@hotmail.com>
2017-08-19eigrpd: Pass in actual used parameter to header creationDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-19eigrpd: Allow eigrp_update_send to recognize a full packetDonald Sharp
Modify code to allow the eigrp_update_send function to recognize that we have a full packet and to do the right thing from there. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-19eigrpd: Fix memory leak in eigrp_updateDonald Sharp
When we send packets to a nbr, make a duplicate copy as that each packet sent is assumed to be a complete to itself. Also clean up indentation in loop over figuring out what to send. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-18eigrpd: When generating packets only put one on send queue at a timeDonald Sharp
When we generate update packets to go to our neighbor, Only put one packet at a time on the send queue. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-17eigrpd: and More Debugging CleanupDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-17eigrpd: Cleanup some more debugsDonald Sharp
Properly place a few more debugs. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>