]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 years agoMerge pull request #3899 from ton31337/fix/remove_private_as_with_local_as
Lou Berger [Thu, 4 Apr 2019 20:08:42 +0000 (16:08 -0400)]
Merge pull request #3899 from ton31337/fix/remove_private_as_with_local_as

bgpd: Remove private AS numbers if local-as is defined

5 years agoMerge pull request #4065 from mjstapp/fix_nexthop_compare
Quentin Young [Thu, 4 Apr 2019 18:08:22 +0000 (14:08 -0400)]
Merge pull request #4065 from mjstapp/fix_nexthop_compare

libs: nexthop comparison includes labels if present

5 years agoMerge pull request #4080 from mjstapp/fix_nh_copy_const
Quentin Young [Thu, 4 Apr 2019 17:52:01 +0000 (13:52 -0400)]
Merge pull request #4080 from mjstapp/fix_nh_copy_const

libs: use const in copy_nexthops api

5 years agoMerge pull request #4076 from dteach-rv/bgp_rpki_enable_fix
Quentin Young [Thu, 4 Apr 2019 17:51:22 +0000 (13:51 -0400)]
Merge pull request #4076 from dteach-rv/bgp_rpki_enable_fix

bgpd: Fix rpki command nodes.

5 years agoMerge pull request #4074 from qlyoung/remove-event-counter
Renato Westphal [Thu, 4 Apr 2019 15:03:12 +0000 (12:03 -0300)]
Merge pull request #4074 from qlyoung/remove-event-counter

lib: remove event_counter.[ch]

5 years agolibs: use const in copy_nexthops api
Mark Stapp [Thu, 4 Apr 2019 14:54:10 +0000 (10:54 -0400)]
libs: use const in copy_nexthops api

Use const for the source arg to copy_nexthops().

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #4072 from chiragshah6/evpn_dev2
Lou Berger [Thu, 4 Apr 2019 14:20:43 +0000 (10:20 -0400)]
Merge pull request #4072 from chiragshah6/evpn_dev2

lib,bgpd: do not register nexthop 0.0.0.0 to nht

5 years agoMerge pull request #4073 from donaldsharp/undebug_me_or_not
Lou Berger [Thu, 4 Apr 2019 14:08:34 +0000 (10:08 -0400)]
Merge pull request #4073 from donaldsharp/undebug_me_or_not

some cleanup across multiple daemons

5 years agoMerge pull request #4075 from qlyoung/reduce-exported-vars
Mark Stapp [Thu, 4 Apr 2019 10:18:49 +0000 (12:18 +0200)]
Merge pull request #4075 from qlyoung/reduce-exported-vars

lib: reduce exported var symbols

5 years agoMerge pull request #4060 from donaldsharp/pim_cherrybomb
Jafar Al-Gharaibeh [Thu, 4 Apr 2019 04:02:32 +0000 (23:02 -0500)]
Merge pull request #4060 from donaldsharp/pim_cherrybomb

Pim cherrybomb

5 years agobgpd: Fix rpki command nodes.
root [Wed, 3 Apr 2019 20:47:44 +0000 (16:47 -0400)]
bgpd: Fix rpki command nodes.

Move &rpki_cmd from VIEW to ENABLE.  A non-enabled session could
enter into the rpki command node and exit into glocalb config mode
without having to enable.

Move &show_rpki* from ENABLE to VIEW. Allow non-enabled user to
view cache state and prefix table state.

Signed-off-by: David Teach <dteach@routeviews.org>
5 years agolib, pbrd, zebra: Fix size_t type printf warnings on obscure platforms
Donald Sharp [Wed, 3 Apr 2019 20:39:50 +0000 (16:39 -0400)]
lib, pbrd, zebra: Fix size_t type printf warnings on obscure platforms

Use the correct printf formater for those obscure platforms that
we build against.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: reduce exported var symbols
Quentin Young [Wed, 3 Apr 2019 20:34:18 +0000 (20:34 +0000)]
lib: reduce exported var symbols

Don't need these in our DSO tables

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agolib: remove event_counter.[ch]
Quentin Young [Wed, 3 Apr 2019 20:18:08 +0000 (20:18 +0000)]
lib: remove event_counter.[ch]

goodbye spooky code

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agobgpd, pimd: Remove undebug commands
Donald Sharp [Wed, 3 Apr 2019 20:17:26 +0000 (16:17 -0400)]
bgpd, pimd: Remove undebug commands

The undebug XXX commands were deprecated over a year ago now,
time to nuke from on high.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years ago*: do not register nexthop 0.0.0.0 to nht
Chirag Shah [Wed, 3 Apr 2019 01:47:46 +0000 (18:47 -0700)]
*: do not register nexthop 0.0.0.0 to nht

