]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 years agoMerge pull request #4296 from adharkar/frr-master-fib_prefix
Donald Sharp [Wed, 15 May 2019 01:46:38 +0000 (21:46 -0400)]
Merge pull request #4296 from adharkar/frr-master-fib_prefix

Zebra: Add "show ip/ipv6 fib <prefix> [json]" CLI

5 years agoMerge pull request #4332 from patrasar/2201630
Donald Sharp [Wed, 15 May 2019 01:20:21 +0000 (21:20 -0400)]
Merge pull request #4332 from patrasar/2201630

bgpd: display bgp neighbor advertised-routes json warning message

5 years agoMerge pull request #4314 from lkrishnamoor/extract_tunnel_type_extcom
Donald Sharp [Wed, 15 May 2019 00:18:29 +0000 (20:18 -0400)]
Merge pull request #4314 from lkrishnamoor/extract_tunnel_type_extcom

bgpd: Extract tunnel type from extended communities

5 years agobgpd: Extract tunnel type from extended communities
Lakshman Krishnamoorthy [Sat, 11 May 2019 17:17:23 +0000 (10:17 -0700)]
bgpd: Extract tunnel type from extended communities

This diff contains 2 parts:
1. Extract the tunnel type info from bgp extended communities.
2. Make rfapi use this common tunnel type ap

Signed-off-by: Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
5 years agobgpd: display bgp neighbor advertised-routes json warning message
Sarita Patra [Tue, 14 May 2019 13:22:19 +0000 (06:22 -0700)]
bgpd: display bgp neighbor advertised-routes json warning message

Issue 1:
Getting an empty json without any warning message, while executing
the command "show ip bgp neighbor <x.x.x.x> advertised-routes
json" when the bgp instance is not present or getting created.

Issue 2:
Getting an empty json without any warning message, while executing
the command "show ip bgp vrf/view <name> advertised-routes json"
when the specified view/vrf is not present.

Fix:
Display warning message while executing the above cli commands, when
the bgp instance, specified vrf is not present.

Signed-off-by: Sarita Patra <saritap@vmware.com>
5 years agoMerge pull request #4335 from opensourcerouting/zebra-fpm-blackhole-info
Donald Sharp [Tue, 14 May 2019 17:36:31 +0000 (13:36 -0400)]
Merge pull request #4335 from opensourcerouting/zebra-fpm-blackhole-info

zebra: send nexthop blackhole information in FPM

5 years agozebra: send nexthop blackhole information in FPM
Rafael Zalamena [Sat, 27 Apr 2019 14:19:43 +0000 (11:19 -0300)]
zebra: send nexthop blackhole information in FPM

Don't return prematurely so we can add blackhole nexthop information.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agoMerge pull request #4312 from lkrishnamoor/json_cli_bug_fix
David Lamparter [Tue, 14 May 2019 14:07:38 +0000 (16:07 +0200)]
Merge pull request #4312 from lkrishnamoor/json_cli_bug_fix

bgpd: evpn json cli bug fix

5 years agoMerge pull request #4307 from chiragshah6/evpn_dev1
David Lamparter [Tue, 14 May 2019 13:56:32 +0000 (15:56 +0200)]
Merge pull request #4307 from chiragshah6/evpn_dev1

zebra: unset sticky mac upon local deletion

5 years agoMerge pull request #4027 from pguibert6WIND/fix_interface_rtadv
David Lamparter [Tue, 14 May 2019 13:53:04 +0000 (15:53 +0200)]
Merge pull request #4027 from pguibert6WIND/fix_interface_rtadv

Fix interface rtadv

5 years agoMerge pull request #4258 from nikos-github/frr-nexthop
David Lamparter [Tue, 14 May 2019 13:31:19 +0000 (15:31 +0200)]
Merge pull request #4258 from nikos-github/frr-nexthop

bgpd: IPv6 session flapping with MP_REACH_NLRI and 0.0.0.0 in NEXT_HOP attribute

5 years agoMerge pull request #4304 from donaldsharp/route_map_switch
David Lamparter [Tue, 14 May 2019 13:29:58 +0000 (15:29 +0200)]
Merge pull request #4304 from donaldsharp/route_map_switch

Route map switch

5 years agoMerge pull request #4321 from sworleys/Ribsystem-Ribkernel
Mark Stapp [Tue, 14 May 2019 13:29:08 +0000 (09:29 -0400)]
Merge pull request #4321 from sworleys/Ribsystem-Ribkernel

zebra: Make RIB_SYSTEM|KERNEL_ROUTE a property of rib.h

5 years agoMerge pull request #4112 from pguibert6WIND/bfd_vrf
Rafael Zalamena [Tue, 14 May 2019 13:24:56 +0000 (10:24 -0300)]
Merge pull request #4112 from pguibert6WIND/bfd_vrf

support for BFD VRF

5 years agoMerge pull request #4329 from sworleys/RB-Const
Mark Stapp [Tue, 14 May 2019 12:58:17 +0000 (08:58 -0400)]
Merge pull request #4329 from sworleys/RB-Const

