summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* isisd, yang: move IS-IS interface state data to the appropriate placeRenato Westphal2020-05-1663-3092/+622
| | | | | | | | | | | Now that the "frr-interface" list has a "state" container, move the IS-IS interface state nodes underneath it using a new augmentation. Also, update the IS-IS SR topotest to account for this change. Make use of symlinks where possible to avoid having multiple files with the same content. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* zebra: optimize the RIB get_next() callbackRenato Westphal2020-05-163-1/+6
| | | | | | | When fetching the next route node in the RIB, skip the empty ones to avoid calling other northbound callbacks later unnecessarily. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* zebra: skip link-local routes when iterating over the RIB using the NBRenato Westphal2020-05-161-0/+5
| | | | | | | | | | | | | The motivation for this change is that IPv6 link-local routes don't conform to the zebra YANG module since they all have the same prefix (fe80::/64), but zebra's YANG module require each route to have an unique prefix (the key of the "rib" list). This violation can cause problems when iterating over the RIB asynchronously, so skip those routes. At the end of the day nobody cares about link-local routes anyway :) Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* zebra: implement two missing RIB lookup_entry() callbacksRenato Westphal2020-05-161-3/+69
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* zebra: add missing return in one get_elem() callbackRenato Westphal2020-05-161-1/+1
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* isisd: fix crash in the adjacency get_next() NB callbackRenato Westphal2020-05-161-6/+9
| | | | | | | Add a null check to solve the problem (circuit->u.bc.adjdb[level - 1] is guaranteed to be non-null only on L1/L2 areas). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* Merge pull request #5077 from pguibert6WIND/vxlan_linkDonatas Abraitis2020-05-1921-165/+574
|\ | | | | BGP EVPN vrf netns backend
| * zebra: support for macvlan interfacesPhilippe Guibert2020-05-181-22/+49
| | | | | | | | | | | | mac vlan interfaces are supported in different network namespaces. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * doc: add some documentation about bgp evpn netns supportPhilippe Guibert2020-05-181-0/+21
| | | | | | | | | | | | | | a linux configuration gives some explanation on how to set up an evpn overlay in network namespaces. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * zebra: dynamically detect vxlan link interfaces in other netnsPhilippe Guibert2020-05-183-117/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this is used when parsing the newly network namespaces. actually, to track the link of some interfaces like vxlan interfaces, both link index and link nsid are necessary. if a vxlan interface is moved to a new netns, the link information is in the default network namespace, then LINK_NSID is the value of the netns by default in the new netns. That value of the default netns in the new netns is not known, because the system does not automatically assign an NSID of default network namespace in the new netns. Now a new NSID of default netns, seen from that new netns, is created. This permits to store at netns creation the default netns relative value for further usage. Because the default netns value is set from the new netns perspective, it is not needed anymore to use the NETNSA_TARGET_NSID attribute only available in recent kernels. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * bgpd: sanity check when updating nexthop from bgp to zebraPhilippe Guibert2020-05-181-1/+2
| | | | | | | | | | | | | | nexthop may sometimes not be passed through zebra, like for onlink messages. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * lib, zebra: reuse and adapt ns_list walk functionalityPhilippe Guibert2020-05-187-90/+93
| | | | | | | | | | | | | | | | | | the walk routine is used by vxlan service to identify some contexts in each specific network namespace, when vrf netns backend is used. that walk mechanism is extended with some additional paramters to the walk routine. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * zebra: local mac entries populated in correct netnamespacePhilippe Guibert2020-05-181-1/+5
| | | | | | | | | | | | | | MAC address neighbours are read on the same netnamespace where the vxlan interface is. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * zebra: when parsing local entry against dad, retrieve configPhilippe Guibert2020-05-181-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | when duplicate address detection is observed, some incrementation, some timing mechanisms need to be done. For that the main evpn configuration is retrieved. Until now, the VRF that was storing the dad config parameters was the same VRF that hosted the VXLAN interface. With netns backend, this is not true, as the VXLAN interface is in the same VRF as the bridge interface. The modification takes same definition as in BGP, that is to say that there is a single bgp evpn instance, and this is that instance that will give the correct config settings. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * bgpd: evpn nexthop can be changed by defaultPhilippe Guibert2020-05-182-4/+4
| | | | | | | | | | | | | | | | | | There can be cases where evpn traffic is not meshed across various endpoints, but sent to a central pe. For this situation, remove the nexthop unchanged default behaviour for bgp evpn. Also add route reflector commands to bgp evpn node. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * zebra: zvni_map_to_vlan() adaptation for all namespacesPhilippe Guibert2020-05-181-24/+52
| | | | | | | | | | | | | | | | this change is needed when a MAC/IP entry is learned by zebra, and the entry happens to be in a different namespace. So that the entry be active, the correct vni match has to be found. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * zebra: fdb and neighbor table are read for all znsPhilippe Guibert2020-05-181-2/+17
| | | | | | | | | | | | | | all network namespaces are read so as to collect interesting fdb and neighbor tables for EVPN. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * zebra: add ns_id attribute to mac structurePhilippe Guibert2020-05-182-3/+19
| | | | | | | | | | | | | | | | | | this information is necessary for local information, because the interface associated to the mac address is stored with its ifindex, and the ifindex may not be enough to get to the right interface when it comes with multiple network namespaces. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * zebra: bridge layer2 information records ns_id where bridge isPhilippe Guibert2020-05-183-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | when working with vrf netns backend, two bridges interfaces may have the same bridge interface index, but not the same namespace. because in vrf netns backend mode, a bridge slave always belong to the same network namespace, then a check with the namespace id and the ns id of the bridge interface permits to resolve correctly the interface pointer. The problem could occur if a same index of two bridge interfaces can be found on two different namespaces. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * zebra, lib: new API to get absolute netns val from relative netns valPhilippe Guibert2020-05-183-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | when receiving a netlink API for an interface in a namespace, this interface may come with LINK_NSID value, which means that the interface has its link in an other namespace. Unfortunately, the link_nsid value is self to that namespace, and there is a need to know what is its associated nsid value from the default namespace point of view. The information collected previously on each namespace, can then be compared with that value to check if the link belongs to the default namespace or not. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * zebra, lib: store relative default ns id in each namespacePhilippe Guibert2020-05-185-4/+19
| | | | | | | | | | | | | | | | to be able to retrieve the network namespace identifier for each namespace, the ns id is stored in each ns context. For default namespace, the netns id is the same as that value. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * zebra, lib: add an internal API to get relative default nsid in other nsPhilippe Guibert2020-05-186-1/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | as remind, the netns identifiers are local to a namespace. that is to say that for instance, a vrf <vrfx> will have a netns id value in one netns, and have an other netns id value in one other netns. There is a need for zebra daemon to collect some cross information, like the LINK_NETNSID information from interfaces having link layer in an other network namespace. For that, it is needed to have a global overview instead of a relative overview per namespace. The first brick of this change is an API that sticks to netlink API, that uses NETNSA_TARGET_NSID. from a given vrf vrfX, and a new vrf created vrfY, the API returns the value of nsID from vrfX, inside the new vrf vrfY. The brick also gets the ns id value of default namespace in each other namespace. An additional value in ns.h is offered, that permits to retrieve the default namespace context. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * zebra: map vxlan interface to bridge interface with correct ns idPhilippe Guibert2020-05-182-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | an incoming bridge index has been found, that is linked with vxlan interface, and the search for that bridge interface is done. In vrf-lite, the search is done across the same default namespace, because bridge and vxlan may not be in the same vrf. But this behaviour is wrong when using vrf netns backend, as the bridge and the vxlan have to be in the same vrf ( hence in the same network namespace). To comply with that, use the netnamespace of the vxlan interface. Like that, the appropriate nsid is passed as parameter, and consequently, the search is correct, and the mac address passed to BGP will be ok too. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * zebra: display interface slave typePhilippe Guibert2020-05-181-0/+20
| | | | | | | | | | | | interface slave type is displayed. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * zebra: zvni_map_to_svi() adaptation for other network namespacesPhilippe Guibert2020-05-181-29/+47
| | | | | | | | | | | | the function is called with all the network namespaces. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * zebra: zvni_from_svi() adaptation for other network namespacesPhilippe Guibert2020-05-181-37/+72
| | | | | | | | | | | | | | | | other network namespaces are parsed because bridge interface can be bridged with vxlan interfaces with a link in the default vrf that hosts l2vpn. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * zebra: importation of bgp evpn rt5 from vni with other netnsPhilippe Guibert2020-05-186-18/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With vrf-lite mechanisms, it is possible to create layer 3 vnis by creating a bridge interface in default vr, by creating a vxlan interface that is attached to that bridge interface, then by moving the vxlan interface to the wished vrf. With vrf-netns mechanism, it is slightly different since bridged interfaces can not be separated in different network namespaces. To make it work, the setup consists in : - creating a vxlan interface on default vrf. - move the vxlan interface to the wished vrf ( with an other netns) - create a bridge interface in the wished vrf - attach the vxlan interface to that bridged interface from that point, if BGP is enabled to advertise vnis in default vrf, then vxlan interfaces are discovered appropriately in other vrfs, provided that the link interface still resides in the vrf where l2vpn is advertised. to import ipv4 entries from a separate vrf, into the l2vpn, the configuration of vni in the dedicated vrf + the advertisement of ipv4 entries in bgp vrf will import the entries in the bgp l2vpn. the modification consists in parsing the vxlan interfaces in all network namespaces, where the link resides in the same network namespace as the bgp core instance where bgp l2vpn is enabled. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * zebra: across network namespace, vxlan remembers the link informationPhilippe Guibert2020-05-183-4/+46
| | | | | | | | | | | | | | | | | | | | the link information of vxlan interface is populated in layer 2 information, as well as in layer 2 vxlan information. This information will be used later to collect vnis that are in other network namespaces, but where bgp evpn is enabled on main network namespaces, and those vnis have the link information in that namespace. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* | Merge pull request #6344 from dslicenc/ospf6-routemap-deleteRuss White2020-05-191-9/+30
|\ \ | | | | | | ospf6d: withdraw redistributed prefixes based on prefix-list changes
| * | ospf6d: withdraw redistributed prefixes based on prefix-list changesDon Slice2020-05-051-9/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem reported that when an a previously advertised redistributed route should be withdrawn based on a prefix-list change or route-map deletion, the external LSAs would remain in the database and not be withdrawn from peers. This fix does the withdraw when the prefix-list is changed or route-map is deleted. Ticket: CM-28944 Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
* | | Merge pull request #6420 from vivek-cumulus/bgpd-paths-cleanupRuss White2020-05-181-1/+2
|\ \ \ | | | | | | | | bgpd: Free non-best paths also during table cleanup
| * | | bgpd: Free non-best paths also during table cleanupvivek2020-05-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Non-best paths (path info structures) also need to be freed during table cleanup not only to release their memory but to also ensure any linkages are updated correctly. One such example is for EVPN where there is a link between the imported path info (in a L2 or L3 vrf instance) and its parent path info. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
* | | | Merge pull request #6421 from vivek-cumulus/zebra_trust_onlinkRuss White2020-05-182-23/+18
|\ \ \ \ | |_|_|/ |/| | | zebra: Trust onlink flag for nexthop active resolution
| * | | zebra: Trust onlink flag for nexthop active resolutionvivek2020-05-162-23/+18
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When checking if a nexthop is active, if it has been marked as onlink, just check on the presence and status of the nexthop's interface. When handling client request to create a route, if the client says that the nexthop is onlink, trust it; when internally (in zebra) determining that the nexthop is onlink, ensure it is only done in the case of an interface with a /32 IP address which is the case for OSPF unnumbered. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Stephen Worley <sworley@cumulusnetworks.com>
* | | Merge pull request #6406 from donaldsharp/ospf_multi_instance_start_fixDonatas Abraitis2020-05-181-1/+3
|\ \ \ | | | | | | | | tools: Only load instances or daemon
| * | | tools: Only load instances or daemonDonald Sharp2020-05-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original start/stop of FRR prior to David's rewrite in PR 3507, when configuring multi-instance would only start multi-instance (-1 -2 -3 -4...) or just the daemon, not both. If you happened to start a ospfd instance of 1 then both the default and instance 1 would react to cli. Do not allow this, put it back to original behavior Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | | Merge pull request #6422 from rudis/masterDonatas Abraitis2020-05-174-15/+15
|\ \ \ \ | |_|/ / |/| | | Doc: minor fixes
| * | | doc: ospf_fundamentals: fix typosSimon Ruderich2020-05-161-3/+3
| | | | | | | | | | | | | | | | Signed-off-by: Simon Ruderich <simon@ruderich.org>
| * | | doc: bgp: fix rst syntaxSimon Ruderich2020-05-161-4/+4
| | | | | | | | | | | | | | | | Signed-off-by: Simon Ruderich <simon@ruderich.org>
| * | | doc: wecmp_linkbw: fix typoSimon Ruderich2020-05-161-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Simon Ruderich <simon@ruderich.org>
| * | | doc: bgp: fix typosSimon Ruderich2020-05-161-3/+3
| | | | | | | | | | | | | | | | Signed-off-by: Simon Ruderich <simon@ruderich.org>
| * | | doc: zebra: use correct format for `show ip/ipv6 forward` commandSimon Ruderich2020-05-161-4/+4
|/ / / | | | | | | | | | Signed-off-by: Simon Ruderich <simon@ruderich.org>
* | | Merge pull request #6404 from FRRouting/dev_isis_srDonald Sharp2020-05-15285-73/+43000
|\ \ \ | | | | | | | | isisd: IS-IS Segment Routing support
| * \ \ Merge pull request #6342 from Orange-OpenSource/dev_isis_srRenato Westphal2020-05-149-528/+1107
| |\ \ \ | | | | | | | | | | isisd: Preparation to merge Segment-Routing into master
| | * | | isisd: Update documentation for Segment RoutingOlivier Dugeon2020-05-141-6/+42
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
| | * | | isisd: Update Segment Routing Show CommandsOlivier Dugeon2020-05-141-30/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Improve `show isis segment-routing prefix-sids` output * Add new `show isis segment-routing node' command Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
| | * | | isisd: IS-IS-SR preparation for master 5/5Olivier Dugeon2020-05-145-113/+517
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update comments (doxygen style) for all functions. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
| | * | | isisd: IS-IS-SR preparation for master 4/5Olivier Dugeon2020-05-145-55/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Regroup fonctions to install label for Prefix and Adjacency SID * Change 'replace_semantics' variable name by 'make_before_break' in sr_prefix_reinstall() function and adjust comments * Call directly lsp_regenerate_schedule() from isis_nb_config.c when MSD is updated Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
| | * | | isisd: IS-IS-SR preparation for master 3/5Olivier Dugeon2020-05-143-94/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add debug macro and debug messages Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
| | * | | isisd: IS-IS-SR preparation for master 2/5Olivier Dugeon2020-05-143-183/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Rename functions following rules: isis_sr_XXX is kept for external functions and isis_sr prefix remove for static ones * Rename local_label & remote_label variables by input_label & output_label * Change parameter order (to follow other functions) in sr_node_srgb_update() Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>