summaryrefslogtreecommitdiffstats
path: root/eigrpd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: s/VTY_NEWLINE/VTYNL/gQuentin Young2017-06-291-9/+9
| | | | | | Should be able to fit more vty_out onto one line now Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: use vty_outlnQuentin Young2017-06-295-138/+131
| | | | | | Saves 400 lines Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* Merge pull request #759 from qlyoung/remove-vty-argparsersJafar Al-Gharaibeh2017-06-291-4/+4
|\ | | | | *: remove VTY_GET_*
| * *: remove VTY_GET_*Quentin Young2017-06-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CLI validates input tokens, so there's no need to do it in handler functions anymore. spatch follows ---------------- @getull@ expression v; expression str; @@ <... - VTY_GET_ULL(..., v, str) + v = strtoull (str, NULL, 10) ...> @getul@ expression v; expression str; @@ <... - VTY_GET_ULONG(..., v, str) + v = strtoul (str, NULL, 10) ...> @getintrange@ expression name; expression v; expression str; @@ <... - VTY_GET_INTEGER_RANGE(name, v, str, ...) + v = strtoul (str, NULL, 10) ...> @getint@ expression v; expression str; @@ <... - VTY_GET_INTEGER(..., v, str) + v = strtoul (str, NULL, 10) ...> @getv4@ expression v; expression str; @@ <... - VTY_GET_IPV4_ADDRESS(..., v, str) + inet_aton (str, &v) ...> @getv4pfx@ expression v; expression str; @@ <... - VTY_GET_IPV4_PREFIX(..., v, str) + str2prefix_ipv4 (str, &v) ...> Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | lib/ospf/eigrp: enable ospf and eigrp to use more specific network statementsDon Slice2017-06-281-1/+1
|/ | | | | | | | | | | | | Issue reported that a configuration commonly used on other routing implementations fails in frr. If under ospf, "network 172.16.1.1/32 area 0" or under eigrp, "network 172.16.1.1/32" is entered, the appropriate interfaces are not included in the routing protocol. This was because the code was calling prefix_match, which did not match if the network statement had a longer mask than the interface being matched. This fix takes away that restriction by creating a "lib/prefix_match_network_statement" function which doesn't care about the mask of the interface. Manual testing shows both ospf and eigrp now can be defined with more specific network statements. Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
* *: simplify log message lookupQuentin Young2017-06-213-11/+9
| | | | | | | | | | | | | | | | log.c provides functionality for associating a constant (typically a protocol constant) with a string and finding the string given the constant. However this is highly delicate code that is extremely prone to stack overflows and off-by-one's due to requiring the developer to always remember to update the array size constant and to do so correctly which, as shown by example, is never a good idea.b The original goal of this code was to try to implement lookups in O(1) time without a linear search through the message array. Since this code is used 99% of the time for debugs, it's worth the 5-6 additional cmp's worst case if it means we avoid explitable bugs due to oversights... Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* eigrpd: Fix integer overflow possibilityDonald Sharp2017-06-131-1/+1
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Clean up call into inet_atonDonald Sharp2017-06-131-1/+1
| | | | | | | In the few places where we were not checking the return code for inet_aton, do so. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Merge pull request #624 "Babel"David Lamparter2017-06-131-1/+1
|\ | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * babeld/eigrpd: flip VTY ports & fix rpmDavid Lamparter2017-06-131-1/+1
| | | | | | | | | | | | | | babeld was 2609 previously, and this was still marked in SERVICES. Let's flip it back before we have a release out with it. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | eigrpd: Correctly size the dump dataDonald Sharp2017-06-101-2/+2
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | eigrpd: Use correct memory operationDonald Sharp2017-06-101-1/+1
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | eigrpd: Fix leak of epDonald Sharp2017-06-101-0/+5
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | eigrpd: Cleanup leaked dest_addrDonald Sharp2017-06-101-7/+7
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | eigrpd: Fix use after freeDonald Sharp2017-06-101-2/+7
|/ | | | Signed-off-by: Donald Sharp <sharpd@Cumulusnetworks.com>
* Merge pull request #603 from qlyoung/fix-access-packed-memberDavid Lamparter2017-05-307-32/+32
|\ | | | | *: do not take address of packed member
| * *: do not take address of packed memberQuentin Young2017-05-267-32/+32
| | | | | | | | | | | | May result in alignment errors on certain platforms Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | eigrpd: Fix network statementDonald Sharp2017-05-291-1/+1
|/ | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Merge branch 'frr/pull/567'David Lamparter2017-05-181-2/+4
|\ | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * eigrpd: disambiguate bandwidth commandQuentin Young2017-05-171-2/+4
| | | | | | | | | | | | | | | | eigrpd defines a bandwidth command that takes kilobits instead of megabits which is problematic when installed in the same node as the megabits command since (1-100000) and (1-10000000) are ambiguous Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | Merge pull request #537 from donaldsharp/vrf_stuffDavid Lamparter2017-05-1711-127/+97
|\ \ | |/ |/| Vrf stuff
| * Merge branch 'master' into vrf_stuffDonald Sharp2017-05-1611-125/+142
| |\
| * | *: Consolidate vrf_hooks into vrf_initDonald Sharp2017-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | We only needed to add/change the vrf callbacks when we initialize the vrf subsystem. As such it is not necessary to handle the callbacks in any other way than through the init function. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * | eigrpd: Cleanup a bunch SA warnings.Donald Sharp2017-05-1610-126/+95
| | | | | | | | | | | | | | | | | | | | | 1) Cleanup SA warnings, more to come 2) Cleanup some non debug guarded zlog_info code Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | Merge pull request #532 from opensourcerouting/gpl-headersDonald Sharp2017-05-1737-150/+111
|\ \ \ | |_|/ |/| | *: make consistent & update GPLv2 file headers
| * | *: make consistent & update GPLv2 file headersDavid Lamparter2017-05-1537-150/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The FSF's address changed, and we had a mixture of comment styles for the GPL file header. (The style with * at the beginning won out with 580 to 141 in existing files.) Note: I've intentionally left intact other "variations" of the copyright header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | | eigrpd: Fix arm compile issue with some gcc'sDonald Sharp2017-05-161-1/+1
|/ / | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | eigrpd: Diverse FixesRenato Westphal2017-05-139-95/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Correct the metric calculation as well as the default metrics; * Do not show invalid routes in the "show ip eigrp topology". * Add support to VRFs; * When downloading a neighbor remove the related routes; * Fix bugs in the parser of packages they were creating Invalid default routes; * Add and remove routes in the zebra; * Add command "on router eigrp AS"; * Make "delay" and "bandwitch" commands work as well as Display them in running config; * Add "no" version of several commands; * Fix a serious momory leaks; * Fix segfault when there is no 'successor' route to a Given prefix; * Other minor corrections; Signed-off-by: Renato Westphal <renatowestphal@gmail.com> Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | eigrpd: Some Basic CorrectionsRenato Westphal2017-05-135-33/+27
|/ | | | | | | | * Advertise routes to zebra * Connected routes should not have a nexthop address * Fix segfaut on exit Signed-off-by: Renato Westphal <renatowestphal@gmail.com>
* Merge pull request #495 from donaldsharp/mpls_fixesRenato Westphal2017-05-121-2/+2
|\ | | | | Mpls fixes
| * eigrpd: Fix compilation errors for some versions of gccDaniel Walton2017-05-101-2/+2
| | | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
* | eigrpd: spatch thread_add* calls and macrosQuentin Young2017-05-097-39/+50
|/ | | | | | As described in previous commits Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* eigrpd: Switch u_int64_t -> uint64_tDonald Sharp2017-04-274-9/+9
| | | | | | | Apparently u_int64_t is not available (or we don't pull the right headers in for solaris based systems ). Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Add missing eigrp_fsm.h to 'make dist'Donald Sharp2017-04-271-1/+2
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Save whether or not a interface is passive.Donald Sharp2017-04-171-4/+19
| | | | | | | Save whether or not a interface is passive in EIGRP. More work is needed to actual respect that. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Cleanup cliDonald Sharp2017-04-152-63/+43
| | | | | | | The eigrp cli was using a define that was causing some issues surrounding interface names and detailed information. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Cleanup tab/spacing of the *.c filesDonald Sharp2017-04-0820-3656/+3512
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Only install up to eigrp->max_paths into rib.Donald Sharp2017-04-082-2/+23
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Fix 'router eigrp..' to be DEFUN_NOSHDonald Sharp2017-04-061-6/+6
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Cleanup the mergeDonald Sharp2017-04-067-29/+30
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Fix add and delete of routes into the ribDonald Sharp2017-04-063-69/+44
| | | | | | | | | | | Use the eigrp_topology_successors to give us the list of successors we want to install. Modify route add to send all the nexthops Modify route delete to just delete the route Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Fix massive memory leakDonald Sharp2017-04-063-56/+69
| | | | | | | | | | | | | Each call into eigrp_topology_get_successors would leak the list created. As routes worked their way through the FSM we would leak memory left and right. Modify the eigrp_topology_get_successor to return NULL when there are no SUCCESORS. Clean up some dead code. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Convert FSM states to an enumDonald Sharp2017-04-061-6/+8
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Cleanup long lineDonald Sharp2017-04-061-1/+2
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Cleanup Bit Field handlingDonald Sharp2017-04-062-48/+12
| | | | | | | Cleanup the Bit field handling for whether or not entries are installed or not. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Valgrind complained about not removing entryDonald Sharp2017-04-032-19/+22
| | | | | | We were not removing the pe from the topology list. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Flags is now 32 bit as opposed to 8 bit.Donald Sharp2017-04-031-1/+1
| | | | | | This missalignment caused zebra to go 'Ruh-Roh' Shaggy. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: When deleting interface remove connected routes from topo tableDonald Sharp2017-04-031-0/+11
| | | | | | | | When we are deleting an interface, remove the connected routes associated with that interface from the topo table. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Fix route deleteDonald Sharp2017-04-021-0/+1
| | | | | | Send the correct format of data to zebra on route delete. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Fix non-installation of routes into zebraDonald Sharp2017-03-201-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EIGRP was not installing routes it learned from it's neighbors into the rib. This is probably a hack, but zebra now knows about the routes. robot.cumulusnetworks.com# show ip route Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, P - PIM, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, > - selected route, * - FIB route K>* 0.0.0.0/0 via 10.0.2.2, enp0s3 C>* 10.0.2.0/24 is directly connected, enp0s3 E 192.168.2.0/24 [0/0] via 127.0.0.1, enp0s10 inactive C>* 192.168.2.0/24 is directly connected, enp0s10 E>* 192.168.3.4/32 [0/0] via 192.168.2.144, enp0s10 E>* 192.168.4.5/32 [0/0] via 192.168.2.144, enp0s10 E>* 192.168.4.6/32 [0/0] via 192.168.2.144, enp0s10 C>* 192.168.22.11/32 is directly connected, lo robot.cumulusnetworks.com# show ip route 192.168.4.5 Routing entry for 192.168.4.5/32 Known via "eigrp", distance 0, metric 0, best * 192.168.2.144, via enp0s10 robot.cumulusnetworks.com# Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>