lib: Add const to openbsd-tree functions

5 years agoMerge pull request #4330 from donaldsharp/robo_covo
Mark Stapp [Tue, 14 May 2019 12:34:58 +0000 (08:34 -0400)]
Merge pull request #4330 from donaldsharp/robo_covo

zebra: ctx is dereferenced in every path

5 years agolib: Add const to openbsd-tree functions
Stephen Worley [Tue, 14 May 2019 00:11:11 +0000 (17:11 -0700)]
lib: Add const to openbsd-tree functions

A few of the functions in openbsd's RB tree implementation
needed to have const in their parameters.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agozebra: Share route type checking macros
Stephen Worley [Mon, 13 May 2019 21:32:33 +0000 (14:32 -0700)]
zebra: Share route type checking macros

Make the RIB_*_ROUTE() macro which is passed a route in rib.h just use
the R*_ROUTE() macros that directly check the type in rt.h.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agoMerge pull request #4320 from donaldsharp/re_monotime
Renato Westphal [Mon, 13 May 2019 21:28:07 +0000 (18:28 -0300)]
Merge pull request #4320 from donaldsharp/re_monotime

zebra: Switch to using monotime(NULL) for re->uptime

5 years agoMerge pull request #4324 from opensourcerouting/fix_grammar_sandbox
Mark Stapp [Mon, 13 May 2019 19:33:51 +0000 (15:33 -0400)]
Merge pull request #4324 from opensourcerouting/fix_grammar_sandbox

lib: fix crash in the CLI grammar sandbox

5 years agolib: fix crash in the CLI grammar sandbox
Renato Westphal [Mon, 13 May 2019 18:18:57 +0000 (15:18 -0300)]
lib: fix crash in the CLI grammar sandbox

The CLI grammer sandbox needs to initialize the northbound subsystem
otherwise the running_config global variable won't be set, which
leads to crashes.

Fixes #4319.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoMerge pull request #4318 from manuhalo/ospf6_rid_doc_fix
Renato Westphal [Mon, 13 May 2019 17:35:13 +0000 (14:35 -0300)]
Merge pull request #4318 from manuhalo/ospf6_rid_doc_fix

doc: fix ospf6d router-id cmd

5 years agoMerge pull request #4309 from nikos-github/frr-doc
Renato Westphal [Mon, 13 May 2019 17:32:18 +0000 (14:32 -0300)]
Merge pull request #4309 from nikos-github/frr-doc

doc: Provide info on what pkg to install if mpls-router module is missing

5 years agozebra: Make RIB_SYSTEM|KERNEL_ROUTE a property of rib.h
Donald Sharp [Tue, 29 Jan 2019 19:06:25 +0000 (14:06 -0500)]
zebra: Make RIB_SYSTEM|KERNEL_ROUTE a property of rib.h

These defines should be available from rib.h

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agodoc: fix ospf6d router-id cmd
Emanuele Di Pascale [Mon, 13 May 2019 11:05:59 +0000 (13:05 +0200)]
doc: fix ospf6d router-id cmd

in ospf6d, the 'router-id' command must be prefixed with 'ospf6'.
Update the docs to reflect this.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
5 years agobgpd: evpn json cli bug fix
Lakshman Krishnamoorthy [Sat, 11 May 2019 16:33:10 +0000 (09:33 -0700)]
bgpd: evpn json cli bug fix

Bug: If there are 2 different prefixes under an rd, the
output of "show bgp l2vpn evpn json" would print only one of the
prefixes.

RCA: prefix info was added to the json_object once per rd. Hence,
prefix and rd were added just once, as the loop iterated over all
the prefixes and paths.

This is related to my earlier commit that went in via PR 4283:
https://github.com/FRRouting/frr/pull/4283

Signed-off-by: Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
5 years agoMerge pull request #4311 from ton31337/fix/remote_trailing_tab
Donald Sharp [Sat, 11 May 2019 13:41:45 +0000 (09:41 -0400)]
Merge pull request #4311 from ton31337/fix/remote_trailing_tab

bgpd: Remove unnecessary trailing tab

5 years agozebra: ctx is dereferenced in every path
Donald Sharp [Sat, 11 May 2019 12:39:54 +0000 (08:39 -0400)]
zebra: ctx is dereferenced in every path

No need to check for non-null ctx at this point in the
function as that it has already been derefed.

Signed-off-by: donald Sharp ,sahrpd@cumulusnetworks.com>
5 years agoMerge pull request #4310 from ton31337/fix/gitignore_skip_vscode
Donald Sharp [Sat, 11 May 2019 12:03:24 +0000 (08:03 -0400)]
Merge pull request #4310 from ton31337/fix/gitignore_skip_vscode

git: Ignore Visual Studio Code settings

5 years agobgpd: Remove unnecessary trailing tab
Donatas Abraitis [Sat, 11 May 2019 07:14:06 +0000 (10:14 +0300)]
bgpd: Remove unnecessary trailing tab

