summaryrefslogtreecommitdiffstats
path: root/zebra (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #2994 from opensourcerouting/sa-warningsDonald Sharp2018-09-091-0/+1
|\ | | | | fix remaining SA warnings
| * *: fix clang-6 SA warningsDavid Lamparter2018-09-081-0/+1
| | | | | | | | | | | | | | I don't see these in CI, but my local clang-6 does emit warnings for these. Signed-off-by: David Lamparter <equinox@diac24.net>
* | Merge pull request #2875 from opensourcerouting/fabricdDonald Sharp2018-09-083-4/+15
|\ \ | |/ |/| OpenFabric support
| * zebra: add a ZEBRA_FLAG_ONLINK so that routes bypass the is-unnumbered checkChristian Franke2018-09-051-3/+7
| | | | | | | | | | | | | | | | | | For OpenFabric operation, we need to be able to install routes via interfaces without any IPv4 addresses configured. Introduce a flag ZEBRA_FLAG_ONLINK which upper protocols can set on a route they send towards zebra, to force the nexthops to be considered onlink. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
| * zebra: add RTPROT_FABRICD route type 197Christian Franke2018-09-052-1/+8
| | | | | | | | | | | | Add an iproute2 route type for fabricd Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* | Merge pull request #2988 from donaldsharp/more_debugsDavid Lamparter2018-09-081-7/+48
|\ \ | | | | | | zebra: Modify nexthop checks to report inactive a bit more
| * | zebra: Modify nexthop checks to report inactive a bit moreDonald Sharp2018-09-071-7/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Debugging inactive nexthops in zebra can be quite difficult and non-obvious what has gone wrong. Add detailed rib debugs for the cases where we decide that a nexthop is inactive so that we can more easily debug a reason for the failure. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | Merge pull request #2981 from donaldsharp/v6_vxlan_bugDavid Lamparter2018-09-081-0/+3
|\ \ \ | |/ / |/| | zebra: Fix RB-Tree storage comparison function for v6
| * | zebra: Fix RB-Tree storage comparison function for v6Donald Sharp2018-09-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RB-Tree used to store rmac information was not properly handling the v6 address family. Modify the code to allow this handling. Cleans up this error message: zebra[2231]: host_rb_entry_compare: Unexpected family type: 10 That is being seen, This fixes some connectivity issues being seen. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | zebra: Fix _route_entry_dump to handle nexthop family as appropriateDonald Sharp2018-09-061-4/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The _route_entry_dump function was not handling the nexthop as passed in from an upper level protocol appropriate and as such not displaying the v4/v6 nexthop right in the case where we have both going. Additionally dump the nexthop vrf as well. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | Merge pull request #2873 from vivek-cumulus/evpn-extended-mobilityRuss White2018-09-062-608/+807
|\ \ \ | |/ / |/| | EVPN extended mobility support
| * | zebra: Fix warningsvivek2018-08-281-3/+2
| | | | | | | | | | | | Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
| * | Merge remote-tracking branch 'upstream/master' into evpn-extended-mobilityvivek2018-08-2817-1029/+320
| |\ \ | | | | | | | | | | | | | | | | Conflicts: zebra/zebra_vxlan.c
| * | | bgpd, zebra: Fix warningsvivek2018-08-211-11/+12
| | | | | | | | | | | | | | | | Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
| * | | zebra: Enhancements to EVPN operational commandsvivek2018-08-201-109/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enhance the EVPN MAC and Neighbor cache display to show additional information such as the mobility sequence numbers and the state. Ensure that the neighbor state is set in a couple of places so that the display is correct. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
| * | | bgpd, zebra: EVPN extended mobility supportvivek2018-08-202-488/+682
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement procedures similar to what is specified in https://tools.ietf.org/html/draft-malhotra-bess-evpn-irb-extended-mobility in order to support extended mobility scenarios in EVPN. These are scenarios where a host/VM move results in a different (MAC,IP) binding from earlier. For example, a host with an address assignment (IP1, MAC1) moves behind a different PE (VTEP) and has an address assignment of (IP1, MAC2) or a host with an address assignment (IP5, MAC5) has a different assignment of (IP6, MAC5) after the move. Note that while these are described as "move" scenarios, they also cover the situation when a VM is shut down and a new VM is spun up at a different location that reuses the IP address or MAC address of the earlier instance, but not both. Yet another scenario is a MAC change for an attached host/VM i.e., when the MAC of an attached host changes from MAC1 to MAC2. This is necessary because there may already be a non-zero sequence number associated with MAC2. Also, even though (IP, MAC1) is withdrawn before (IP, MAC2) is advertised, they may propagate through the network differently. The procedures continue to rely on the MAC mobility extended community specified in RFC 7432 and already supported by the implementation, but augment it with a inheritance mechanism that understands the relationship of the host MACIP (ARP/neighbor table entry) to the underlying MAC (MAC forwarding database entry). In FRR, this relationship is understood by the zebra component which doubles as the "host mobility manager", so the MAC mobility sequence numbers are determined through interaction between bgpd and zebra. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
| * | | zebra: Update neighbor state correctly upon movevivek2018-08-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a host moves and is locally reachable, if the local neighbor event is received before the local MAC event, flag the neighbor as inactive just as would happen in the case of a new host. This ensures that the MACIP route will get originated as soon as the local MAC event is got. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
* | | | bgpd, ospfd, pimd, zebra: Convert more use_json locations to boolDon Slice2018-09-044-5/+5
| |_|/ |/| | | | | | | | Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
* | | Merge pull request #2945 from dslicenc/bgp-ospf-jsonDavid Lamparter2018-09-015-66/+60
|\ \ \ | | | | | | | | bgpd/ospfd: make bgp and ospf json response a bit more consistent
| * | | bgpd/ospfd: make bgp and ospf json response a bit more consistentDon Slice2018-08-305-66/+60
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem reported that some bgp and ospf json commands did not return any json output at all if the bgp/ospf instance did not exist. Additionally, some bgp and ospf json commands did not return any json output if the instance existed but no neighbors were defined. This fix makes these commands more consistent in returning empty braces for json output and issue a message if not using json output. Additionally, made the flag "use_json" a bool to make it consistent since previously, it had been defined as an int, char, u_char, and bool at various places. Ticket: CM-21040 Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
* | | Merge pull request #2923 from pguibert6WIND/fix_veth_namespaceDavid Lamparter2018-08-313-6/+20
|\ \ \ | | | | | | | | zebra: when veth link is used across vrf, the link may not be good
| * | | zebra: do not update link if interface is veth interfacePhilippe Guibert2018-08-293-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | when interface is a virtual ethernet interface, then there is no need to update link pointer of interface. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * | | zebra: when veth link is used across vrf, the link may not be goodPhilippe Guibert2018-08-273-5/+7
| |/ / | | | | | | | | | | | | | | | | | | This function is changed so that the interface index is searched across the correct namespace. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* | | *: pthread set name abstractionChirag Shah2018-08-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Testing Done: TOR#cat /proc/2670/task/2672/comm bgpd_ka TOR# ps H -C bgpd -o 'pid tid cmd comm' PID TID CMD COMMAND 2670 2670 /usr/lib/frr/bgpd -M snmp - bgpd 2670 2671 /usr/lib/frr/bgpd -M snmp - bgpd 2670 2672 /usr/lib/frr/bgpd -M snmp - bgpd_ka Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* | | Merge pull request #2337 from pguibert6WIND/netns_aliasRenato Westphal2018-08-283-2/+70
|\ \ \ | | | | | | | | default VRF naming update
| * | | zebra: add an option to zebra command to change default vrf namePhilippe Guibert2018-08-281-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a possibility to change the default vrf name, using the '-o' option. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * | | zebra: detect if a netns is the default netnsPhilippe Guibert2018-08-281-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In the case the default netns has a netns path, then a new NETNS creation will be bypassed. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * | | *: add a vrf update hook to be informed of the vrf namePhilippe Guibert2018-08-281-1/+14
| |/ / | | | | | | | | | | | | | | | | | | | | | The Vrf aliases can be known with a specific hook. That hook will then, from zebra propagate the information to the relevant zapi clients. The registration hook function is the same for all daemons. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* / / zebra: Fix crash in mroute debugDonald Sharp2018-08-281-5/+7
|/ / | | | | | | | | | | | | | | There exists a possibility that the ifindex we are passed does not exist and as such we should check for it not resolving as part of the debug. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | Merge pull request #2920 from donaldsharp/bsd_warningsDavid Lamparter2018-08-262-0/+5
|\ \ | | | | | | Bsd warnings
| * | zebra: No prototype and uninited variablesDonald Sharp2018-08-262-0/+5
| | | | | | | | | | | | | | | | | | | | | Add a header to cleanup no declaration and properly wrapper some variables to appropriate #ifdef. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | Merge pull request #2897 from donaldsharp/zebra_rnh_fixupRenato Westphal2018-08-263-8/+26
|\ \ \ | | | | | | | | zebra: When registering a nexthop, we do not always need to re-eval
| * | | zebra: When registering a nexthop, we do not always need to re-evalDonald Sharp2018-08-253-8/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code prior to this change, was allowing clients to register for nexthop tracking. Then zebra would look up the rnh and send to that particular client any known data. Additionally zebra was blindly re-evaluating the rnh for every registration. This leads to interesting behavior in that all people registered for that nexthop will get callbacks even if nothing changes. Modify the code to know if we have evaluated the rnh or not and if so limit the re-evaluation to when absolutely necessary This is of particular importance to do because of nht callbacks for protocols cause those protocols to do not insignificant work and as more protocols are registering for nht callbacks we will cause more work than is necessary. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | | zebra: Add support for static encap mpls labelsStephen Worley2018-08-253-5/+73
| |/ / |/| | | | | | | | | | | | | | | | | | | | We were ignoring mpls labels encapped with static routes. Added support for single and multipath labels. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com> Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | build: drop unused SMUX client OID MIBsDavid Lamparter2018-08-253-136/+0
|/ / | | | | | | | | | | | | These MIB OIDs were only used to identify clients on the SMUX protocol. And even for that, they were essentially pointless. Signed-off-by: David Lamparter <equinox@diac24.net>
* | doc, lib, zebra: Remove deprecated encode and decode functionalityDonald Sharp2018-08-241-612/+0
| | | | | | | | | | | | | | The ZEBRA_IPV4_ROUTE_[ADD|DELETE] and ZEBRA_IPV6_ROUTE_[ADD|DELETE] functionality has been deprecated for a year now, let's remove this code from the system. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | zebra: Remove unmaintained and uncompilable codeDonald Sharp2018-08-242-213/+0
| | | | | | | | | | | | | | | | | | The zebra/client_main.c code is not being maintained or used. Remove from system. Especially since the encode/decode zapi functionality it `purports` to be testing is deprecated and now being removed. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | zebra: if multiple connecteds, select loopback or vrf if presentDon Slice2018-08-231-3/+23
| | | | | | | | Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
* | zebra: mark router flag for remote neigh updateChirag Shah2018-08-231-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle Remote Neigh entry state change from Router to Host. Remote MAC-IP update may not continue EVPN NA Extended community, Zebra need to accomodate if router_flag change for existing neigh and install with or without Router Flag (R-bit). Testing: Have locally run MAC/IP (neigh entry) with R-bit set, Checke on remote VTEP 'show bgp evpn route ...mac ip' and 'show evpn arp-cache ...' contians router flag. Change host to remove R-bit, which locally learnt entry removes Router flag. This results in remote vtep to remove R-bit from neigh entry. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* | zebra: check router_flag change for neigh updateChirag Shah2018-08-231-20/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Neigh update can have router_flag change, from unset to set and viceversa. This is the case where MAC, IP and VLAN are same but entry's flag moved from R to not R bit and reverse case. Router flag change needs to trigger bgpd to inform all evpn peers to remove from the evpn route. Testing Done: Send GARP with and without R bit from host and validate neigh entry and evpn neigh and mac-ip route entry in zebra and bgpd. Check Peer VTEP evpn route entry where router flag is (un)set. With R-bit Route [2]:[0]:[0]:[48]:[00:1f:2f:db:45:a6]:[128]:[2006:33:33:2::10] VNI 1001 Imported from 27.0.0.16:5:[2]:[0]:[0]:[48]:[00:1f:2f:db:45:a6]:[128]:[2006:33:33:2::10] 4435 5551 27.0.0.16 from MSP1(uplink-1) (27.0.0.9) Origin IGP, valid, external, bestpath-from-AS 4435, best Extended Community: RT:5551:1001 ET:8 ND:Router Flag AddPath ID: RX 0, TX 1261 Last update: Wed Aug 15 20:52:14 2018 Without R-bit Route [2]:[0]:[0]:[48]:[00:1f:2f:db:45:a6]:[128]:[2006:33:33:2::10] VNI 1001 Imported from 27.0.0.16:5:[2]:[0]:[0]:[48]:[00:1f:2f:db:45:a6]:[128]:[2006:33:33:2::10] 4435 5551 27.0.0.16 from MSP2(uplink-2) (27.0.0.10) Origin IGP, valid, external, bestpath-from-AS 4435, best Extended Community: RT:5551:1001 ET:8 AddPath ID: RX 0, TX 1263 Last update: Wed Aug 15 20:53:10 2018 Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* | zebra: mark router flag for neigh updateChirag Shah2018-08-221-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | The neigh update can come prior to mac add update. In this case, the mac will be auto created for the vni. set router flag to local neigh update for mac with auto flag. The neigh update will be informed to bgpd once local mac is learnt. Unset router flag if the neigh update comes without the router flag for an existing neigh entry. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* | Merge pull request #2818 from kssoman/rmap_fixDonald Sharp2018-08-225-22/+139
|\ \ | |/ |/| Zebra does not properly track which route-maps are changed (#2493)
| * zebra : routemap "match ipv6 address prefix list" does not workkssoman2018-08-171-7/+34
| | | | | | | | | | | | | | | | * Added code for "match ipv6 address prefix list" command * Added common function route_match_address_prefix_list() to process routemap for AFI_IP and AFI_IP6 address family Signed-off-by: kssoman <somanks@vmware.com>
| * zebra : Zebra does not properly track which route-maps are changed (#2493)kssoman2018-08-175-15/+105
| | | | | | | | | | | | | | | | * Check for the modified routemap in zebra_route_map_process_update_cb() * Added zebra_rib_table_rm_update() for RIB routemap processing * Added zebra_nht_rm_update() for NHT routemap processing Signed-off-by: kssoman <somanks@vmware.com>
* | Merge pull request #2856 from opensourcerouting/bfd-workDonald Sharp2018-08-171-0/+2
|\ \ | | | | | | bfdd: bug fixes and improvements
| * | bfdd: fix zebra_ptm adapter memory leakRafael Zalamena2018-08-161-0/+2
| | | | | | | | | | | | | | | | | | Memory leak detect with Address Sanitizer and topotests. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* | | zebra: When using BFD ensure that zebra thinks ptm is disabledDonald Sharp2018-08-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order for connected routes to be installed the if_is_operative function is called. This function checks the status of ptm and decides to use ptm enabled/disabled on the interface. The call to zebra_ptm_get_enable was returning true and causing the interface subsystem to do the wrong thing. Modify the internal bfd case to when checking for ptm enabled to say it is not enabled. Tested-by: Mark Stapp <mjs@voltanet.io> Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | Merge pull request #2846 from donaldsharp/backet_dataRuss White2018-08-162-47/+2
|\ \ \ | | | | | | | | Backet data
| * | | zebra: Trust backet->dataDonald Sharp2018-08-152-47/+2
| | | | | | | | | | | | | | | | | | | | | | | | The backet->data cannot be NULL, no need to check for it. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | | Merge pull request #2448 from qlyoung/error-reference-cardsDavid Lamparter2018-08-1638-695/+1067
|\ \ \ \ | |/ / / |/| | | Error Reference Cards