Avoid tracking 0.0.0.0/32 nexthop with RIB.

When routes are aggregated,
the originate of the route becomes self.
Do not track nexthop self (0.0.0.0) with rib.

Ticket: CM-24248
Testing Done:

Before fix-

tor-11# show ip nht vrf all

VRF blue:
0.0.0.0
 unresolved
 Client list: bgp(fd 16)

VRF default:

VRF green:

VRF magenta:
0.0.0.0
 unresolved
 Client list: bgp(fd 16)

After fix-

tor-11# show ip nht vrf all

VRF blue:

VRF default:

VRF green:

VRF magenta:

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agoMerge pull request #4070 from donaldsharp/static_fixup
Mark Stapp [Wed, 3 Apr 2019 15:04:15 +0000 (17:04 +0200)]
Merge pull request #4070 from donaldsharp/static_fixup

staticd: Fix static routes that are not added in RIB after Null0 or v…

5 years agostaticd: Fix static routes that are not added in RIB after Null0 or vrf routes
Adrian Ban [Tue, 2 Apr 2019 15:25:50 +0000 (17:25 +0200)]
staticd: Fix static routes that are not added in RIB after Null0 or vrf routes

When you add a static route like:

ip route 10.0.0.0/24 Null0
ip route 192.168.7.0/24 99.99.99.99 nexthop-vrf EVA

all routes after this command will be ignored by staticd and are not inserted in RIB.
This is the cause of return instead of continue in the for loop in static_nht_update_safi() function that is stopping the search in the routes list and is returning in the previous function without calling static_zebra_route_add() function.

This patch is fixing this issue.

Signed-off-by: Adrian Ban <bugs@abtelcom.ro>
5 years agoMerge pull request #3789 from mjstapp/dplane_skip_kernel
Donald Sharp [Wed, 3 Apr 2019 13:26:21 +0000 (09:26 -0400)]
Merge pull request #3789 from mjstapp/dplane_skip_kernel

zebra: support skip-kernel for dataplane updates

5 years agoMerge pull request #3923 from Tuetuopay/evpn-session-vrf
Donald Sharp [Wed, 3 Apr 2019 12:00:14 +0000 (08:00 -0400)]
Merge pull request #3923 from Tuetuopay/evpn-session-vrf

Add support for EVPN session in the non-default VRF

5 years agolibs: nexthop comparison includes labels if present
Mark Stapp [Tue, 2 Apr 2019 16:33:06 +0000 (12:33 -0400)]
libs: nexthop comparison includes labels if present

Adjust the nexthop comparison api so that it calls the label-
comparison api. Adjust the label-comp api so that "no labels"
is "equal".

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #4018 from chiragshah6/evpn_dev
Sri Mohana Singamsetty [Wed, 3 Apr 2019 03:28:33 +0000 (20:28 -0700)]
Merge pull request #4018 from chiragshah6/evpn_dev

zebra: evpn dup detect handle ip state change

5 years agoMerge pull request #4053 from patrasar/3672
Donald Sharp [Tue, 2 Apr 2019 17:47:28 +0000 (13:47 -0400)]
Merge pull request #4053 from patrasar/3672

pimd: Introduce mroute_creation in channel oil data structure

5 years agoMerge pull request #4061 from mjstapp/fix_rtm_resolve
Donald Sharp [Tue, 2 Apr 2019 16:02:17 +0000 (12:02 -0400)]
Merge pull request #4061 from mjstapp/fix_rtm_resolve

zebra: conditionalize RTM_RESOLVE flag

5 years agoMerge pull request #4051 from qlyoung/doc-update-build-docs
Renato Westphal [Tue, 2 Apr 2019 15:59:51 +0000 (12:59 -0300)]
Merge pull request #4051 from qlyoung/doc-update-build-docs

doc: remove unneeded build deps

5 years agoMerge pull request #3931 from chiragshah6/evpn_dev1
Russ White [Tue, 2 Apr 2019 15:59:35 +0000 (11:59 -0400)]
Merge pull request #3931 from chiragshah6/evpn_dev1

bgpd: vrf route-leak router-id change reflect to vpn auto rd rt

5 years agozebra: conditionalize RTM_RESOLVE flag
Mark Stapp [Tue, 2 Apr 2019 13:26:45 +0000 (09:26 -0400)]
zebra: conditionalize RTM_RESOLVE flag

RTM_RESOLVE may not be present; conditionalize zebra's reference
to it.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agopimd: pim_nexthop_lookup should return true/false
Donald Sharp [Mon, 1 Apr 2019 19:41:32 +0000 (15:41 -0400)]
pimd: pim_nexthop_lookup should return true/false