This is very annoying and every time I have to fix this manually
after auto-formatting.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agogit: Ignore Visual Studio Code settings
Donatas Abraitis [Sat, 11 May 2019 07:09:01 +0000 (10:09 +0300)]
git: Ignore Visual Studio Code settings

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agozebra: Switch to using monotime(NULL) for re->uptime
Donald Sharp [Sat, 11 May 2019 05:44:42 +0000 (01:44 -0400)]
zebra: Switch to using monotime(NULL) for re->uptime

The re->uptime usage of time(NULL) leaves it open to
timing changes from outside influence.  Switching
to monotime allows us to ensure that we have a timestamp
that is always increasing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agodoc: Provide info on what pkg to install if mpls-router module is missing
nikos [Fri, 10 May 2019 22:21:14 +0000 (15:21 -0700)]
doc: Provide info on what pkg to install if mpls-router module is missing

The mpls-route module may be missing from Ubuntu 18.4. Provide info on
what pkg to install plus what directory py.test needs to be run from.

Signed-off-by: nikos <ntriantafillis@gmail.com>
5 years agobgpd, lib, ospf6d, ospfd, pimd, zebra: Rework routemap event callback
Donald Sharp [Thu, 9 May 2019 03:19:55 +0000 (23:19 -0400)]
bgpd, lib, ospf6d, ospfd, pimd, zebra: Rework routemap event callback

The route_map_event_hook callback was passing the `route_map_event_t`
to each individual interested party.  No-one is ever using this data
so let's cut to the chase a bit and remove the pass through of data.
This is considered ok in that the routemap.c code came this way
originally and after 15+ years no-one is using this functionality.
Nor do I see any `easy` way to do anything useful with this data.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4308 from adharkar/frr-master-bgp_rmap_debug
Donald Sharp [Fri, 10 May 2019 22:42:58 +0000 (18:42 -0400)]
Merge pull request #4308 from adharkar/frr-master-bgp_rmap_debug

bgpd: BGP debug for route-map apply

5 years agolib: in routemap.c if using a switch for an enum get rid of enum
Donald Sharp [Thu, 9 May 2019 03:00:52 +0000 (23:00 -0400)]
lib: in routemap.c if using a switch for an enum get rid of enum

From looking at a current PR: #4297, we see that routemap.c code
was not properly updating dependency information for some
route_map_event_t enum types.  This has lead to dependancy
information not being updated properly.  While at this time
I do not know whether or not we need to update the switch
for the missing types, I do know that if we add something in
the future we should make the person adding the code consider
this.  So let's remove all `default:` switch statement handlers
from routemap.c when switching on an enum.  Future time will
need to be spent to figure out what is needed to be done here.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: BGP debug for route-map apply
Ameya Dharkar [Fri, 10 May 2019 20:34:08 +0000 (13:34 -0700)]
bgpd: BGP debug for route-map apply

Display a debug message while sending a BGP route if the route is filtered by a
route-map.
Debug for incoming filtered route is already present.

Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
5 years agobgpd: IPv6 session flapping with MP_REACH_NLRI and 0.0.0.0 in NEXT_HOP attribute
nikos [Thu, 9 May 2019 07:02:16 +0000 (00:02 -0700)]
bgpd: IPv6 session flapping with MP_REACH_NLRI and 0.0.0.0 in NEXT_HOP attribute

This is causing interop issues with vendors. According to the RFC,
receiver should ignore the NEXT_HOP attribute with MP_REACH_NLRI
present.

Signed-off-by: nikos <ntriantafillis@gmail.com>
5 years agoMerge pull request #4305 from qlyoung/fix-lua-build
Mark Stapp [Fri, 10 May 2019 19:43:34 +0000 (15:43 -0400)]
Merge pull request #4305 from qlyoung/fix-lua-build

build: fix Lua build

5 years agoMerge pull request #4306 from mjstapp/doc_dplane_cli
Quentin Young [Fri, 10 May 2019 19:43:24 +0000 (15:43 -0400)]
Merge pull request #4306 from mjstapp/doc_dplane_cli

doc: add cli doc for zebra dplane cli

5 years agodoc: add doc for zebra dplane cli
Mark Stapp [Wed, 8 May 2019 18:12:55 +0000 (14:12 -0400)]
doc: add doc for zebra dplane cli

Add some notes about the cli associated with the zebra
dataplane.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoZebra: "show ip/ipv6 route/fib prefix" prefix not found cases
Ameya Dharkar [Fri, 10 May 2019 19:05:47 +0000 (12:05 -0700)]
Zebra: "show ip/ipv6 route/fib prefix" prefix not found cases

1. If prefix not found, print "{}" for json
2. Print "Network not in table" for route option
3. Print "Network not in FIB" for fib option
4. Take care of "show ip route/fib vrf all prefix" command.

Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
5 years agoMerge pull request #4245 from mjstapp/fix_vrf_lsps
Renato Westphal [Fri, 10 May 2019 18:23:58 +0000 (15:23 -0300)]
Merge pull request #4245 from mjstapp/fix_vrf_lsps

