summaryrefslogtreecommitdiffstats
path: root/eigrpd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* eigrpd: Fix SA issue with setting but not usingDonald Sharp2019-09-041-1/+1
| | | | | | | | We assign a value to the eigrp data structure and then immediately overwrite it in the for loop. No need to do a eigrp_lookup. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: frr_elevate_privs -> frr_with_privsDavid Lamparter2019-09-031-1/+1
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Merge pull request #4888 from donaldsharp/rmap_cleanupDonatas Abraitis2019-09-031-4/+22
|\ | | | | Rmap cleanup
| * *: Convert some route map functions to return the enumDonald Sharp2019-09-031-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | Conver these functions: route_map_add_match route_map_delete_match route_map_add_set route_map_delete_set To return the `enum rmap_compile_rets` and ensure all functions that use this code handle all the enumerated possible returns. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | eigrpd: When iterating over all eigrp instances, narrow to correct vrfDonald Sharp2019-08-071-1/+4
| | | | | | | | | | | | | | When iterating over all eigrp instances, narrow to the correct vrf that we are working on. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | eigrpd: Convert cli to be able to use [vrf NAME]Donald Sharp2019-08-071-62/+60
| | | | | | | | | | | | | | Modify the cli to allow us to specify the [vrf NAME] and also get rid of the usages of VRF_DEFAULT that we can. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | eigrpd: Convert eigrp_packet.c to not use VRF_DEFAULTDonald Sharp2019-08-071-8/+11
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | eigrpd: Convert eigrp_network.c to not use VRF_DEFAULTDonald Sharp2019-08-071-1/+1
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | eigrpd: Update eigrp_filter.c to use VRF_DEFAULTDonald Sharp2019-08-072-11/+11
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | eigrpd: Convert eigrp_hello.c to not use VRF_DEFAULTDonald Sharp2019-08-071-16/+5
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | eigrpd: Convert eigrp_neighor.c to not use VRF_DEFAULTDonald Sharp2019-08-073-37/+27
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | eigrpd: Remove VRF_DEFAULT from eigrp_fsm.cDonald Sharp2019-08-071-3/+1
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | eigrpd: Update eigrp_topology.c to not use VRF_DEFAULTDonald Sharp2019-08-076-57/+61
| | | | | | | | | | | | | | 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>
* | eigrpd: Convert eigrp_zebra.c to use appropriate vrf_idDonald Sharp2019-08-073-24/+29
| | | | | | | | | | | | | | Use the appropriate vrf_id in eigrp_zebra based off of the struct eigrp *eigrp. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | eigrpd: Add `router eigrp AS [vrf NAME]` and various stuffDonald Sharp2019-08-0712-52/+63
| | | | | | | | | | | | | | Add the ability to parse `router eigrp AS [vrf NAME]` and modify eigrp_lookup to actually handle a vrf_id for us. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | eigrpd: Create a socket per vrf for communicationDonald Sharp2019-08-074-7/+9
| | | | | | | | | | | | | | Setup EIGRP to use a socket per vrf for communication amongst it's peers. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | eigrpd: Add various vrf handling functionsDonald Sharp2019-08-074-0/+77
| | | | | | | | | | | | Basic enable/disable/add/delete vrf handling functions. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | eigrpd: Use the eigrp->vrf_id where we can immediately transformDonald Sharp2019-08-078-28/+32
| | | | | | | | | | | | | | 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>
* | eigrpd: Add vrf_id to `struct eigrp`Donald Sharp2019-08-074-9/+13
|/ | | | | | Initial setup of adding a vrf_id to the `struct eigrp`. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: implement configuration reloadRafael Zalamena2019-08-031-0/+6
| | | | | | Reload configuration on SIGHUP using the northbound. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* eigrpd: migrate old CLI to northboundRafael Zalamena2019-08-037-1073/+2563
| | | | | | | | Move all configuration commands to the new CLI code (`eigrp_cli.c`), implement the northbound and do all the necessary wiring to get it working. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* lib: Introducing a 3rd state for route-map match cmd: RMAP_NOOPLakshman Krishnamoorthy2019-07-221-28/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introducing a 3rd state for route_map_apply library function: RMAP_NOOP Traditionally route map MATCH rule apis were designed to return a binary response, consisting of either RMAP_MATCH or RMAP_NOMATCH. (Route-map SET rule apis return RMAP_OKAY or RMAP_ERROR). Depending on this response, the following statemachine decided the course of action: State1: If match cmd returns RMAP_MATCH then, keep existing behaviour. If routemap type is PERMIT, execute set cmds or call cmds if applicable, otherwise PERMIT! Else If routemap type is DENY, we DENYMATCH right away State2: If match cmd returns RMAP_NOMATCH, continue on to next route-map. If there are no other rules or if all the rules return RMAP_NOMATCH, return DENYMATCH We require a 3rd state because of the following situation: The issue - what if, the rule api needs to abort or ignore a rule?: "match evpn vni xx" route-map filter can be applied to incoming routes regardless of whether the tunnel type is vxlan or mpls. This rule should be N/A for mpls based evpn route, but applicable to only vxlan based evpn route. Also, this rule should be applicable for routes with VNI label only, and not for routes without labels. For example, type 3 and type 4 EVPN routes do not have labels, so, this match cmd should let them through. Today, the filter produces either a match or nomatch response regardless of whether it is mpls/vxlan, resulting in either permitting or denying the route.. So an mpls evpn route may get filtered out incorrectly. Eg: "route-map RM1 permit 10 ; match evpn vni 20" or "route-map RM2 deny 20 ; match vni 20" With the introduction of the 3rd state, we can abort this rule check safely. How? The rules api can now return RMAP_NOOP to indicate that it encountered an invalid check, and needs to abort just that rule, but continue with other rules. As a result we have a 3rd state: State3: If match cmd returned RMAP_NOOP Then, proceed to other route-map, otherwise if there are no more rules or if all the rules return RMAP_NOOP, then, return RMAP_PERMITMATCH. Signed-off-by: Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
* Merge pull request #4619 from opensourcerouting/eigrpd-yangRuss White2019-07-091-2/+2
|\ | | | | yang: import EIGRP YANG model
| * yang/eigrp: change active-time timer to secondsRafael Zalamena2019-07-091-2/+2
| | | | | | | | | | | | Based on feedback. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* | *: s/TRUE/true/, s/FALSE/false/Quentin Young2019-07-011-2/+0
|/ | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* Revert "Ospf missing interface handling 2"Donald Sharp2019-06-243-5/+3
|
* Merge pull request #3775 from pguibert6WIND/ospf_missing_interface_handling_2Donald Sharp2019-06-223-3/+5
|\ | | | | Ospf missing interface handling 2
| * *: change if_lookup_by_name() api with vrfPhilippe Guibert2019-06-123-3/+5
| | | | | | | | | | | | | | | | | | | | the vrf_id parameter is replaced by struct vrf * parameter. this impacts most of the daemons that look for an interface based on the name and the vrf identifier. Also, it fixes 2 lookup calls in zebra and sharpd, where the vrf_id was ignored until now. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* | eigrpd: Fix endianness issue in packetsPawel Dembicki2019-06-142-32/+15
|/ | | | | | | | | | | | Net prefixes in eigrp update packets is created and read without check host endianness. This patch use ntohl and htonl to read and write ip prefix from and to packet. Tested: x86, powerpc Signed-off-by: Pawel Dembicki <p.dembicki@wb.com.pl>
* eigrpd: fix invalid command definitionsIgor Ryzhov2019-06-072-14/+14
| | | | Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* Revert of PR 4078 and PR 4315Lakshman Krishnamoorthy2019-06-041-26/+28
| | | | Signed-off-by: Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
* lib: Changes made to dependencies of a r-map do not take effect.Naveen Thanikachalam2019-05-311-1/+1
| | | | | | | | | | | Say, more than one sequence of a route-map uses the same named entity in its match clause. After that entity is removed from any one of the route-map sequences, any further changes made to that entity doesn't dynamically take effect. A reference counter, that allows the named entity to keep a count of the route-maps dependent on it, has been introduced to address this issue. Signed-off-by: NaveenThanikachalam <nthanikachal@vmware.com>
* lib: Introducing a 3rd state for route-map match cmd: RMAP_NOOPLakshman Krishnamoorthy2019-05-301-28/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introducing a 3rd state for route_map_apply library function: RMAP_NOOP Traditionally route map MATCH rule apis were designed to return a binary response, consisting of either RMAP_MATCH or RMAP_NOMATCH. (Route-map SET rule apis return RMAP_OKAY or RMAP_ERROR). Depending on this response, the following statemachine decided the course of action: Action: Apply route-map match and return the result (RMAP_MATCH/RMAP_NOMATCH) State1: Receveived RMAP_MATCH THEN: If Routemap type is PERMIT, execute other rules if applicable, otherwise we PERMIT! Else: If Routemap type is DENY, we DENYMATCH right away State2: Received RMAP_NOMATCH, continue on to next route-map, otherwise, return DENYMATCH by default if nothing matched. With reference to PR 4078 (https://github.com/FRRouting/frr/pull/4078), we require a 3rd state because of the following situation: The issue - what if, the rule api needs to abort or ignore a rule?: "match evpn vni xx" route-map filter can be applied to incoming routes regardless of whether the tunnel type is vxlan or mpls. This rule should be N/A for mpls based evpn route, but applicable to only vxlan based evpn route. Today, the filter produces either a match or nomatch response regardless of whether it is mpls/vxlan, resulting in either permitting or denying the route.. So an mpls evpn route may get filtered out incorrectly. Eg: "route-map RM1 permit 10 ; match evpn vni 20" or "route-map RM2 deny 20 ; match vni 20" With the introduction of the 3rd state, we can abort this rule check safely. How? The rules api can now return RMAP_NOOP (or another enum) to indicate that it encountered an invalid check, and needs to abort just that rule, but continue with other rules. Question: Do we repurpose an existing enum RMAP_OKAY or RMAP_ERROR as the 3rd state (or create a new enum like RMAP_NOOP)? RMAP_OKAY and RMAP_ERROR are used to return the result of set cmd. We chose to go with RMAP_NOOP (but open to ideas), as a way to bypass the rmap filter As a result we have a 3rd state: State3: Received RMAP_NOOP Then, proceed to other route-map, otherwise return RMAP_PERMITMATCH by default. Signed-off-by:Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
* *: use ZAPI_CALLBACK_ARGS macro for zapi handlersQuentin Young2019-05-031-35/+20
| | | | | | | | | | | | This macro: - Marks ZAPI callbacks for readability - Standardizes argument names - Makes it simple to add ZAPI arguments in the future - Ensures proper types - Looks better - Shortens function declarations Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: setting the socket send/recv buffer sizes doesn't need elevated privsRenato Westphal2019-04-081-11/+9
| | | | | | The less code running under elevated privileges the better. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: remove trailing newlines from zlog messagesQuentin Young2019-03-141-4/+4
| | | | | | Zlog puts its own newlines on, and doing this makes logs look nasty. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* Merge pull request #3869 from qlyoung/cocci-fixesDavid Lamparter2019-03-063-7/+3
|\ | | | | Assorted Coccinelle fixes
| * *: remove unnecessary semicolon from switchesQuentin Young2019-02-261-1/+1
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
| * *: remove useless return variablesQuentin Young2019-02-262-6/+2
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | eigrp, rip, ripng, lib: unlink if_rmap from vrfPhilippe Guibert2019-02-191-1/+1
| | | | | | | | | | | | | | | | | | an interface rmap context can be created from a custom name string, instead of a vrf. This ability permits to handle several instances of interface route map in the same vrf. The naming convention will be transparent on what the name is for in the daemon code. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* | lib, rip, ripng, eigrp: rework if_rmap contextPhilippe Guibert2019-02-192-4/+8
|/ | | | | | | | | | so as to handle ri/ripng/eigrp multiple instances, the need is to encapsulate if_rmap hash table into a container context self to each instance. This work then reviews the if_rmap api, mainly by adding a if_rmap_ctx context, that is passed for each exchange between library and the daemon. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* eigrpd: Do not redelete the eigrp interface data structureDonald Sharp2019-02-111-1/+2
| | | | | | | | | | | | | On interface down do not delete the eigrp interface data structure. Ensure that the address that we have setup the eigrp data structure ontop of is what we are deleting. Additionally add a test to show that this is no-longer crashing eigrp. Future commits will further modify this test to actually ensure that the eigrp topo is updated correctly and the rib has the correct data. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Correctly handle the ref-count in a couple of spotsDonald Sharp2019-02-112-1/+2
| | | | | | | The ref count for the eigrp topology table was incorrect in a couple of spots. Let's clean it up. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrp: Make the eigrp_interface have a prefix instead of a *prefixDonald Sharp2019-02-116-17/+17
| | | | | | | | | The prefix data structure was being freed yet still needed in the future and it's a fundamental part of the eigrp_interface data structure let's keep it there instead of having it be deleted and then not. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Remove unnecessary test for pointerDonald Sharp2019-02-111-1/+1
| | | | | | If we are inside the for loop then eigrp *must* be valid. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Don't crash on a `no network A.B.C.D/M`Donald Sharp2019-02-041-11/+7
| | | | | | | | | This command was crashing. This fixes the crash we are still not behaving quite correctly on handling routes we have learned from those peers covered by the network statement. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Allow A.B.C.D and A.B.C.D/M for topology specificationDonald Sharp2019-02-031-15/+55
| | | | | | | | Allow eigrp to display interesting topo information to the end user. Fixes: #3705 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Abstract display of an individual entryDonald Sharp2019-02-031-17/+25
| | | | | | | Abstract the individual display of a entry in the eigrp topology table. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Modify from int to boolean for displayDonald Sharp2019-02-033-6/+7
| | | | | | Track based upon boolean instead of an int Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* eigrpd: Modify code to pass down metric to zebraDonald Sharp2019-02-033-4/+9
| | | | | | | | Modify EIGRP code to pass its used metric down to zebra. Additionally update topotests to pass with these changes. Fixes: #3703 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>