The current reverse logic led to this code construct
if (!pim_nexthop_lookup(...)) {
//Do something successfull
}

This is backwards and will cause logic errors when people
use this code.  Fix to use true/false for success/failure.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Limit lookup of neighbor since we know we have one
Donald Sharp [Mon, 1 Apr 2019 16:31:28 +0000 (12:31 -0400)]
pimd: Limit lookup of neighbor since we know we have one

When a new pim neighbor comes up, we need to go through and
mark nexthops that we have received from zebra for reachability
tracking so we can refigure stuff.  If we pass in the new neighbor
we can limit the search to those nexthops out the interface that
the new neighbor has come up.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Remove pim_resolve_upstream_nh
Donald Sharp [Mon, 1 Apr 2019 16:13:34 +0000 (12:13 -0400)]
pimd: Remove pim_resolve_upstream_nh

The pim_resolve_upstream_nh function call is no longer being used
let's remove it from the code base.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4040 from donaldsharp/pim_cleanup
Jafar Al-Gharaibeh [Mon, 1 Apr 2019 15:25:07 +0000 (10:25 -0500)]
Merge pull request #4040 from donaldsharp/pim_cleanup

Pim cleanup

5 years agopimd: Introduce mroute_creation in channel oil data structure
Sarita Patra [Mon, 1 Apr 2019 06:38:28 +0000 (23:38 -0700)]
pimd: Introduce mroute_creation in channel oil data structure

Issue: (*,G) mroute uptime is not updated in mroute table,
after deleting and adding the RP

Root cause: When RP gets deleted or becomes not reachable, then
we un-install the entry from the kernel, but still maintains the
entry in the stack. When  RP gets re-configured or becomes reachable,
"show ip mroute" shows the uptime, when the channel_oil gets created.

Fix: Introduce a new time mroute_creation in the channel_oil, gets
updated when mroute gets installed in the kernel.

Signed-off-by: Sarita Patra <saritap@vmware.com>
5 years agoMerge pull request #3932 from nitinsoniism/bgp_gshut_clear_soft_in_out
Russ White [Sun, 31 Mar 2019 21:05:14 +0000 (17:05 -0400)]
Merge pull request #3932 from nitinsoniism/bgp_gshut_clear_soft_in_out

bgpd: handle all afi safi while bgp clear soft

5 years agoMerge pull request #4048 from FRRouting/qlyoung-patch-1
Russ White [Sun, 31 Mar 2019 21:01:57 +0000 (17:01 -0400)]
Merge pull request #4048 from FRRouting/qlyoung-patch-1

Update issue templates

5 years agoMerge pull request #4052 from opensourcerouting/bgpd-show-stats-vpn
Russ White [Sun, 31 Mar 2019 21:01:06 +0000 (17:01 -0400)]
Merge pull request #4052 from opensourcerouting/bgpd-show-stats-vpn

 bgpd: fix "show bgp statistics" for the VPN safi

5 years agobgpd: fix "show bgp statistics" for the VPN safi
Renato Westphal [Sat, 30 Mar 2019 03:53:16 +0000 (00:53 -0300)]
bgpd: fix "show bgp statistics" for the VPN safi

In order to iterate over MPLS VPN routes, it's necessary to use
two nested loops (the outer loop iterates over the MPLS VPN RDs,
and the inner loop iterates over the VPN routes from that RD).

The bgp_table_stats_walker() function wasn't giving this special
treatment to the MPLS VPN safi as it should, which was leading to
crashes and malfunctioning. Fix this.

Signed-off-by: Renato Westphal <renatowestphal@gmail.com>
5 years agobgpd: remove unused variable
Renato Westphal [Sat, 30 Mar 2019 04:04:35 +0000 (01:04 -0300)]
bgpd: remove unused variable

pinum (renamed from rinum) was never used for anything useful since
the initial revision ~17 years ago. Get rid of it.

Signed-off-by: Renato Westphal <renatowestphal@gmail.com>
5 years agoMerge pull request #4042 from donaldsharp/bfd_sa
Renato Westphal [Sat, 30 Mar 2019 03:19:24 +0000 (00:19 -0300)]
Merge pull request #4042 from donaldsharp/bfd_sa

bfdd: Clean up assignment without being used SA issue

5 years agodoc: remove unneeded build deps
Quentin Young [Thu, 28 Mar 2019 18:31:17 +0000 (18:31 +0000)]
doc: remove unneeded build deps

Remove the following:
* gawk
* dejagnu