zebra: remove vrf LSPs when vrf is deleted

5 years agozebra: unset sticky mac upon local deletion
Chirag Shah [Thu, 9 May 2019 19:25:44 +0000 (12:25 -0700)]
zebra: unset sticky mac upon local deletion

if the local sticky mac delete request is received,
if there are associated neighbor entries present, mac's
only local flag is removed and marked as auto mac.

this results in next local mac learning automatically assumes
mac is sticky.

There is a case when bridge learning off is configured, user
configures sticky mac via bridge fdb add.
This MAC learns associated neighbor entry.
Later user deletes stick mac via bridge fdb del, this triggers
frr to delete mac but if there are neighbors present, frr marks
MAC as AUTO but does not remove sticky flag.
User enables bridge learning on which triggers
The mac to learn as dynamic entry and in absence of this
fix, the mac is marked as sticky.

Ticket:CM-24968
Reviewed By:CCR-8683
Testing Done:

Validated broken condition with internally reproduction
with fix and without.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agobuild: fix Lua build
Quentin Young [Thu, 9 May 2019 20:08:40 +0000 (20:08 +0000)]
build: fix Lua build

Each of Lua's major versions are incompatible with each other. Ubuntu,
at least, does not provide a single liblua.so or /usr/include/lua; all
SOs and headers are versioned, e.g. liblua5.3.so and
/usr/include/lua5.3. There's already an m4 macro in the GNU collection
to handle this situation, so let's use that.

This allows building with Lua enabled to work on platforms other than
Fedora.

* Move lib/lua.[ch] -> lib/frrlua.[ch] to prevent path conflicts
* Fix configure.ac search for proper CPP and linker flags
* Add Lua include path to AM_CPPFLAGS
* Update vtysh/extract.pl.in

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #4275 from ton31337/fix/move_outside_bgp_input_modifier
Donald Sharp [Fri, 10 May 2019 15:34:40 +0000 (11:34 -0400)]
Merge pull request #4275 from ton31337/fix/move_outside_bgp_input_modifier

bgpd: Move inbound policy check outside bgp_input_modifier()

5 years agoMerge pull request #4272 from opensourcerouting/isis-prefix-sid-fix
Donald Sharp [Fri, 10 May 2019 15:06:56 +0000 (11:06 -0400)]
Merge pull request #4272 from opensourcerouting/isis-prefix-sid-fix

isisd: fix display of the Extended IPv4 reachability TLV

5 years agoMerge pull request #4214 from donaldsharp/s_g_channel_deletion
Jafar Al-Gharaibeh [Fri, 10 May 2019 14:49:24 +0000 (09:49 -0500)]
Merge pull request #4214 from donaldsharp/s_g_channel_deletion

pimd: Deletion of a ifchannel does not immediately mean remove from OIL

5 years agobgpd: Move inbound policy check outside bgp_input_modifier()
Donatas Abraitis [Fri, 10 May 2019 14:01:39 +0000 (17:01 +0300)]
bgpd: Move inbound policy check outside bgp_input_modifier()

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agotopotests: Add test to check if eBGP required policy works
Donatas Abraitis [Fri, 10 May 2019 14:01:24 +0000 (17:01 +0300)]
topotests: Add test to check if eBGP required policy works

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agoMerge pull request #4297 from vishaldhingra/rmap
Donald Sharp [Fri, 10 May 2019 13:04:59 +0000 (09:04 -0400)]
Merge pull request #4297 from vishaldhingra/rmap

lib : Child rmap not sending an update to parent rmap,if there is an update in child rmap.

5 years agoMerge pull request #4295 from donaldsharp/topotest_if
Renato Westphal [Fri, 10 May 2019 11:42:07 +0000 (08:42 -0300)]
Merge pull request #4295 from donaldsharp/topotest_if

topotests: ifindex values are not guaranteed to be the same

5 years agoMerge pull request #4242 from donaldsharp/zebra_diet
Renato Westphal [Fri, 10 May 2019 11:29:59 +0000 (08:29 -0300)]
Merge pull request #4242 from donaldsharp/zebra_diet

Zebra diet

5 years agoisisd: Don't set subtlv structure if we didn't unpack any subtlvs
Christian Franke [Fri, 10 May 2019 11:24:38 +0000 (13:24 +0200)]
isisd: Don't set subtlv structure if we didn't unpack any subtlvs

This ensures deserialized and serialized TLV representation is
consistent.

5 years agoMerge pull request #4288 from qlyoung/checkpatch-unsafe-function-lints
Renato Westphal [Fri, 10 May 2019 10:16:24 +0000 (07:16 -0300)]
Merge pull request #4288 from qlyoung/checkpatch-unsafe-function-lints

tools: add lints for unsafe functions

5 years agoMerge pull request #4287 from NaveenThanikachalam/dup_config_processing
Donald Sharp [Thu, 9 May 2019 22:36:50 +0000 (18:36 -0400)]
Merge pull request #4287 from NaveenThanikachalam/dup_config_processing

