summaryrefslogtreecommitdiffstats
path: root/eigrpd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #2491 from pacovn/cppcheck_no_effectRuss White2018-06-191-2/+0
|\ | | | | eigrpd, isisd, lib, ospfd: no effect (cppcheck)
| * eigrpd, isisd, lib, ospfd: no effect (cppcheck)paco2018-06-191-2/+0
| | | | | | | | | | | | Assignment of function parameter has no effect outside the function. Signed-off-by: F. Aragon <paco@voltanet.io>
* | eigrpd, lib, tests, vtysh: security (cppcheck)paco2018-06-191-1/+0
|/ | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* Merge pull request #2484 from pacovn/cppcheck_unused_varsDonald Sharp2018-06-182-7/+4
|\ | | | | eigrpd, lib: unused vars (cppcheck)
| * eigrpd, lib, vtysh: unused vars (cppcheck)paco2018-06-182-7/+4
| | | | | | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* | babeld, eigrpd, ospfd: unsigned negative checkpaco2018-06-181-1/+1
|/ | | | | | After Cppcheck 1.72 feedback Signed-off-by: F. Aragon <paco@voltanet.io>
* eigrpd: null return value check (Coverity 1455338)paco2018-06-121-0/+1
| | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* Merge pull request #2169 from piotrjurkiewicz/eigrp_feasibilityDonald Sharp2018-05-041-11/+18
|\ | | | | eigrpd: Consider only feasible successors as successors
| * eigrpd: Consider only feasible successors as successorsPiotr Jurkiewicz2018-05-041-11/+18
| | | | | | | | | | | | | | Meeting the feasibility condition is required also for routes meeting the variance condition. Signed-off-by: Piotr Jurkiewicz <piotr.jerzy.jurkiewicz@gmail.com>
* | eigrpd: Use EIGRP_PACKET_MTU(mtu) macroPiotr Jurkiewicz2018-05-048-10/+13
| | | | | | | | Signed-off-by: Piotr Jurkiewicz <piotr.jerzy.jurkiewicz@gmail.com>
* | eigrpd: Correctly calculate EIGRP packet MTUPiotr Jurkiewicz2018-05-047-17/+18
|/ | | | | | Someone forgot that EIGRP packets are encapsulated in IP. Signed-off-by: Piotr Jurkiewicz <piotr.jerzy.jurkiewicz@gmail.com>
* eigrpd: remove unnecessary assignmentQuentin Young2018-04-171-1/+1
| | | | | | Plot thickens, EIGRP SNMP code was copied from ospfd Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: use C99 standard fixed-width integer typesQuentin Young2018-03-2722-323/+325
| | | | | | | | | | | | | | | | | | | | | | 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>
* *: conform with COMMUNITY.md formatting rules, via 'make indent'Lou Berger2018-03-0620-222/+186
| | | | Signed-off-by: Lou Berger <lberger@labn.net>
* *: Modify notify_owner to route_notify_ownerDonald Sharp2018-02-231-3/+3
| | | | | | | | In the future we are going to have a rule_notify_owner so make the distinction between the two types of notification clearer. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Add tableid the route entry was sent toDonald Sharp2018-02-231-1/+2
| | | | | | | Add for the southbound pass back the route entries tableid used for installation. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Track vrfs per nexthop not per route entryDonald Sharp2018-02-091-2/+1
| | | | | | | Track the vfrs on a per nexthop basis instead of on a per route entry basis. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Send/receive the nexthop vrf_idDonald Sharp2018-01-121-0/+2
| | | | | | | Modify the code to send and receive to/from zebra the nexthops vrf_id. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Fixup some SA issuesDonald Sharp2017-12-111-1/+3
| | | | | | | | | 1) strlen(buf) on an uninted value is the wrong thing to do we should be getting sizeof(buf) 2) tlv is not freed in this error case, so let's free it up. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: don't use deprecated stream.h macrosQuentin Young2017-12-011-2/+2
| | | | | | | Some of the deprecated stream.h macros see such little use that we may as well just remove them and use the non-deprecated macros. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* eigrpd: Start conversion to use route install failure callbackDonald Sharp2017-11-271-1/+16
| | | | | | | | EIGRP must not advertise routes that have failed to install. This commit turns on the notification for EIGRP. We still need to start handling this correctly. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Make zapi route install Notifications optionalDonald Sharp2017-11-271-1/+1
| | | | | | | | | | | Allow the higher level protocol to specify if it would like to receive notifications about it's routes that it has installed. I've purposely made it part of zclient_new_notify because we need to track the routes on a per daemon basis only. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Allow query send to send more than 1 packetDonald Sharp2017-11-021-29/+72
| | | | | | | | When we send a query if we have more queries than we can fit in one packet, allow the packet to be broken up into multiple packets to be sent to our neighbor. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Create consts for TLV sizeDonald Sharp2017-11-023-20/+59
| | | | | | | 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>
* eigrpd: When writing packet don't crash in some casesDonald Sharp2017-10-292-5/+15
| | | | | | | | | When we are writing a packet if we have gotten ourselves into a bad situation, note it and move on. Hopefully dumping enough information so that we can find the offending reason. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Fix crash in reply receive packet.Donald Sharp2017-10-291-42/+49
| | | | | | | | When we receive a reply for a prefix we no longer have we should note the issue and move on instead of crashing eigrp. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Query Send is not incrementing the sequence numberDonald Sharp2017-10-291-7/+9
| | | | | | | When we send a query make sure we increment the query sequence number. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: On shutdown, delete list after we've cleared prefixesDonald Sharp2017-10-291-2/+3
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Fix an issue found with metric changeDonald Sharp2017-10-292-4/+25
| | | | | | | | | | | A past commit modified the change value to an enum but did not bother to fix all the places where change was used. Fix this. Additionally add some more output to the fsm prefix string about the change. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Add ability to show packet type in logDonald Sharp2017-10-291-2/+28
| | | | | | | Allow us to examine the packet type that caused us to change state. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Create enum for states and string name for displayDonald Sharp2017-10-292-12/+61
| | | | | | | Create an enum for the different states and create a string name display handler. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Create a function to return a string of prefix stateDonald Sharp2017-10-291-3/+21
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: fix coverity warnings - error handling issuesRenato Westphal2017-10-241-2/+2
| | | | | | | | | | | Ignore the return value of some functions in the places we know they can't fail, and other small fixes. Regarding the change in bgpd/rfapi/rfapi_rib.c, asserting that rfapiRaddr2Qprefix() didn't fail is the common idiom inside the rfapi code. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: add missing \n in some help stringsRenato Westphal2017-10-241-3/+2
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* eigrpd: Convert topology list to a tableDonald Sharp2017-10-246-119/+150
| | | | | | | | 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>
* *: Modify zclient_init to require privs dataDonald Sharp2017-10-241-1/+1
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Make struct zebra_privs_t availableDonald Sharp2017-10-242-2/+1
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: use the FOR_ALL_INTERFACES abstraction from babeldRenato Westphal2017-10-104-4/+4
| | | | | | | | | | This improves code readability and also future-proofs our codebase against new changes in the data structure used to store interfaces. The FOR_ALL_INTERFACES_ADDRESSES macro was also moved to lib/ but for now only babeld is using it. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: introduce new rb-tree to optimize interface lookup by ifindexRenato Westphal2017-10-101-0/+1
| | | | | | | | | | | | | | | | Performance tests showed that, when running on a system with a large number of interfaces, some daemons would spend a considerable amount of time in the if_lookup_by_index() function. Introduce a new rb-tree to solve this problem. With this change, we need to use the if_set_index() function whenever we want to change the ifindex of an interface. This is necessary to ensure that the 'ifaces_by_index' rb-tree is updated accordingly. The return value of all insert/remove operations in the interface rb-trees is checked to ensure that an error is logged if a corruption is detected. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: use rb-trees to store interfaces instead of sorted linked-listsRenato Westphal2017-10-104-8/+8
| | | | | | | | | | | This is an important optimization for users running FRR on systems with a large number of interfaces (e.g. thousands of tunnels). Red-black trees scale much better than sorted linked-lists and also store the elements in an ordered way (contrary to hash tables). This is a big patch but the interesting bits are all in lib/if.[ch]. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* lib: nuke the if_*_by_name_len() functionsRenato Westphal2017-10-101-2/+1
| | | | | | | Make use of strnlen() and strlcpy() so we can get rid of these convoluted if_*_by_name_len() functions. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* eigrpd: fix clang warningVincent JARDIN2017-10-091-0/+1
| | | | | | | | ei shall never be NULL once we do the lookup. If it is NULL bad things could happen. For instance ei->t_distribute may not be a valid reference. Signed-off-by: Vincent Jardin <vincent.jardin@6wind.com>
* eigrpd: fix clang warningVincent JARDIN2017-10-091-1/+1
| | | | | | | nbr cannot be NULL. Doing such test does confuse clang since we do not have execution case if nbr == NULL. Signed-off-by: Vincent Jardin <vincent.jardin@6wind.com>
* eirgpd: fix clang warningVincent JARDIN2017-10-081-4/+1
| | | | | | opcode is not used. Signed-off-by: Vincent Jardin <vincent.jardin@6wind.com>
* *: Convert list_free usage to list_deleteDonald Sharp2017-10-051-6/+4
| | | | | | | | | | list_free is occassionally being used to delete the list and accidently not deleting all the nodes. We keep running across this usage pattern. Let's remove the temptation and only allow list_delete to handle list deletion. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Convert list_delete(struct list *) to ** to allow nullingDonald Sharp2017-10-056-18/+18
| | | | | | | | | | | | | | | | | | | 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>
* eigrpd: Remove unnecessary macro definitionsDonald Sharp2017-10-031-17/+1
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Remove ei mapping to connected routesDonald Sharp2017-10-0315-452/+276
| | | | | | | | | | 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>
* eigrpd: Start fixing eigrp_interfaceDonald Sharp2017-10-033-37/+33
| | | | | | | | | | | | | | | The EIGRP interface handling code created 2 levels of interface information, the ei( created per *connected* address?????) and the ifp->info pointer. Start the combination of pushing these together and cleaning up the weirdness that is these two data structures. This commit probably breaks eigrp's handling of interfaces. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Follow other protocol leads and exit when told toDonald Sharp2017-09-251-0/+2
| | | | | | | EIGRP was continuing to run after being told to exit. Fixes:#1224 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>