Add the following for FreeBSD 9 and OpenBSD 6:
* libexecinfo

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #4041 from donaldsharp/interface_deletion
Rafael Zalamena [Fri, 29 Mar 2019 18:12:45 +0000 (15:12 -0300)]
Merge pull request #4041 from donaldsharp/interface_deletion

bfdd, nhrpd, pimd: When deleting an interface clean up

5 years ago.github: move pr template to subdir
Quentin Young [Fri, 29 Mar 2019 16:51:58 +0000 (16:51 +0000)]
.github: move pr template to subdir

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years ago.github: remove old issue template
Quentin Young [Fri, 29 Mar 2019 16:48:19 +0000 (16:48 +0000)]
.github: remove old issue template

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years ago.github: Update issue templates
Quentin Young [Fri, 29 Mar 2019 16:46:39 +0000 (12:46 -0400)]
.github: Update issue templates

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agobfdd, nhrpd, pimd: When deleting an interface clean up
Donald Sharp [Fri, 29 Mar 2019 02:08:37 +0000 (22:08 -0400)]
bfdd, nhrpd, pimd: When deleting an interface clean up

When we delete an interface, we need to set the interface
ifindex to an internal value so that we don't end up in
a state where the re-addition of the same ifindex, due to
a rename operation, causes an infinite loop.

Fixes:#4007
Fix-Suggested-by: Saravanan K
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobfdd: Clean up assignment without being used SA issue
Donald Sharp [Fri, 29 Mar 2019 02:22:26 +0000 (22:22 -0400)]
bfdd: Clean up assignment without being used SA issue

Clang's SA is reporting that we have a assignment without
subsuquent use.  Modify the code such that we no-longer
do this.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4026 from donaldsharp/pim_interface_fixup
Renato Westphal [Fri, 29 Mar 2019 13:07:47 +0000 (10:07 -0300)]
Merge pull request #4026 from donaldsharp/pim_interface_fixup

pimd: Interfaces can be upto 16 characters

5 years agoMerge pull request #4014 from dslicenc/zclient-interface-add
Renato Westphal [Fri, 29 Mar 2019 13:04:30 +0000 (10:04 -0300)]
Merge pull request #4014 from dslicenc/zclient-interface-add

lib: zclient provide interface info during reg_requests

5 years agoMerge pull request #4038 from manuhalo/fix-lu-bgp-master
Donald Sharp [Fri, 29 Mar 2019 00:17:38 +0000 (20:17 -0400)]
Merge pull request #4038 from manuhalo/fix-lu-bgp-master

bgpd: fix show bgp labeled_unicast

5 years agoMerge pull request #4035 from qlyoung/update-slack-link
Christian Franke [Thu, 28 Mar 2019 20:01:24 +0000 (21:01 +0100)]
Merge pull request #4035 from qlyoung/update-slack-link

README.md: point to self-inviting slack link

5 years agopimd: Cleanup extra paranthesis around S,G printout
Donald Sharp [Thu, 28 Mar 2019 19:44:58 +0000 (15:44 -0400)]
pimd: Cleanup extra paranthesis around S,G printout

When we are displaying S,G string data we already auto
display the string as (S,G) no need to have ((S,G)).
Cleanup some that were found during log look through.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Reduce RP checks a bit
Donald Sharp [Thu, 28 Mar 2019 19:26:06 +0000 (15:26 -0400)]
pimd: Reduce RP checks a bit

The pim_rp_check_is_my_ip_address function was checking to see
if we were the actual RP as well as the pim_register code
was doing the same thing.  Remove the reduncancy a bit and
just make this function check for that we are the actual receiver
of this data.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: fix show bgp labeled_unicast
Emanuele Di Pascale [Thu, 28 Mar 2019 16:02:33 +0000 (17:02 +0100)]
bgpd: fix show bgp labeled_unicast

while labeled_unicast routes should be fetched in the
unicast table, we cannot set the safi to SAFI_UNICAST
else the peer afc checks and subgroup retrieval will fail

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
5 years agoMerge branch 'master' into evpn-session-vrf
Tuetuopay [Thu, 28 Mar 2019 17:41:38 +0000 (18:41 +0100)]
Merge branch 'master' into evpn-session-vrf

5 years agoREADME.md: point to self-inviting slack link
Quentin Young [Thu, 28 Mar 2019 04:29:52 +0000 (04:29 +0000)]
README.md: point to self-inviting slack link

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #4030 from cfra/feature/fix-alpine-build
Quentin Young [Thu, 28 Mar 2019 16:02:59 +0000 (12:02 -0400)]
Merge pull request #4030 from cfra/feature/fix-alpine-build

Fix alpine build