lib, bgpd: Disallow processing of duplicate config.

5 years agoMerge pull request #4284 from donaldsharp/conf_t
Jafar Al-Gharaibeh [Thu, 9 May 2019 22:01:51 +0000 (17:01 -0500)]
Merge pull request #4284 from donaldsharp/conf_t

Conf t

5 years agoMerge pull request #4292 from qlyoung/doc-bgp-maximum-prefix
Jafar Al-Gharaibeh [Thu, 9 May 2019 22:00:16 +0000 (17:00 -0500)]
Merge pull request #4292 from qlyoung/doc-bgp-maximum-prefix

doc: add doc for bgp maximum-prefix knob

5 years agoMerge pull request #4298 from qlyoung/gitignore-ccls-cache
Jafar Al-Gharaibeh [Thu, 9 May 2019 21:58:46 +0000 (16:58 -0500)]
Merge pull request #4298 from qlyoung/gitignore-ccls-cache

.gitignore: ignore .ccls-cache

5 years agoZebra: Add "show ip/ipv6 fib <prefix> [json]" CLI - review comments 1
Ameya Dharkar [Thu, 9 May 2019 20:36:59 +0000 (13:36 -0700)]
Zebra: Add "show ip/ipv6 fib <prefix> [json]" CLI - review comments 1

According to the review comments, added "Network not in FIB" message when we do
not have a FIB route present for given prefix.

Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
5 years ago.gitignore: ignore .ccls-cache
Quentin Young [Thu, 9 May 2019 17:25:18 +0000 (17:25 +0000)]
.gitignore: ignore .ccls-cache

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #4251 from rgirada/fix_pim_upstream
Donald Sharp [Thu, 9 May 2019 16:17:49 +0000 (12:17 -0400)]
Merge pull request #4251 from rgirada/fix_pim_upstream

Pimd : S,G Mroute entries are not expiring  even after KAT expiry, remain as stale entries.

5 years agoPimd : S,G Mroute entries are not expiring even after KAT expiry,
rgirada [Fri, 3 May 2019 17:35:48 +0000 (10:35 -0700)]
Pimd : S,G Mroute entries are not expiring  even after KAT expiry,
       become stale entries.

Topology:
--------
Source
|
FHR
|
RP ------ LHR --- Recv1
|
Recv2

Root case :
-----------
When RP acts as a LHR i.e RP has a local receiver and registed for
the same group where LHR connected receiver also registered for the
same multicast group.When RP receives a (s,g) join form LHR , it
increments upstream ref count to two to track the Local membership
as well.But at the time of KAT expiry in RP , upstream reference
is not being removed Which is added to track local membership which
is causing to make these entries as stale in RP and FHR.

Fix : Made the change such that it removes the upstream reference
if it is added to track the local memberships.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
5 years agolib, bgpd: Disallow processing of duplicate config.
Naveen Thanikachalam [Wed, 8 May 2019 09:58:27 +0000 (02:58 -0700)]
lib, bgpd: Disallow processing of duplicate config.

This fix aims to reduce the load on BGPD when certain
exisiting configurations are replayed.
Specifically, the fix prevents BGPD from processing
routes when the following already existing configurations
are replayed:
1) A match criteria is configured within a route-map.
2) When "call" is invoked within a route-map.
3) When a route-map is tied to a BGP neighbor.

Signed-off-by: NaveenThanikachalam <nthanikachal@vmware.com>
5 years agolib : Child rmap not sending an update to parent rmap,if there is an update in child...
vishaldhingra [Thu, 9 May 2019 03:53:35 +0000 (20:53 -0700)]
lib : Child rmap not sending an update to parent rmap,if there is an update in child rmap.

Route map library creates a hash table to save the dependency binding.
route-map LRM permit 1
call rLRM
Whenever there is change in child routemap(rLRM), it tries to
find the dependency mapping with the child route map MATCH event
and it fails.The handing of match add and match delete was missing
to get the correct dependency,here it's LRM.
This fix would correct the flow to get the correct dependency.

Signed-off-by: vishaldhingra <vdhingra@vmware.com>
5 years agoZebra: Add "show ip/ipv6 fib <prefix> [json]" CLI
Ameya Dharkar [Wed, 8 May 2019 21:26:49 +0000 (14:26 -0700)]
Zebra: Add "show ip/ipv6 fib <prefix> [json]" CLI

"show ip/ipv6 route <prefix> [json]" uses a different parser chain from
"show ip/ipv6 route [json]".
"show ip/ipv6 route <prefix> [json]" CLI does not support "fib" option.

Fix:
Add "fib" option to the above command.
The new command is: "show ip/ipv6 <route/fib> <prefix> [json]"
If "fib" option is specified, we will show only the selected routes
(Similar to "show ip/ipv6 fib")

Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
5 years agoMerge pull request #4283 from lkrishnamoor/json_output_cli
Donald Sharp [Wed, 8 May 2019 19:47:36 +0000 (15:47 -0400)]
Merge pull request #4283 from lkrishnamoor/json_output_cli

