]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
4 years agoMerge pull request #4650 from pguibert6WIND/show_ip_route_table_all
Russ White [Tue, 30 Jul 2019 15:18:10 +0000 (11:18 -0400)]
Merge pull request #4650 from pguibert6WIND/show_ip_route_table_all

zebra: add show ip route all command to dump all unicast tables

4 years agoMerge pull request #4750 from dslicenc/bgp-remove-replace-as
Russ White [Tue, 30 Jul 2019 15:12:56 +0000 (11:12 -0400)]
Merge pull request #4750 from dslicenc/bgp-remove-replace-as

bgpd: stop removing and replacing private asn if it matches the peer

4 years agoMerge pull request #4746 from donaldsharp/zebra_rib_improvements
Russ White [Tue, 30 Jul 2019 15:11:41 +0000 (11:11 -0400)]
Merge pull request #4746 from donaldsharp/zebra_rib_improvements

Zebra rib improvements

4 years agoMerge pull request #4732 from qlyoung/ercode-oncec
Russ White [Tue, 30 Jul 2019 14:58:45 +0000 (10:58 -0400)]
Merge pull request #4732 from qlyoung/ercode-oncec

vtysh: only show error codes once

4 years agoMerge pull request #4721 from dslicenc/bgpd-fix-nexthop
Russ White [Tue, 30 Jul 2019 14:50:32 +0000 (10:50 -0400)]
Merge pull request #4721 from dslicenc/bgpd-fix-nexthop

bgpd: encode implicit next-hop-self in some vrf route leaking scenarios

4 years agoMerge pull request #4649 from ton31337/feature/access-list_sequence
Russ White [Tue, 30 Jul 2019 14:40:42 +0000 (10:40 -0400)]
Merge pull request #4649 from ton31337/feature/access-list_sequence

filter: Introduce sequence number for access-list

4 years agoMerge pull request #4582 from donaldsharp/do_not_warn
Russ White [Tue, 30 Jul 2019 14:38:25 +0000 (10:38 -0400)]
Merge pull request #4582 from donaldsharp/do_not_warn

bgpd: Do not display to end user not found afi/safi's

4 years agoMerge pull request #4698 from opensourcerouting/frr-reload-fix-misc-cmds
Donald Sharp [Tue, 30 Jul 2019 14:11:04 +0000 (10:11 -0400)]
Merge pull request #4698 from opensourcerouting/frr-reload-fix-misc-cmds

frr-reload.py: fix reload with different settings

4 years agoMerge pull request #4560 from lkrishnamoor/filter_vni_changes_jun
Donald Sharp [Tue, 30 Jul 2019 13:41:22 +0000 (09:41 -0400)]
Merge pull request #4560 from lkrishnamoor/filter_vni_changes_jun

bgp: Route-map VNI in-filter filters out all the routes for EVPN

4 years agoMerge pull request #4751 from qlyoung/fix-vrrp-iface-del-badfix
Mark Stapp [Tue, 30 Jul 2019 13:38:59 +0000 (09:38 -0400)]
Merge pull request #4751 from qlyoung/fix-vrrp-iface-del-badfix

vrrpd: set interface ifindex to internal upon interface deletion

4 years agovrrpd: set interface ifindex to internal upon interface deletion
Quentin Young [Mon, 29 Jul 2019 18:16:14 +0000 (18:16 +0000)]
vrrpd: set interface ifindex to internal upon interface deletion

That fix line should have been in a different place.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agobgpd: stop removing and replacing private asn if it matches the peer
Don Slice [Thu, 25 Jul 2019 15:35:06 +0000 (11:35 -0400)]
bgpd: stop removing and replacing private asn if it matches the peer

Problems reported that if multiple peers have "remove-private-AS
replace-AS" with each other and all are using private asns, the as-path
gets hosed and continues to grow when a prefix is removed.  This fix
disallows removing and replacing the private asn if it matches the
peer's ASN so that normal as-path loop prevention will operate correctly.

Ticket: CM-25489
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
4 years agozebra, tests: Remove ROUTE_ENTRY_NEXTHOPS_CHANGED
Donald Sharp [Mon, 29 Jul 2019 18:53:58 +0000 (14:53 -0400)]
zebra, tests: Remove ROUTE_ENTRY_NEXTHOPS_CHANGED

The flag ROUTE_ENTRY_NEXTHOPS_CHANGED is only ever set or unset.
Since this flag is not used for anything useful, remove from system.