5 years agoMerge pull request #4015 from opensourcerouting/topotests-fixes
Mark Stapp [Thu, 28 Mar 2019 15:07:31 +0000 (11:07 -0400)]
Merge pull request #4015 from opensourcerouting/topotests-fixes

topotests: fix missing log file and duplicated output folder

5 years agoMerge pull request #3764 from donaldsharp/rib_dest_t
Mark Stapp [Thu, 28 Mar 2019 15:05:29 +0000 (11:05 -0400)]
Merge pull request #3764 from donaldsharp/rib_dest_t

Lot's of Zebra changes

5 years agopimd: No need to rescan upstream list on rpf change
Donald Sharp [Thu, 28 Mar 2019 14:27:57 +0000 (10:27 -0400)]
pimd: No need to rescan upstream list on rpf change

The code as written will scan the entirety of all pim upstreams
on a rpf change, this is not necessary because we know that when
we get a nexthop change we already scan the upstreams reliant
on that and do this work.  There is no need to do this again a
short time later.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4002 from qlyoung/doc-update-build-docs-fedora
Rafael Zalamena [Wed, 27 Mar 2019 22:31:45 +0000 (19:31 -0300)]
Merge pull request #4002 from qlyoung/doc-update-build-docs-fedora

update build docs - Fedora, Ubuntu

5 years agoisisd, ospf6d, ripngd: Do not allow v6 LL's to be `redist connected` in
Donald Sharp [Fri, 22 Feb 2019 15:20:51 +0000 (10:20 -0500)]
isisd, ospf6d, ripngd: Do not allow v6 LL's to be `redist connected` in

The rib process of handling routes has been unified a bit more
and as a result v6 LL routes are now showing up as a result
of a `redistribute connected`.  Doing anything with these
routes is a policy decision that should be enforced by the
individual routing daemons not by zebra.  As such add a bit
of code to isisd, ripngd and opsf6d to handle them.  The bgp daemon
already handles this situation.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Re-evaluate the nexthop tracking if flags changed
Donald Sharp [Thu, 21 Feb 2019 21:10:56 +0000 (16:10 -0500)]
zebra: Re-evaluate the nexthop tracking if flags changed

Routing protocols are allowed ( and even encouraged ) to modify
the flags that influence the nexthop tracking.  As such when
we modify the tracking of a nexthop to go from, say, connected force
or not we must re-evaluate the nexthop and send the results
up to the interested parties.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: If we copy re than the state has changed
Donald Sharp [Tue, 12 Feb 2019 14:51:08 +0000 (09:51 -0500)]
zebra: If we copy re than the state has changed

After we have evaluated the rnh for an import-check type
and we copy the re then we know that the state has changed
and we should be notifying the end user about it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Modify lsp processing to be invoked as needed
Donald Sharp [Fri, 8 Feb 2019 22:14:30 +0000 (17:14 -0500)]
zebra: Modify lsp processing to be invoked as needed

LSP processing was a zvrf flag based upon a connected route
coming or going.  But this did not allow us to know
that we should do lsp processing other than after the meta-queue
processing was finished.

Eventually we moved meta-queue processing of do_nht_processing
to after the dataplane sent the main pthread some results.
This of course left us with a timing hole where if a connected
route came in and we received a data plane response *before*
the meta queue was processed we would not do the work as necessary.

Move the lsp processing to a flag off of the rib_dest_t. If it
is marked then we need to process lsps.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Add detailed debugging command for NHT tracking
Donald Sharp [Fri, 8 Feb 2019 14:11:47 +0000 (09:11 -0500)]
zebra: Add detailed debugging command for NHT tracking

Add a detailed debugging command for NHT tracking and add
the detailed output to the log about why we make some decisions
that we are.  I tried to model this like the rib processing
detailed debugs that we added a few months back.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Modify NHT to occur when needed.
Donald Sharp [Wed, 6 Feb 2019 15:23:58 +0000 (10:23 -0500)]
zebra: Modify NHT to occur when needed.

Currently nexthop tracking is performed for all nexthops that
are being tracked after a group of contexts are passed back
from the data plane for post install processing.

This is inefficient and leaves us sending nexthop tracking
changes at an accelerated pace, when we think we've changed
a route.  Additionally every route change will cause us
to relook at all nexthops we are tracking irrelevant if
they are possibly related to the route change or not.

Let's modify the code base to track the rnh's off of the rib
table's rn, `rib_dest_t`.  So after we process a node, install
it into the data plane, in rib_process_result we can
look at the `rib_dest_t` associated with the rn and see that
a nexthop depended on this route node.  If so, refigure it.