bgpd: Fix for evpn json cli output

5 years agodoc: add doc for bgp maximum-prefix knob
Quentin Young [Wed, 8 May 2019 19:29:13 +0000 (19:29 +0000)]
doc: add doc for bgp maximum-prefix knob

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agotopotests: ifindex values are not guaranteed to be the same
Donald Sharp [Fri, 25 Jan 2019 02:46:35 +0000 (21:46 -0500)]
topotests: ifindex values are not guaranteed to be the same

Different versions of linux are assigned different interface
ifindexes.  Mask that cabbage out.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Evpn json cli output missing
Lakshman Krishnamoorthy [Tue, 7 May 2019 21:07:35 +0000 (14:07 -0700)]
bgpd: Evpn json cli output missing

Issue1: The following json cli commands are broken (they dont display
anything):
1. show [ip] bgp l2vpn evpn json
2. show [ip] bgp l2vpn evpn all neighbors <IP> routes json
3. show [ip] bgp l2vpn evpn rd <RD> json
4. show [ip] bgp l2vpn evpn rd <RD> neighbors <IP> routes json

RCA1: The existing json_object was partially filled.
Some fields like "prefix", "prefixLen", etc were not
filled in the json_object.
RCA2: Code missing to display the constructed json_object.

Issue2: Column header not shown on bgp evpn commands.
Fix: turned on the flag to display header

Output after fix:
The above commands have been made to follow the existing output style of
"show bgp l2vpn evpn routes json"
leaf-1# sh bgp l2vpn evpn json
{
  "bgpTableVersion":1,
  "bgpLocalRouterId":"10.100.0.1",
  "defaultLocPrf":100,
  "localAS":65000,
  "10.100.0.1:3":{
    "rd":"10.100.0.1:3",
    "[3]:[0]:[32]:[10.100.0.1]":{
      "prefix":"[3]:[0]:[32]:[10.100.0.1]",
      "prefixLen":288,
      "paths":[
        {
          "valid":true,
          "bestpath":true,
          "pathFrom":"external",
          "routeType":3,
          "ethTag":0,
          "ipLen":32,
          "ip":"10.100.0.1",
          "weight":32768,
          "peerId":"(unspec)",
          "aspath":"",
          "path":"",
          "origin":"IGP",
          "nexthops":[
            {
              "ip":"10.100.0.1",
              "afi":"ipv4",
              "used":true
            }
          ]
        }
      ]
    }
  },
..........
..........
  "10.100.0.2:2":{
    "rd":"10.100.0.2:2",
    "[3]:[0]:[32]:[10.100.0.2]":{
      "prefix":"[3]:[0]:[32]:[10.100.0.2]",
      "prefixLen":288,
      "paths":[
        {
          "valid":true,
          "bestpath":true,
          "pathFrom":"external",
          "routeType":3,
          "ethTag":0,
          "ipLen":32,
          "ip":"10.100.0.2",
          "weight":0,
          "peerId":"205.0.113.2",
          "aspath":"65002",
          "path":"65002",
          "origin":"IGP",
          "nexthops":[
            {
              "ip":"10.100.0.2",
              "afi":"ipv4",
              "used":true
            }
          ]
        },
        {
          "valid":true,
          "pathFrom":"external",
          "routeType":3,
          "ethTag":0,
          "ipLen":32,
          "ip":"10.100.0.2",
          "weight":0,
          "peerId":"203.0.113.4",
          "aspath":"65001 65002",
          "path":"65001 65002",
          "origin":"IGP",
          "nexthops":[
            {
              "ip":"10.100.0.2",
              "afi":"ipv4",
              "used":true
            }
          ]
        }
      ]
    }
  },
....
....
  "numPrefix":10,
  "totalPrefix":10
}
leaf-1# sh bgp l2vpn evpn
BGP table version is 1, local router ID is 10.100.0.1
Status codes:s suppressed, d damped, h history, * valid, > best, i - int
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: ip 10.100.0.1:3

*> [3]:[0]:[32]:[10.100.0.1]
                    10.100.0.1                         32768 i
Route Distinguisher: ip 10.100.0.1:4

*> [3]:[0]:[32]:[10.100.0.1]
                    10.100.0.1                         32768 i
Route Distinguisher: ip 10.100.0.1:5

*> [3]:[0]:[32]:[10.100.0.1]
                    10.100.0.1                         32768 i
Route Distinguisher: ip 10.100.0.1:6

*> [3]:[0]:[32]:[10.100.0.1]
                    10.100.0.1                         32768 i
Route Distinguisher: ip 10.100.0.2:2

*> [3]:[0]:[32]:[10.100.0.2]
                    10.100.0.2                             0 65002 i
*  [3]:[0]:[32]:[10.100.0.2]
                    10.100.0.2                             0 65001 65002
Route Distinguisher: ip 10.100.0.2:3

*> [3]:[0]:[32]:[10.100.0.2]
                    10.100.0.2                             0 65002 i