By changing this flag we have re-ordered `internalStatus' of json
output of zebra rib routes.  Go through and fix up tetsts to
use the new values.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agovtysh: style nits for error code cli handler
Quentin Young [Mon, 29 Jul 2019 17:19:05 +0000 (17:19 +0000)]
vtysh: style nits for error code cli handler

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agovtysh: only show error codes once
Quentin Young [Tue, 8 Jan 2019 21:33:49 +0000 (21:33 +0000)]
vtysh: only show error codes once

When using `show error` commands, show errors shared between multiple
daemons only once.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #4728 from ton31337/fix/next-hop-self_force_alias_for_ipv6
Quentin Young [Mon, 29 Jul 2019 16:41:55 +0000 (12:41 -0400)]
Merge pull request #4728 from ton31337/fix/next-hop-self_force_alias_for_ipv6

bgpd: Add hidden `next-hop-self all` for all address families

4 years agoMerge pull request #4736 from dslicenc/zebra-skip-queued-entry
Mark Stapp [Mon, 29 Jul 2019 16:31:03 +0000 (12:31 -0400)]
Merge pull request #4736 from dslicenc/zebra-skip-queued-entry

zebra: skip queued entries when resolving nexthop

4 years agoMerge pull request #4740 from opensourcerouting/omgwtfbbq
Donald Sharp [Mon, 29 Jul 2019 16:14:39 +0000 (12:14 -0400)]
Merge pull request #4740 from opensourcerouting/omgwtfbbq

lib: OMGWTFBBQ × 2

4 years agozebra: Remove repeated enqueueing of system routes for rethinking
Donald Sharp [Mon, 29 Jul 2019 15:36:03 +0000 (11:36 -0400)]
zebra: Remove repeated enqueueing of system routes for rethinking

The code as written before this code change point would enqueue
every system route type to be refigured when we have an
interface event.  I believe this was to originally handle bugs
in the way nexthop tracking was handled, mainly that if you keep
asking the question you'll eventually get the right answer.

Modify the code to not do this, we have fixed nexthop tracking
to not be so brain dead and to know when it needs to refigure
a route that it is tracking.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Fix route replace v4 semantics with new system route
Donald Sharp [Mon, 29 Jul 2019 15:10:25 +0000 (11:10 -0400)]
zebra: Fix route replace v4 semantics with new system route

When a new system route comes in and we have a pre-existing
non-system route we are not deleting the current system
route from the linux kernel.

Modify the code such that when a route replace is sent
to the kernel with a new route as a system route and
the old route as a non-system route do a delete of
the old route so it is no longer in the kernel.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4729 from idryzhov/master
Donald Sharp [Mon, 29 Jul 2019 14:14:50 +0000 (10:14 -0400)]
Merge pull request #4729 from idryzhov/master

vtysh: send vtysh_quit_nexthop_group to pbrd and sharpd

4 years agolib: fix prefix_copy() for clang-SA
David Lamparter [Mon, 29 Jul 2019 13:49:49 +0000 (15:49 +0200)]
lib: fix prefix_copy() for clang-SA

https://bugs.llvm.org/show_bug.cgi?id=42811

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agoMerge pull request #4737 from opensourcerouting/bgp-path-attr-fix
Donald Sharp [Mon, 29 Jul 2019 12:57:06 +0000 (08:57 -0400)]
Merge pull request #4737 from opensourcerouting/bgp-path-attr-fix

topotest: fix bgp-path-attributes-topology

4 years agoMerge pull request #4735 from dslicenc/bgp-clear-interface
Donatas Abraitis [Mon, 29 Jul 2019 08:30:22 +0000 (11:30 +0300)]
Merge pull request #4735 from dslicenc/bgp-clear-interface

bgpd: solve invalid error message when clearing interface peer

4 years agolib: fix misplaced brace in typesafe lists
David Lamparter [Sun, 28 Jul 2019 07:27:03 +0000 (09:27 +0200)]
lib: fix misplaced brace in typesafe lists

OMGWTFBBQ no. 2...

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib: use some more transparent unions for prefixes
David Lamparter [Sun, 28 Jul 2019 07:26:21 +0000 (09:26 +0200)]
lib: use some more transparent unions for prefixes

... so we can pass prefix_ipv4/prefix_ipv6 in.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib: fix prefix_cmp() return values
David Lamparter [Sun, 28 Jul 2019 07:24:00 +0000 (09:24 +0200)]
lib: fix prefix_cmp() return values

OMGWTFBBQ

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agotopotest: fix bgp-path-attributes-topology
Rafael Zalamena [Fri, 26 Jul 2019 20:32:48 +0000 (17:32 -0300)]
topotest: fix bgp-path-attributes-topology

The first RIB check wants to assert that we don't have the r7's routes
in r1, so right after that code the routers r2 and r3 are configured
then `verify_rib` is called again to check for those routes.

This test never passed, but it didn't cause failures because of the
`try`/`except`.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agozebra: skip queued entries when resolving nexthop
Don Slice [Mon, 1 Jul 2019 17:17:46 +0000 (17:17 +0000)]
zebra: skip queued entries when resolving nexthop

Problem reported where certain routes were not being passed on to
clients if they were operated on while still queued for kernel
installation.   Changed it to defer working on entries that were
queued to dplane so we could operate on them after getting an
answer back from kernel installatino.

Ticket: CM-25480
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
4 years agobgpd: solve invalid error message when clearing interface peer
Don Slice [Wed, 24 Jul 2019 15:52:03 +0000 (15:52 +0000)]
bgpd: solve invalid error message when clearing interface peer

Problem reported that if "clear bgp swp1" is issued, an error
message is received saying the name or address is malformed. This
was because of a change in bgp_vty.c that removed the storing
and passing of the interface name for this command. Commit that
caused the problem was ac5dec7e88ce2f8cd2943bb61437046718fb34c2.

Ticket: CM-25737
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
4 years agoMerge pull request #4730 from idryzhov/fix
Quentin Young [Thu, 25 Jul 2019 15:57:07 +0000 (11:57 -0400)]
Merge pull request #4730 from idryzhov/fix

lib: fix missing M:A:C to X:X:X:X:X:X changes

4 years agolib: fix missing M:A:C to X:X:X:X:X:X changes
Igor Ryzhov [Thu, 25 Jul 2019 12:35:46 +0000 (15:35 +0300)]
lib: fix missing M:A:C to X:X:X:X:X:X changes

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agobgpd: Add hidden `next-hop-self all` for all address families
Donatas Abraitis [Wed, 24 Jul 2019 16:05:51 +0000 (19:05 +0300)]
bgpd: Add hidden `next-hop-self all` for all address families

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agovtysh: send vtysh_quit_nexthop_group to pbrd and sharpd
Igor Ryzhov [Thu, 25 Jul 2019 08:59:27 +0000 (11:59 +0300)]
vtysh: send vtysh_quit_nexthop_group to pbrd and sharpd

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoMerge pull request #4691 from donaldsharp/pim_upstream_ref
Jafar Al-Gharaibeh [Wed, 24 Jul 2019 20:32:15 +0000 (15:32 -0500)]
Merge pull request #4691 from donaldsharp/pim_upstream_ref

Pim upstream ref

4 years agoMerge pull request #4725 from idryzhov/master
Quentin Young [Wed, 24 Jul 2019 15:19:19 +0000 (11:19 -0400)]
Merge pull request #4725 from idryzhov/master

vtysh: send "exit-vrf" command to staticd

4 years agovtysh: send "exit-vrf" command to staticd
Igor Ryzhov [Wed, 24 Jul 2019 12:41:20 +0000 (15:41 +0300)]
vtysh: send "exit-vrf" command to staticd

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agofrr-reload.py: fix reload with different settings
Rafael Zalamena [Wed, 17 Jul 2019 13:09:25 +0000 (10:09 -0300)]
frr-reload.py: fix reload with different settings

Add `allow-external-route-update` and `domainname` to the one line
context list, otherwise reload will fail when those commands show up in
the running configuration.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoMerge pull request #4708 from opensourcerouting/topotest-common-improvement
Quentin Young [Tue, 23 Jul 2019 20:47:10 +0000 (16:47 -0400)]
Merge pull request #4708 from opensourcerouting/topotest-common-improvement

topotest: attempt to stabilize CI system

4 years agobgpd: encode implicit next-hop-self in some vrf route leaking scenarios
Don Slice [Wed, 17 Jul 2019 17:19:08 +0000 (13:19 -0400)]
bgpd: encode implicit next-hop-self in some vrf route leaking scenarios

Problem reported that when vrf route-leaking between an unnumbered
peer in one vrf to a numbered peer in another vrf, the nexthop
attribute was missing from the update, causing the session to fail.
determined that we needed to expand the  mechanism for verifying if
the route has been learned in the other vrf without an ipv4 nexthop.

Ticket: CM-25610
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
4 years agotopotest: improve common_config.py
Rafael Zalamena [Mon, 22 Jul 2019 16:16:35 +0000 (13:16 -0300)]
topotest: improve common_config.py

Don't wait for `True` results when the return type is a string.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agotopotest: add new run_and_expect variant
Rafael Zalamena [Mon, 22 Jul 2019 16:12:08 +0000 (13:12 -0300)]
topotest: add new run_and_expect variant

The new `run_and_expect` variant - called `run_and_expect_type` - tests
the return value type of the test function and optionally the return
value.

Now we can implement tests from test functions that return different
return types.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agotopotest: improve reliability of `verify_rib`
Rafael Zalamena [Wed, 17 Jul 2019 21:39:03 +0000 (18:39 -0300)]
topotest: improve reliability of `verify_rib`

Attempt to run the function multiple times to make sure we got the
result we expected. This is a middle ground between big sleeps and short
test intervals.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agotopotest/bgp_l3vpn_to_bgp_vrf: stabilize test
Rafael Zalamena [Thu, 18 Jul 2019 14:30:42 +0000 (11:30 -0300)]
topotest/bgp_l3vpn_to_bgp_vrf: stabilize test

Increase wait times between commands execution to help avoid bogus test
failures.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agotopotest: adjust luCommand to accept wait_time
Rafael Zalamena [Thu, 18 Jul 2019 14:29:33 +0000 (11:29 -0300)]
topotest: adjust luCommand to accept wait_time

Allow users of `luCommand` to specify wait time between commands
execution and simplify the `wait` method implementation.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agotopotest: fix Lou's framework command wait
Rafael Zalamena [Thu, 18 Jul 2019 13:56:50 +0000 (10:56 -0300)]
topotest: fix Lou's framework command wait

Fix two main issues:

  * Don't use float to figure out if we spent the time user asked;
  * Don't depend on system clock to find we reached the end of time;

The fix is basically pre caculating the amount of wait cycles we are
going to peform and use a counter.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoMerge pull request #4699 from donaldsharp/tests_do_not_faile_me
Martin Winter [Mon, 22 Jul 2019 16:55:26 +0000 (18:55 +0200)]
Merge pull request #4699 from donaldsharp/tests_do_not_faile_me

Add more debugging to ci log files to figure out what is going on.

4 years agobgpd: Route-map VNI in-filter filters out all the routes for EVPN
Lakshman Krishnamoorthy [Wed, 19 Jun 2019 21:29:34 +0000 (14:29 -0700)]
bgpd: Route-map VNI in-filter filters out all the routes for EVPN

Issue1: When a vni in-filter eg:"neighbor X.X.X.X route-map RM-VNI-FILTER in"
is configured under evpn address-family, all the received routes are dropped
regardless of whether the route has a matching vni or not.
(Where RM-VNI-FILTER contains "match evpn vni 100")

Issue2: Routes with 2 labels are not filtered correctly

Issue3: This filter should not get applied for MPLS routes. For MPLS routes,
we need route-map to handle a 3rd state besides match/nomatch called: noop.

Fix1: The handler bgp_update() that services the received route ignored the
route's label while deciding whether to filter it or not.
As part of the fix, the handler now uses the label info to make the
decision about whether to filter the route or not.

Fix2: route_match_vni() now tries to match both the labels within the route

Fix3: route_match_vni() should return noop when it encounters an mpls based
route. For this, route_map library should handle this 3rd state: RMAP_NOOP.

Related fix : Extract tunnel type
This fix relies on PR 4314 #4314 to extract the tunnel type from bgp extended
communities. The information about the route's tunnel type (vxlan or mpls)
is needed to apply "match evpn vni xx" rule.  This rule is applicable to
vxlan routes, and should exit safely for mpls based evpn routes.

Signed-off-by: Lakshman Krishnamoorthy lkrishnamoor@vmware.com
4 years agolib: Introducing a 3rd state for route-map match cmd: RMAP_NOOP
Lakshman Krishnamoorthy [Wed, 19 Jun 2019 21:04:36 +0000 (14:04 -0700)]
lib: Introducing a 3rd state for route-map match cmd: RMAP_NOOP

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>
4 years agoMerge pull request #4688 from qlyoung/alpine-docker-rpki
Donatas Abraitis [Fri, 19 Jul 2019 19:21:29 +0000 (22:21 +0300)]
Merge pull request #4688 from qlyoung/alpine-docker-rpki

docker: build alpine docker w/ rpki enabled

4 years agoMerge pull request #4695 from donaldsharp/zebra_zapi_msgs
Mark Stapp [Thu, 18 Jul 2019 13:38:12 +0000 (09:38 -0400)]
Merge pull request #4695 from donaldsharp/zebra_zapi_msgs

Zebra zapi msgs - improve debugs

4 years agopimd: Always create upstream reference when adding channel oil
Donald Sharp [Tue, 9 Jul 2019 00:00:43 +0000 (00:00 +0000)]
pimd: Always create upstream reference when adding channel oil

Modify the code to create an upstream reference whenever the code
creates an channel_oil via the pim_mroute.c code.  This code also
starts a keep alive timer to clean up the reference if we do
nothing with it after the normal time.

I've left alone the source->channel_oil creation because these
are kept and tracked independently already.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agopimd: pim_upstream *always* creates a channel_oil
Donald Sharp [Mon, 8 Jul 2019 23:57:01 +0000 (19:57 -0400)]
pimd: pim_upstream *always* creates a channel_oil

Modify code base so that pim_upstream *always* creates a channel_oil
and as such we do not need to create it later or play other games.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agopimd: Add pim_channel_oil_change_iif
Donald Sharp [Mon, 8 Jul 2019 23:46:01 +0000 (19:46 -0400)]
pimd: Add pim_channel_oil_change_iif

Add a function that allows you to modify the channel oil's incoming
interface and to appropriately install/remove it from the kernel.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoTest: Add back a bit more debugging to see what is going on
Donald Sharp [Wed, 17 Jul 2019 15:23:25 +0000 (11:23 -0400)]
Test: Add back a bit more debugging to see what is going on

All debug logging has been thrown to the floor in this loop.
Add it back in and additionally add a bit more debugging to
know what is going on.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4704 from mjstapp/fix_ip2str_const
Donald Sharp [Wed, 17 Jul 2019 22:59:08 +0000 (18:59 -0400)]
Merge pull request #4704 from mjstapp/fix_ip2str_const

lib: use const in ipaddr2str

4 years agolib: use const in ipaddr2str
Mark Stapp [Wed, 17 Jul 2019 20:59:41 +0000 (16:59 -0400)]
lib: use const in ipaddr2str

Use const more

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #4680 from donaldsharp/test_longer
Mark Stapp [Wed, 17 Jul 2019 17:34:51 +0000 (13:34 -0400)]
Merge pull request #4680 from donaldsharp/test_longer

tests: Topotests are not giving sufficient time to propagate data

4 years agopbrd: Do not install nexthop group until we have nexthops
Donald Sharp [Wed, 17 Jul 2019 00:41:01 +0000 (20:41 -0400)]
pbrd: Do not install nexthop group until we have nexthops

The creation of a nexthop group results in a callback with
just the nexthop group name.  At this point in time we
do not have any nexthop information so there is nothing to
install.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Print out client who sent us bad data
Donald Sharp [Wed, 17 Jul 2019 00:24:26 +0000 (20:24 -0400)]
zebra: Print out client who sent us bad data

A client was sending zebra a route with no nexthops!  Update the
error message to tell us *Which* daemon is doing this.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Guard debug messages
Donald Sharp [Wed, 17 Jul 2019 00:17:05 +0000 (20:17 -0400)]
zebra: Guard debug messages

A bunch of debug code has snuck in that is unguarded.
Fix this.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4685 from chiragshah6/ospf_vrf_dev
Russ White [Tue, 16 Jul 2019 23:50:23 +0000 (19:50 -0400)]
Merge pull request #4685 from chiragshah6/ospf_vrf_dev

ospfd: no router ospf crash fix

4 years agoMerge pull request #4669 from opensourcerouting/bfd-isis-northbound
Russ White [Tue, 16 Jul 2019 13:17:51 +0000 (09:17 -0400)]
Merge pull request #4669 from opensourcerouting/bfd-isis-northbound

isisd: migrate BFD command to northbound

4 years agoMerge pull request #4684 from donaldsharp/various_fixes
Russ White [Tue, 16 Jul 2019 13:14:30 +0000 (09:14 -0400)]
Merge pull request #4684 from donaldsharp/various_fixes

Various fixes

4 years agoMerge pull request #4635 from AnuradhaKaruppiah/evpn-pim-replay
Jafar Al-Gharaibeh [Mon, 15 Jul 2019 20:40:12 +0000 (15:40 -0500)]
Merge pull request #4635 from AnuradhaKaruppiah/evpn-pim-replay

pimd, zebra: request for replay of VxLAN SG entries on pimd startup

4 years agoMerge pull request #4687 from qlyoung/fix-test-ntop-strlen-assert
Mark Stapp [Mon, 15 Jul 2019 19:25:09 +0000 (15:25 -0400)]
Merge pull request #4687 from qlyoung/fix-test-ntop-strlen-assert

tests: remove strlen assert in inet_ntop tests

4 years agodocker: build alpine docker w/ rpki enabled
Quentin Young [Mon, 15 Jul 2019 17:18:30 +0000 (17:18 +0000)]
docker: build alpine docker w/ rpki enabled

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agotests: remove strlen assert in inet_ntop tests
Quentin Young [Mon, 15 Jul 2019 17:16:30 +0000 (17:16 +0000)]
tests: remove strlen assert in inet_ntop tests

Some platform libc's like to render some v6 addresses as v4 mapped where
others render the same addresses as v6 with leading zeroes. Binary
equivalence checks pass but strlen checks sometimes fail here. Remove
assert causing the failure.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoospfd: no router ospf crash fix
Chirag Shah [Fri, 12 Jul 2019 02:36:06 +0000 (19:36 -0700)]
ospfd: no router ospf crash fix

no router ospf triggers to cancel all threads
including read/write (receive/send packets) threads,
cleans up resources fd, message queue and data.

Last job of write (packet) thread invoked where the
ospf instance is referenced is not running nor
the socket fd valid.

Write thread callback should check if fd is valid and
ospf instance is running before proceeding to send a
message over socket.

Ticket:CM-20095
Testing Done:

Performed the multiple 'no router ospf' with the fix
in topology where the crash was seen.
Post fix the crash is not observed.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agovtysh: Make nexthop-group submode line unique
Donald Sharp [Sat, 13 Jul 2019 19:37:02 +0000 (15:37 -0400)]
vtysh: Make nexthop-group submode line unique

Now that multiple daemons understand nexthop-groups, we need
to ensure that vtysh doesn't double print out the individual
nexthops that are part of a nexthop-group.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Modify way we query for inteface speed
Donald Sharp [Sat, 13 Jul 2019 19:28:50 +0000 (15:28 -0400)]
zebra: Modify way we query for inteface speed

Initial commit of understanding interface speed changes
on startup was this commit:

dc7b3caefbd8baccb7fc3787a774e78d1a96636f

Effectively we had encountered situations on system startup
where the interface speed for a device was not properly setup
when zebra learns about the interface ( Imagine a bond being
brought up and the controlling software creating the bond
is not fast given system load, the bond's speed changes
upwards for each interface added ).

The initial workup on this was to allow a 15 second window
and then just reread the interface speed.  We've since noticed
that under heavy system load on startup this is not always sufficient.

So modify the code to wait the 15 seconds and then check the interfaces
speed.  If the interfaces speed is still MAX_UINT32T or it has changed
let's wait a bit longer and try again.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4658 from chiragshah6/ospf_vrf_dev
Jafar Al-Gharaibeh [Fri, 12 Jul 2019 22:30:42 +0000 (17:30 -0500)]
Merge pull request #4658 from chiragshah6/ospf_vrf_dev

ospfd: fix various show ip ospf neighbor json commands

4 years agoisisd: improvements based on feedback
Rafael Zalamena [Fri, 12 Jul 2019 20:24:17 +0000 (17:24 -0300)]
isisd: improvements based on feedback

  * Remove sanity checks that are already done by northbound;
  * Show error message on circuit absence;
  * Use a better idiom for the configuration display code;

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoMerge pull request #4660 from manuhalo/label_manager_fixes
Renato Westphal [Fri, 12 Jul 2019 20:09:33 +0000 (17:09 -0300)]
Merge pull request #4660 from manuhalo/label_manager_fixes

Label manager improvements + refactor

4 years agoMerge pull request #4664 from sworleys/Zvrf-Debug-Guard
Renato Westphal [Fri, 12 Jul 2019 19:40:50 +0000 (16:40 -0300)]
Merge pull request #4664 from sworleys/Zvrf-Debug-Guard

zebra: Add a conditional guard if zvrf lookup fail

4 years agoMerge pull request #4325 from sworleys/Order-Recv-Nexthops
Renato Westphal [Fri, 12 Jul 2019 18:25:37 +0000 (15:25 -0300)]
Merge pull request #4325 from sworleys/Order-Recv-Nexthops

zebra: Modify zebra to order nexthops received

4 years agoMerge pull request #4674 from mjstapp/fix_mono_ctime
Quentin Young [Thu, 11 Jul 2019 20:05:03 +0000 (16:05 -0400)]
Merge pull request #4674 from mjstapp/fix_mono_ctime

lib,zebra: avoid use of ctime in monotime api

4 years agotests: Topotests are not giving sufficient time to propagate data
Donald Sharp [Thu, 11 Jul 2019 18:40:31 +0000 (14:40 -0400)]
tests: Topotests are not giving sufficient time to propagate data

A bunch of our current tests setup data and redistribute
it across some bgp connections and then test for it
being there.  A delay of 2 seconds that was initially
there to ensure that the data has propagated does not
actually work all the time when you have a loaded
virtualized environment.

Make the sleep 10 seconds.  I agree this is not the ideal
solution but I would rather get the damn tests up and running
again.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4670 from chiragshah6/evpn_dev1
Sri Mohana Singamsetty [Wed, 10 Jul 2019 20:39:26 +0000 (13:39 -0700)]
Merge pull request #4670 from chiragshah6/evpn_dev1

bgpd: fix show bgp l2vpn evpn route json

4 years agoMerge pull request #4675 from mgsmith1000/bgp_restart_timer_inbound
Donald Sharp [Wed, 10 Jul 2019 20:27:24 +0000 (16:27 -0400)]
Merge pull request #4675 from mgsmith1000/bgp_restart_timer_inbound

bgpd: honor max prefix timer on inbound sessions

4 years agolib,zebra: avoid use of ctime in monotime api
Mark Stapp [Wed, 10 Jul 2019 14:16:59 +0000 (10:16 -0400)]
lib,zebra: avoid use of ctime in monotime api

Replace a call to ctime with ctime_r in the monotime module;
update the callers of the monotime api.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agotests: remove lm-proxy-topo1 topotest
Emanuele Di Pascale [Wed, 10 Jul 2019 13:50:22 +0000 (15:50 +0200)]
tests: remove lm-proxy-topo1 topotest

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agoldpd: set default instance to 1
Emanuele Di Pascale [Wed, 10 Jul 2019 13:20:14 +0000 (15:20 +0200)]
ldpd: set default instance to 1

LDP opens two sockets to zebra, one through ldpd (always using
instance 0) and another through lde (using whatever instance
was set through the -n command line parameter). If no instance
was set, both connections would use the same protocol and instance,
making it impossible to distinguish them through zserv_find_client.
This meant that a response to a lm connect would erroneously go to
the wrong process. Fix this by having a default instance value of 1,
in case the user does not specify a different one.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agozebra: label manager refactor
Emanuele Di Pascale [Thu, 27 Jun 2019 08:11:35 +0000 (10:11 +0200)]
zebra: label manager refactor

in order to both streamline the code and allow users to
define their own specialized versions of the LM api handlers,
define hooks for the 4 main primitives offered by the label
manager (i.e. connect, disconnect, get_chunk and release_chunk),
and have the existing code be run in response to a hook_call.
Additionally, have the responses to the requesting daemon be
callable from an external API.

Note that the proxy version of the label manager was a source of
issues and hardly used in practice. With the new hooks, users with
more complex requirements can simply plug in their own code to
handle label distribution remotely, so there is no longer a reason
to maintain this code.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agotests: remove test_lblmgr.c
Emanuele Di Pascale [Fri, 28 Jun 2019 08:01:56 +0000 (10:01 +0200)]
tests: remove test_lblmgr.c

This is not part of the make check tests and it has been broken
for a while, apparently. The way the label manager is coded makes
it very hard to code unit tests, and testing the relay of requests
to an external label manager is probably better done through
a topotest, so remove this.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agolib, zebra: handle failure in get chunk
Emanuele Di Pascale [Thu, 27 Jun 2019 08:59:22 +0000 (10:59 +0200)]
lib, zebra: handle failure in get chunk

when requesting a specific label chunk (e.g. for the SRGB),
it might happen that we cannot get what we want. In this
event, we must be prepared to receive a response with no
label chunk. Without this fix, if the remote label manager
was not able to alloate the chunk we requested, we would
hang indefinitely trying to read data from the stream which
was not there.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agolib, zebra: support label chunk requests for SRGB
Emanuele Di Pascale [Wed, 12 Jun 2019 14:33:12 +0000 (16:33 +0200)]
lib, zebra: support label chunk requests for SRGB

For SRGB, we need to support chunk requests starting at a
specific point in the label space, rather than just asking
for any sufficiently large chunk. To this purpose, we extend
the label manager api to request a chunk with a base value;
if the base is set to 0, the label manager will behave as it
currently does, i.e. fetching the first free chunk big enough
to satisfy the request.

update all the existing calls to get chunks from the label
manager so that they use MPLS_LABEL_BASE_ANY as the base
for the requested chunk

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agobgpd: honor max prefix timer on inbound sessions
Matthew Smith [Tue, 9 Jul 2019 17:59:44 +0000 (12:59 -0500)]
bgpd: honor max prefix timer on inbound sessions

When using the maximum-prefix restart option with a BGP peer,
if the peer exceeds the limit of prefixes, bgpd causes the
connection to be closed and sets a timer. It will not attempt
to connect to that peer until the timer expires. But if the
peer attempts to connect to it before the timer expires, it
accepts the connection and starts exchanging routes again.

When accepting a connection from a peer, reject the connection
if the max prefix restart timer is set.

Signed-off-by: Matthew Smith <mgsmith@netgate.com>
4 years agodoc: add information about 'show ip route [vrf VRF] tables command
Philippe Guibert [Tue, 9 Jul 2019 15:33:26 +0000 (17:33 +0200)]
doc: add information about 'show ip route [vrf VRF] tables command

the documentation of zebra is appended with that command.

PR=61261
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Acked-by: Thibaut Collet <thibaut.collet@6wind.com>
4 years agoospfd: fix show ip ospf neigh json
Chirag Shah [Fri, 5 Jul 2019 22:45:56 +0000 (15:45 -0700)]
ospfd: fix show ip ospf neigh json

Same ospf neigbor can be learnt via multiple
interfaces, ospf detail json only displayed
last instance only.

Fix json output format to contain "neighbors"
keyword, under which to display all neighbors
for a given vrf.

Fix
show ip ospf neighbor detail json
show ip ospf neighbor detail all json
show ip ospf neighbor <intf name> detail json

Ticket:CM-25528
Reviewed By:
Testing Done:

Run the output with JSON formatter and the output
has passed.

switch1# show ip ospf vrf all neighbor detail json
{
  "default":{
    "vrfName":"default",
    "vrfId":0,
    "neighbors":{
      "0.0.0.2":[
        {
          "ifaceAddress":"14.0.0.22",
          "areaId":"0.0.0.0",
          "ifaceName":"Bridge1.510",
          "nbrPriority":1,
          "nbrState":"Full",
          "stateChangeCounter":6,
          "lastPrgrsvChangeMsec":82668,
          "routerDesignatedId":"14.0.0.22",
          "routerDesignatedBackupId":"14.0.0.21",
          "optionsCounter":2,
          "optionsList":"*|-|-|-|-|-|E|-",
          "routerDeadIntervalTimerDueMsec":36195,
          "databaseSummaryListCounter":0,
          "linkStateRequestListCounter":0,
          "linkStateRetransmissionListCounter":0,
          "threadInactivityTimer":"on",
          "threadLinkStateRequestRetransmission":"on",
          "threadLinkStateUpdateRetransmission":"on",
          "peerBfdInfo":{
            "type":"single hop",
            "detectMultiplier":4,
            "rxMinInterval":600,
            "txMinInterval":800,
            "status":"Down",
            "lastUpdate":"0:00:00:29"
          }
        },
        {
          "ifaceAddress":"14.0.0.26",
          "areaId":"0.0.0.0",
          "ifaceName":"Bridge1.511",
          "nbrPriority":1,
          "nbrState":"Full",
          "stateChangeCounter":6,
          "lastPrgrsvChangeMsec":82658,
          "routerDesignatedId":"14.0.0.26",
          "routerDesignatedBackupId":"14.0.0.25",
          "optionsCounter":2,
          "optionsList":"*|-|-|-|-|-|E|-",
          "routerDeadIntervalTimerDueMsec":36196,
          "databaseSummaryListCounter":0,
          "linkStateRequestListCounter":0,
          "linkStateRetransmissionListCounter":0,
          "threadInactivityTimer":"on",
          "threadLinkStateRequestRetransmission":"on",
          "threadLinkStateUpdateRetransmission":"on"
        },
     ]
    }
  }
}

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agobgpd: fix show bgp l2vpn evpn route json
Chirag Shah [Tue, 9 Jul 2019 18:51:46 +0000 (11:51 -0700)]
bgpd: fix show bgp l2vpn evpn route json

PR-4544 has introduced a new filed extended community
in show bgp l2vpn evpn route command.
The header has missed checking json is enabled.

Ticket:CM-25581
Reviewed By:
Testing Done:

TORS1# show bgp l2vpn evpn route json
{
  "27.0.0.15:8":{
    "rd":"27.0.0.15:8",
    "[2]:[0]:[48]:[00:02:00:00:00:0a]":{
      "prefix":"[2]:[0]:[48]:[00:02:00:00:00:0a]",
      "prefixLen":288,
      "paths":[
        [
          {
            "valid":true,
            "bestpath":true,
            "pathFrom":"external",
            "routeType":2,
            "ethTag":0,
            "macLen":48,
            "mac":"00:02:00:00:00:0a",
            "weight":32768,
            "peerId":"(unspec)",
            "aspath":"",
            "path":"",
            "origin":"IGP",
            "extendedCommunity":{
              "string":"ET:8 RT:5550:1002"
            },
            "nexthops":[
              {
                "ip":"27.0.0.15",
                "afi":"ipv4",
                "used":true
              }
            ]
          }
        ]
      ]
    },
   ...
  },
  "numPrefix":187,
  "numPaths":343
}

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agoisisd: fix compilation warning on OpenBSD
Rafael Zalamena [Tue, 9 Jul 2019 16:41:08 +0000 (13:41 -0300)]
isisd: fix compilation warning on OpenBSD

Use different declaration style to fix compilation warning on OpenBSD.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoisisd: migrate BFD command to northbound
Rafael Zalamena [Wed, 12 Jun 2019 18:20:17 +0000 (15:20 -0300)]
isisd: migrate BFD command to northbound

Specify the ISIS BFD command in the YANG model and implement the
northbound callbacks.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agozebra: Add a conditional guard if zvrf lookup fail
Stephen Worley [Tue, 9 Jul 2019 15:10:49 +0000 (11:10 -0400)]
zebra: Add a conditional guard if zvrf lookup fail

Add a conditional to guard against segfaulting on the debug
statement when zvrf lookup fails.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agoMerge pull request #4619 from opensourcerouting/eigrpd-yang
Russ White [Tue, 9 Jul 2019 15:27:02 +0000 (11:27 -0400)]
Merge pull request #4619 from opensourcerouting/eigrpd-yang

yang: import EIGRP YANG model

4 years agoMerge pull request #4609 from ton31337/fix/show_set_comm-list_delete
Quentin Young [Tue, 9 Jul 2019 15:25:10 +0000 (11:25 -0400)]
Merge pull request #4609 from ton31337/fix/show_set_comm-list_delete

bgpd: Show `delete` sub-option for `set [l]comm-list <list> delete`

4 years agoisisd: move old BFD command to fabricd only
Rafael Zalamena [Wed, 12 Jun 2019 18:18:19 +0000 (15:18 -0300)]
isisd: move old BFD command to fabricd only

The `isisd` will receive a northbound version of the BFD command, so
this is the first step to implement it.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoMerge pull request #4437 from opensourcerouting/bfdd-northbound
Russ White [Tue, 9 Jul 2019 15:15:51 +0000 (11:15 -0400)]
Merge pull request #4437 from opensourcerouting/bfdd-northbound

bfdd: migrate to northbound

4 years agoMerge pull request #4088 from opensourcerouting/bump-libyang-requirement-vers
Jafar Al-Gharaibeh [Tue, 9 Jul 2019 14:59:17 +0000 (17:59 +0300)]
Merge pull request #4088 from opensourcerouting/bump-libyang-requirement-vers

build, lib: bump libyang requirement version to >= 0.16.105 (-r3)

4 years agozebra: Modify zebra to order nexthops received
Donald Sharp [Thu, 24 Jan 2019 15:13:22 +0000 (10:13 -0500)]
zebra: Modify zebra to order nexthops received

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>