Additionally we will store rnh's that are not resolved on the
0.0.0.0/0 nexthop tracking list.  As such when a route node
changes we can quickly walk up the rib tree and notice that
it needs to be reprocessed as well.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Add a base node for the zebra vrf tables
Donald Sharp [Wed, 6 Feb 2019 19:44:44 +0000 (14:44 -0500)]
zebra: Add a base node for the zebra vrf tables

Add a default route_node for our routing tables.  This will allow us
to know that we can hang data off the default route for processing.

We will be hanging the nexthop tracking data structures off the rib_dest_t
so that we can know which nexthops we need to handle.  Effectively
nexthops that we are tracking that are unresolved will be stored on the
default route.  When something changes in the rib tree we can
work up the rn->parent pointer checking for nexthops we need to re-evaluate.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Abstract the rib_dest_t creation
Donald Sharp [Wed, 6 Feb 2019 19:21:36 +0000 (14:21 -0500)]
zebra: Abstract the rib_dest_t creation

Abstract the creation of the rib_dest_t so that we can call it
from multiple places.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Set and track the resolved_route for the rnh as it changes.
Donald Sharp [Wed, 6 Feb 2019 16:16:07 +0000 (11:16 -0500)]
zebra: Set and track the resolved_route for the rnh as it changes.

The resolved_route is the prefix we are using in the routing table
to resolve this particular nexthop we are tracking.  Add code
to better track it's change.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Add the afi_t to the rnh
Donald Sharp [Wed, 6 Feb 2019 15:53:48 +0000 (10:53 -0500)]
zebra: Add the afi_t to the rnh

Store the associated afi with the rnh, it will be useful in the future.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Add the type we are working on to the rnh data structure
Donald Sharp [Wed, 6 Feb 2019 15:23:07 +0000 (10:23 -0500)]
zebra: Add the type we are working on to the rnh data structure

Store the type we are working on w/ the rnh data structure.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: The prn value may be NULL do not allow deref
Donald Sharp [Wed, 6 Feb 2019 14:46:15 +0000 (09:46 -0500)]
zebra: The prn value may be NULL do not allow deref

The prn value as passed in may be NULL as such do not
allow it to be derefed (even though it works now).

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Make the import_check look like nexthop_check
Donald Sharp [Wed, 6 Feb 2019 02:27:02 +0000 (21:27 -0500)]
zebra: Make the import_check look like nexthop_check

Make the functions take the same parameters.

Future commits will use this.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Modify code so that dplane is responsible for indicating success/fail of install
Donald Sharp [Fri, 8 Feb 2019 20:01:41 +0000 (15:01 -0500)]
zebra: Modify code so that dplane is responsible for indicating success/fail of install

We have several route types KERNEL and CONNECT that are handled via special
case in the code.  This was causing a lot of work keeping the two different
classes of route types as special(SYSTEM OR NOT).  Put the dplane
in charge of the code that sets the bits for signalling route install/failure.

This greatly simplifies the code calling path and makes all route types
be handled exactly the same.  Additionaly code that we want to run
post data plane install can just work as per normal then, instead
of having to know we need to run it when we have a special type
of route.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
5 years agozebra: On route install/update failure correctly indicate in rib
Donald Sharp [Sat, 9 Feb 2019 15:51:33 +0000 (10:51 -0500)]
zebra: On route install/update failure correctly indicate in rib

When we get a route install failure from the kernel, actually
indicate in the rib the status of the routes.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Unset old_re as queued.
Donald Sharp [Sat, 9 Feb 2019 15:45:42 +0000 (10:45 -0500)]
zebra: Unset old_re as queued.

When switching routes from one route type to another actually
unset the old route as enqueued.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: zebra_router.c does not own the data plane shutdown of tables
Donald Sharp [Sun, 10 Feb 2019 15:14:26 +0000 (10:14 -0500)]
zebra: zebra_router.c does not own the data plane shutdown of tables

When shutting down, the individual vrf's own the shutdown of the table
and subsuquent removal from the routes from the kernel.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: When shutting down actually close the socket
Donald Sharp [Sat, 9 Feb 2019 21:38:34 +0000 (16:38 -0500)]
zebra: When shutting down actually close the socket

When shutting down and we have a very large table to shutdown
and after we've intentionally closed all the client connections
close the zebra zserv client socket.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agotopotests: Add a bit more useful debugging to ldp-vpls-topo1
Donald Sharp [Sat, 9 Feb 2019 16:09:32 +0000 (11:09 -0500)]
topotests: Add a bit more useful debugging to ldp-vpls-topo1

When something goes wrong with this test, having these turned
on will help us debug zebra processing a bit better in the
future without having to modify anything else.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4004 from chiragshah6/evpn_dev2
Sri Mohana Singamsetty [Wed, 27 Mar 2019 15:25:15 +0000 (08:25 -0700)]
Merge pull request #4004 from chiragshah6/evpn_dev2