*  [3]:[0]:[32]:[10.100.0.2]
                    10.100.0.2                             0 65001 65002
Route Distinguisher: ip 10.100.0.2:4

*> [3]:[0]:[32]:[10.100.0.2]
                    10.100.0.2                             0 65002 i
*  [3]:[0]:[32]:[10.100.0.2]
                    10.100.0.2                             0 65001 65002

Displayed 10 out of 10 total prefixes

Signed-off-by: Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
5 years agotools: add lints for unsafe functions
Quentin Young [Wed, 8 May 2019 15:46:29 +0000 (15:46 +0000)]
tools: add lints for unsafe functions

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoconfigure: Update to newer version
Donald Sharp [Wed, 8 May 2019 13:53:59 +0000 (09:53 -0400)]
configure: Update to newer version

We've pulled the next stabilization branch

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4286 from vishaldhingra/show_expanded
Donald Sharp [Wed, 8 May 2019 11:56:00 +0000 (07:56 -0400)]
Merge pull request #4286 from vishaldhingra/show_expanded

bgpd : lcommlist not shows the standard and expanded conf. correctly.

5 years agobgpd : lcommlist not shows the standard and expanded conf. correctly.
vishaldhingra [Wed, 8 May 2019 04:12:03 +0000 (21:12 -0700)]
bgpd : lcommlist not shows the standard and expanded conf. correctly.

lcommunity_list_show uses the wrong macro to calculate the style.
Use the correct one LARGE_COMMUNITY_LIST_STANDARD.

Signed-off-by: vishaldhingra<vdhingra@vmware.com>
5 years agodoc: Modify documentation to reflect new configure changes
Dinesh Dutt [Wed, 8 May 2019 01:03:25 +0000 (21:03 -0400)]
doc: Modify documentation to reflect new configure changes

This is the document changes to reflect the configure option
making `terminal` optional.

Signed-off-by: Dinesh Dutt <dd.ps4u@gmail.com>
5 years agolib, vtysh: Make archaic "terminal" optional in configure command
Dinesh Dutt [Wed, 8 May 2019 01:00:34 +0000 (21:00 -0400)]
lib, vtysh: Make archaic "terminal" optional in configure command

The 'configure terminal' command is a bit redundant, so make
the terminal portion optional.

Signed-off-by: Dinesh Dutt <dd.ps4u@gmail.com>
5 years agoMerge pull request #4280 from qlyoung/remove-yang-strreplace-func
Renato Westphal [Tue, 7 May 2019 21:52:16 +0000 (18:52 -0300)]
Merge pull request #4280 from qlyoung/remove-yang-strreplace-func

lib: remove str_replace function

5 years agoMerge pull request #4277 from rtrlib/2019-05-07-master-bugfix
Quentin Young [Tue, 7 May 2019 20:54:50 +0000 (16:54 -0400)]
Merge pull request #4277 from rtrlib/2019-05-07-master-bugfix

RPKI fixes/improvements

5 years agoMerge pull request #4082 from opensourcerouting/grpc-nb-plugin
Quentin Young [Tue, 7 May 2019 20:53:17 +0000 (16:53 -0400)]
Merge pull request #4082 from opensourcerouting/grpc-nb-plugin

gRPC northbound plugin

5 years agoMerge pull request #4215 from Orange-OpenSource/TE
Quentin Young [Tue, 7 May 2019 20:41:20 +0000 (16:41 -0400)]
Merge pull request #4215 from Orange-OpenSource/TE

ospfd: Correct Link-ID and Remote IP for TE LSA

5 years agolib: remove str_replace function
Quentin Young [Tue, 7 May 2019 17:53:23 +0000 (17:53 +0000)]
lib: remove str_replace function

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #4273 from donaldsharp/doc_zebra_command
Sri Mohana Singamsetty [Tue, 7 May 2019 16:30:09 +0000 (09:30 -0700)]
Merge pull request #4273 from donaldsharp/doc_zebra_command

doc: Add a couple of missed `show zebra ...` comamnds to doc

5 years agoMerge pull request #4270 from opensourcerouting/libyang-compat
Lou Berger [Tue, 7 May 2019 15:07:39 +0000 (11:07 -0400)]
Merge pull request #4270 from opensourcerouting/libyang-compat

lib, yang: disable libyang custom user types temporarily

5 years agobgpd: fix rpki module build without ssh support
Marcel Röthke [Tue, 7 May 2019 15:00:30 +0000 (17:00 +0200)]
bgpd: fix rpki module build without ssh support

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
5 years agobgpd: add missing newline to a warning message in the rpki module
Marcel Röthke [Tue, 7 May 2019 14:59:28 +0000 (16:59 +0200)]
bgpd: add missing newline to a warning message in the rpki module

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
5 years agobfd: add bfdd_privs to the bglobal structure
Philippe Guibert [Wed, 24 Apr 2019 09:10:27 +0000 (11:10 +0200)]
bfd: add bfdd_privs to the bglobal structure