zebra: evpn mac ip dup detect (DAD) timers cleanup

5 years agodocker/alpine: Update buildscript to keep the docker image around
Christian Franke [Wed, 27 Mar 2019 12:29:04 +0000 (13:29 +0100)]
docker/alpine: Update buildscript to keep the docker image around

Don't delete the Alpine docker image after the build.

Also, extract the packages from the build stage, so that we can
remove them from the final image.

5 years agoMerge pull request #4023 from qlyoung/doc-exclude-bfd-options-manpages
Rafael Zalamena [Wed, 27 Mar 2019 14:23:29 +0000 (11:23 -0300)]
Merge pull request #4023 from qlyoung/doc-exclude-bfd-options-manpages

doc: exclude bfd-options.rst from toctree

5 years agoMerge pull request #4017 from mjstapp/fix_summary_installed_flag
Donald Sharp [Wed, 27 Mar 2019 12:40:12 +0000 (08:40 -0400)]
Merge pull request #4017 from mjstapp/fix_summary_installed_flag

zebra: use the INSTALLED flag consistently in route summary

5 years agoMerge pull request #4019 from sworleys/Fix-Extended-Ack-Err
Mark Stapp [Wed, 27 Mar 2019 12:35:02 +0000 (08:35 -0400)]
Merge pull request #4019 from sworleys/Fix-Extended-Ack-Err

zebra: Fix extended ack error message parsing

5 years agozebra: Move the EVPN VRF pointer to zebra_router
Tuetuopay [Wed, 27 Mar 2019 01:16:27 +0000 (02:16 +0100)]
zebra: Move the EVPN VRF pointer to zebra_router

It had no logical reason to be in the default VRF. This moves it to the
zebra_router, which is better suited to store global references.

Signed-off-by: Tuetuopay <tuetuopay@me.com>
Sponsored-by: Scaleway
5 years agozebra: Change checks for EVPN VRF to a macro
Tuetuopay [Wed, 27 Mar 2019 01:13:16 +0000 (02:13 +0100)]
zebra: Change checks for EVPN VRF to a macro

A lot of checks relied on the VRF ID and the EVPN VRF ID to be the same.
This patch changes those checks to the EVPN_ENABLED macro, which checks
if the VRF is the EVPN one.

Signed-off-by: Tuetuopay <tuetuopay@me.com>
Sponsored-by: Scaleway
5 years agopimd: Interfaces can be upto 16 characters
Donald Sharp [Wed, 27 Mar 2019 01:01:00 +0000 (21:01 -0400)]
pimd: Interfaces can be upto 16 characters

The interface column in pim was limited to 8 or 9 columns
all over the place in pim, fix the code up to allow interface
length to be up to 16 columns.

Ticket: CM-23083
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agodoc: update build docs for Ubuntu 14.04
Quentin Young [Tue, 26 Mar 2019 22:04:49 +0000 (22:04 +0000)]
doc: update build docs for Ubuntu 14.04

Same as priors

Tested on Ubuntu 14.04

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agodoc: update build docs for Ubuntu 16.04
Quentin Young [Tue, 26 Mar 2019 20:50:16 +0000 (20:50 +0000)]
doc: update build docs for Ubuntu 16.04

Same updates as Ubuntu 18.04 doc

Tested on Ubuntu 16.04

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agodoc: exclude bfd-options.rst from toctree
Quentin Young [Tue, 26 Mar 2019 20:53:58 +0000 (20:53 +0000)]
doc: exclude bfd-options.rst from toctree

This is an include file, needs to be explicitly excluded to suppress
Sphinx warnings.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agodocker/alpine/build.sh: Install packages to docker/alpine
Christian Franke [Tue, 26 Mar 2019 17:30:18 +0000 (18:30 +0100)]
docker/alpine/build.sh: Install packages to docker/alpine

The packages resulting from the Alpine build should be installed
to docker/alpine and not to the general docker directory.

5 years agoalpine/APKBUILD.in: Don't include daemons from srcdir
Christian Franke [Tue, 26 Mar 2019 14:46:51 +0000 (15:46 +0100)]
alpine/APKBUILD.in: Don't include daemons from srcdir

The daemons file will be generated during the build, so there is no
need to copy it over from the first stage.

5 years agoalpine/APKBUILD.in: Add libyang-dev dependency, drop binutils-libs
Christian Franke [Tue, 26 Mar 2019 13:56:59 +0000 (14:56 +0100)]
alpine/APKBUILD.in: Add libyang-dev dependency, drop binutils-libs