this structure contains the bfdd_privs structure in charge of the
privilege settings. The initialisation has moved a bit, in order that
the preinit settings are done.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agodoc: change bfd show commands with vrfname keyword
Philippe Guibert [Tue, 16 Apr 2019 12:27:10 +0000 (14:27 +0200)]
doc: change bfd show commands with vrfname keyword

now that bfd show commands have changed, update documentation so as to
reflect how to use vrf keyword in the show bfd commands.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobfdd: show bfd [vrf NAME] peer command change
Philippe Guibert [Tue, 16 Apr 2019 12:22:56 +0000 (14:22 +0200)]
bfdd: show bfd [vrf NAME] peer command change

the vrf keyword is possible through show bfd command. However, there is
a change with previous version, since that show command was accepting
vrf keyword, only after peer keyword. Now, the vrf keyword is accepted,
but before peer keyword.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobfdd: add show bfd [vrf NAME] counters command
Philippe Guibert [Tue, 16 Apr 2019 12:18:12 +0000 (14:18 +0200)]
bfdd: add show bfd [vrf NAME] counters command

that command permits to filter bfd peer counter contexts per vrf.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobfdd: add show bfd [vrf NAME] peers command
Philippe Guibert [Tue, 16 Apr 2019 12:05:49 +0000 (14:05 +0200)]
bfdd: add show bfd [vrf NAME] peers command

this command permits to filter among the list of bfd peers which one is
to be displayed.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobfdd: avoid creating duplicate peer contexts
Philippe Guibert [Thu, 11 Apr 2019 11:29:47 +0000 (13:29 +0200)]
bfdd: avoid creating duplicate peer contexts

when configuring bfd peers, some parameters may or may not be taken into
account to search for a previous context. This has as consequence that
the result is different with the order of vty commands:

bfd
peer 4.5.6.7 vrf AAAA local-address 1.2.3.5
end
peer 4.5.6.7 vrf AAAA   <--- should not create new session
end

Similarly, the user thinks it has overwritten some key parameters like
local address, whereas it is wrong.
here, some informational message should be present.

bfd
peer 4.5.6.7 vrf AAAA
end
peer 4.5.6.7 vrf AAAA local-address 1.2.3.5
<--- should inform that the key lookup 1.2.3.5 is wrong
end

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agodoc: update bfd documentation
Philippe Guibert [Wed, 10 Apr 2019 14:20:37 +0000 (16:20 +0200)]
doc: update bfd documentation

add a bfd vrf example. explain that it is possible to use both interface
and vrf keyword.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobfd-vrf_topo1: add bfd test on a vrf netns
Philippe Guibert [Wed, 10 Apr 2019 14:14:22 +0000 (16:14 +0200)]
bfd-vrf_topo1: add bfd test on a vrf netns

some testing is available on testing bfd feature based on a bgp vrf
instance.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobfdd: do not insert obs entry in the list, once disabled
Philippe Guibert [Thu, 28 Mar 2019 06:40:20 +0000 (07:40 +0100)]
bfdd: do not insert obs entry in the list, once disabled

the bfd entry has not to be inserted in the obs list again.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobfdd: check bfd on upon interface presence from separate vrf
Philippe Guibert [Tue, 26 Mar 2019 14:02:00 +0000 (15:02 +0100)]
bfdd: check bfd on upon interface presence from separate vrf

if a separate vrf detects a new interface, then some bfd sessions may be
run.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobfdd: upon vrf enable/disable, update bs and obs list
Philippe Guibert [Tue, 26 Mar 2019 13:48:13 +0000 (14:48 +0100)]
bfdd: upon vrf enable/disable, update bs and obs list

parse observer list, and update bs context if vrf pointer is not yet populated.
this is helpful for validation, but also will permit bfd to send
notification to remote daemon.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobgp, ospfd, ospf6d, pimd, lib, isisd: add bfd_client_sendmsg vrf_id
Philippe Guibert [Tue, 26 Mar 2019 13:29:13 +0000 (14:29 +0100)]
bgp, ospfd, ospf6d, pimd, lib, isisd: add bfd_client_sendmsg vrf_id

vrf_id parameter is added to the api of bfd_client_sendmsg().
this permits being registered to bfd from a separate vrf.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobfdd: register to interfaces from other vrfs
Philippe Guibert [Tue, 26 Mar 2019 11:13:38 +0000 (12:13 +0100)]
bfdd: register to interfaces from other vrfs

registration for new interfaces is done.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobfdd, zebra: pass the vrf identifier between zebra and bfdd
Philippe Guibert [Tue, 26 Mar 2019 09:54:09 +0000 (10:54 +0100)]
bfdd, zebra: pass the vrf identifier between zebra and bfdd

messages from daemons to bfd daemons go through zebra. zebra reuses the
vrf identifier to send messages to bfd.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobfdd: socket handling per vrf context
Philippe Guibert [Tue, 26 Mar 2019 09:23:18 +0000 (10:23 +0100)]
bfdd: socket handling per vrf context

sockets are created foreach network namespace context enabled.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>