We need libyang to build FRR, so add it to the make dependencies.
Alpine will automatically detect it as runtime dependency, so no
need to add it there.

The package binutils-libs doesn't exist anymore, so remove it from
the dependencies.

5 years agodocker/alpine: Unbreak build by using edge/testing
Christian Franke [Tue, 26 Mar 2019 11:56:23 +0000 (12:56 +0100)]
docker/alpine: Unbreak build by using edge/testing

As we need libyang, which is only part of Alpine Linux edge/testing,
update the Dockerfile to use this repository.

Also, update the Dockerfile to adhere more to best common practices.

5 years agoalpine: Move docker-start to Docker build
Christian Franke [Tue, 26 Mar 2019 17:27:24 +0000 (18:27 +0100)]
alpine: Move docker-start to Docker build

The standard Alpine package should not install docker glue,
so remove it from the APKBUILD and install it in the Dockerfile
instead.

5 years agobgpd: Remove private AS numbers if local-as is defined
Donatas Abraitis [Sat, 2 Mar 2019 20:36:31 +0000 (22:36 +0200)]
bgpd: Remove private AS numbers if local-as is defined

When using remove-private-AS together with local-as
aspath_remove_private_asns() is called before bgp_packet_attribute().

In this case, private AS will always appear in front of change_local_as.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agobgpd: handle all afi safi while bgp clear soft
Nitin Soni [Tue, 12 Mar 2019 05:57:51 +0000 (22:57 -0700)]
bgpd: handle all afi safi while bgp clear soft

Currently, as part of bgp clear soft inboud and outbound we don't handle
l2vpn evpn. Now clearing soft for all supported afi safi.
One of the examples where this was a problem -

On applying graceful-shutdown, bgp clear soft inboud and outbound don't
handle AFI L2VPN and SAFI EVPN. Gshut gets applied to EVPN Type 5 routes
by asking peer to refresh the routes (provided we have config - "advertise
ipv4/ipv6 unicast" as part of l2vpn evpn) but is not applied to type 2
and type 3 EVP routes. This fix takes care of l2vpn evpn type2 and type3
routes being readvertised with gshut community.

This fix also fixes similar issues related to following where bgp clear
soft is requred for l2vpn evpn -
-config bgp cluster-id
-config bgp client-to-client reflection
-config bgp default local-preference
-config bgp route-reflector allow-outbound-policy
-config bgp disable-ebgp-connected-route-check

Ticket: CM-22813
Signed-off-by: Nitin Soni <nsoni@cumulusnetworks.com>
Reviewed-by: CCR-8361
Testing-Done:
-With gshut configured on all BGP VRFs (operator has to know about the
auto-created BGP VRFs - we do show them in show commands - and turn on
graceful-shutdown in all of them.
-We announce all EVPN routes (type-2, type-3 and type-5) with GSHUT and
we mark IPv4/IPv6 routes in a VRF that are based on received EVPN type-2
or type-5 routes with local pref 0.
-On the receiver side, when EVPN routes are received with GSHUT, the
correct handling takes place (to treat them with local preference 0, and
hence not select them)
-When the gshut configuration is removed on all BGP VRFs, we re-announce
all of our EVPN routes without GSHUT and receiver does the appropriate
thing. Also, we no longer mark EVPN-based IPv4/IPv6 routes with local
pref 0.
-evpn-smoke
-bgp-smoke

5 years agoMerge pull request #3983 from opensourcerouting/pim-tests
Lou Berger [Tue, 26 Mar 2019 16:05:13 +0000 (17:05 +0100)]
Merge pull request #3983 from opensourcerouting/pim-tests

topotests: pim-basic: add topology to test PIM

5 years agoMerge pull request #3998 from pguibert6WIND/workflow_bug_fixes_older
David Lamparter [Tue, 26 Mar 2019 15:45:48 +0000 (16:45 +0100)]
Merge pull request #3998 from pguibert6WIND/workflow_bug_fixes_older

doc: permit maintenance on more than the 2 last maintenance releases

5 years agoMerge pull request #3946 from AnuradhaKaruppiah/evpn-prefix-length
David Lamparter [Tue, 26 Mar 2019 15:38:28 +0000 (16:38 +0100)]
Merge pull request #3946 from AnuradhaKaruppiah/evpn-prefix-length

bgp: fix misc evpn problems caused by using incorrect prefixlen

5 years agoMerge pull request #4008 from donaldsharp/zclient_log_improvement
David Lamparter [Tue, 26 Mar 2019 15:36:55 +0000 (16:36 +0100)]
Merge pull request #4008 from donaldsharp/zclient_log_improvement

Zclient log improvement