]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
4 years agoMerge pull request #4446 from Kuldeepkas/topojson
Martin Winter [Tue, 9 Jul 2019 12:41:11 +0000 (14:41 +0200)]
Merge pull request #4446 from Kuldeepkas/topojson

topotests: Topojson framework

4 years agoMerge pull request #4657 from qlyoung/cleanup-protonum-vrrrrrrrrrrrrrrrrrrrrrrrrrrrrr...
Philippe Guibert [Tue, 9 Jul 2019 10:27:11 +0000 (11:27 +0100)]
Merge pull request #4657 from qlyoung/cleanup-protonum-vrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrp

vrrpd: use protocol number constant

4 years agotests: Fix info messages print in std_error
Ashish Pant [Tue, 9 Jul 2019 04:49:56 +0000 (10:19 +0530)]
tests: Fix info messages print in std_error

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
frr-reolad.py invocation sends info message to stderror channel
Redirected stderror from frr-reload.py to stdout

Fixed verify_convergence when more than one link is present

4 years agotests: Fix logdir creation
Ashish Pant [Tue, 25 Jun 2019 05:56:46 +0000 (11:26 +0530)]
tests: Fix logdir creation

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Creates logdir everytime in start_topology, removed stop_topoloy.
Using tgen.stop_topology in test case now.

4 years agodoc: Document for topojson changes
Ashish Pant [Tue, 25 Jun 2019 05:02:49 +0000 (10:32 +0530)]
doc: Document for topojson changes

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Describes topojson framework and guidelines to use it.

4 years agotests: Adding example cases for topojson
Ashish Pant [Tue, 25 Jun 2019 04:25:24 +0000 (09:55 +0530)]
tests: Adding example cases for topojson

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Example JSON and test cases for 3 types being added:
1. Single link between routers
2. Multiple linke between routers.
3. BGP session over loopback interface

4 years agotests: Adding bgp path attribute tests
Ashish Pant [Tue, 25 Jun 2019 02:12:44 +0000 (07:42 +0530)]
tests: Adding bgp path attribute tests

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Adding multiple test cases for bgp attributes.
Adding verfication APIs for them.

4 years agotests: Fixing ipv6 address generation
Ashish Pant [Tue, 25 Jun 2019 02:00:08 +0000 (07:30 +0530)]
tests: Fixing ipv6 address generation

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
4 years agotests: Adding bgp tests for prefix-lists
Ashish Pant [Tue, 25 Jun 2019 01:56:20 +0000 (07:26 +0530)]
tests: Adding bgp tests for prefix-lists

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Adds mulitple test scenarios for prefix-lists in bgp. Verfication
API for prefix-lits

Also adds description for bgp-basic test suite

4 years agotests: Adding 5 test cases to bgp-basic suite
Ashish Pant [Tue, 25 Jun 2019 01:03:09 +0000 (06:33 +0530)]
tests: Adding 5 test cases to bgp-basic suite

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Adding test cases and verfication API for new test cases

4 years agotests: Adding timers and bgp 4 bytes ASN test
Ashish Pant [Tue, 25 Jun 2019 00:34:17 +0000 (06:04 +0530)]
tests: Adding timers and bgp 4 bytes ASN test

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Adding verify and config apis for bgp timer testcase
Adding verify and config apis for changing ASN to 4 bytes

4 years agotests: Adding API for route-map
Ashish Pant [Mon, 24 Jun 2019 23:51:22 +0000 (05:21 +0530)]
tests: Adding API for route-map

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Adding API for reading JSON data and configuring route-map on the
router

4 years agotests: Adding API for prefix-list configuration
Ashish Pant [Mon, 24 Jun 2019 23:46:32 +0000 (05:16 +0530)]
tests: Adding API for prefix-list configuration

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Adding API for prefix-list that reads data from JSON and configures
on the router.

4 years agotests: Adding API for static route
Ashish Pant [Mon, 24 Jun 2019 23:35:15 +0000 (05:05 +0530)]
tests: Adding API for static route

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Adding API for reading data from JSON and configuring static
routes on the router

4 years agotests: First test case and JSON
Ashish Pant [Mon, 24 Jun 2019 20:43:13 +0000 (02:13 +0530)]
tests: First test case and JSON

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Adds verification API for bgp, first test case alongwith JSON file

4 years agotests: Adding api for BGP configuration
Ashish Pant [Mon, 24 Jun 2019 11:54:07 +0000 (17:24 +0530)]
tests: Adding api for BGP configuration

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Adding mulitple methods to form BGP configuration and other
helper methods.
If "bgp" is given in JSON the configuration will be created

4 years agotests: Adds basic config load and interface API
Ashish Pant [Mon, 24 Jun 2019 11:37:00 +0000 (17:07 +0530)]
tests: Adds basic config load and interface API

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Adds method to load configuration on the router. Save configuration
for resetting.
Adds method for configuring interfaces ip address on router.
Adds logdir and other pytest.ini option

4 years agotests: Adding start and stop topology
Ashish Pant [Mon, 24 Jun 2019 11:26:08 +0000 (16:56 +0530)]
tests: Adding start and stop topology

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Adding methods for staring and stopping routers in topology

4 years agotests: Intial commit for topojson
Ashish Pant [Mon, 24 Jun 2019 11:04:36 +0000 (16:34 +0530)]
tests: Intial commit for topojson

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Adding JSON parser for creating router and assinging ip addresses to
each interface

4 years agovrrpd: use protocol number constant
Quentin Young [Mon, 8 Jul 2019 21:28:01 +0000 (21:28 +0000)]
vrrpd: use protocol number constant

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #4654 from manuhalo/fix_bgp_lbp_warn
Donald Sharp [Mon, 8 Jul 2019 19:27:35 +0000 (15:27 -0400)]
Merge pull request #4654 from manuhalo/fix_bgp_lbp_warn

bgpd: fix implicit declaration warning

4 years agoMerge pull request #4631 from chiragshah6/evpn_dev1
Sri Mohana Singamsetty [Mon, 8 Jul 2019 18:56:44 +0000 (11:56 -0700)]
Merge pull request #4631 from chiragshah6/evpn_dev1

zebra: evpn entries are not cleaned upon frr stop

4 years agoMerge pull request #4653 from qlyoung/fix-pim-helpstringms
Mark Stapp [Mon, 8 Jul 2019 17:44:06 +0000 (13:44 -0400)]
Merge pull request #4653 from qlyoung/fix-pim-helpstringms

pimd: fix some help strings

4 years agobgpd: fix implicit declaration warning
Emanuele Di Pascale [Mon, 8 Jul 2019 16:45:14 +0000 (18:45 +0200)]
bgpd: fix implicit declaration warning

Add header with prototype for bgp_path_info_unlock

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agoMerge pull request #4652 from LabNConsulting/working/master/hook_unregister
Quentin Young [Mon, 8 Jul 2019 15:33:07 +0000 (11:33 -0400)]
Merge pull request #4652 from LabNConsulting/working/master/hook_unregister

bgp: add hook_unregister to bgp_dump_finish

4 years agobgp: add hook_unregister to bgp_dump_finish
Lou Berger [Mon, 8 Jul 2019 13:24:57 +0000 (09:24 -0400)]
bgp: add hook_unregister to bgp_dump_finish

Signed-off-by: Lou Berger <lberger@labn.net>
4 years agopimd: fix some help strings
Quentin Young [Sat, 6 Jul 2019 00:15:27 +0000 (00:15 +0000)]
pimd: fix some help strings

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #4639 from opensourcerouting/c-ares-lib
Quentin Young [Wed, 3 Jul 2019 20:49:19 +0000 (16:49 -0400)]
Merge pull request #4639 from opensourcerouting/c-ares-lib

make c-ares DNS resolver available as lib

4 years agoMerge pull request #4640 from opensourcerouting/bmp-prep
Quentin Young [Wed, 3 Jul 2019 20:42:41 +0000 (16:42 -0400)]
Merge pull request #4640 from opensourcerouting/bmp-prep

bgpd: BMP preparations

4 years agoMerge pull request #4632 from manuhalo/fix_bgp_lu_update
Quentin Young [Wed, 3 Jul 2019 18:25:18 +0000 (14:25 -0400)]
Merge pull request #4632 from manuhalo/fix_bgp_lu_update

bgpd: fix bgp-lu update bug

4 years agoMerge pull request #4637 from opensourcerouting/fixes-20190703
Quentin Young [Wed, 3 Jul 2019 17:28:23 +0000 (13:28 -0400)]
Merge pull request #4637 from opensourcerouting/fixes-20190703

isisd printfrr & clippy fixes

4 years agoMerge pull request #4641 from qlyoung/remove-zebra-bs-irdp
Mark Stapp [Wed, 3 Jul 2019 17:05:04 +0000 (13:05 -0400)]
Merge pull request #4641 from qlyoung/remove-zebra-bs-irdp

zebra: remove bs irdp error code

4 years agoMerge pull request #4629 from ton31337/fix/large_community_list_uint16_overflow
Quentin Young [Wed, 3 Jul 2019 16:30:21 +0000 (12:30 -0400)]
Merge pull request #4629 from ton31337/fix/large_community_list_uint16_overflow

bgpd: Validate large-community-list against UINT_MAX

4 years agoMerge pull request #4638 from donaldsharp/ospf_external_delete_crash
David Lamparter [Wed, 3 Jul 2019 16:02:29 +0000 (18:02 +0200)]
Merge pull request #4638 from donaldsharp/ospf_external_delete_crash

ospfd: Do not modify list when using _RO loop

4 years agolib/resolver: NULL out callback before call
David Lamparter [Thu, 23 May 2019 12:25:58 +0000 (14:25 +0200)]
lib/resolver: NULL out callback before call

The callback itself might want to reschedule the resolver, so it is
useful to clear out the callback field before making the call instead of
after.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib: split off c-ares code from nhrpd
David Lamparter [Thu, 23 May 2019 10:23:02 +0000 (12:23 +0200)]
lib: split off c-ares code from nhrpd

This is useful in other places too, e.g. for BMP outbound connections.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agobgpd: add packet send hook
David Lamparter [Fri, 10 May 2019 17:29:01 +0000 (19:29 +0200)]
bgpd: add packet send hook

Unlike MRT dumps, BMP also provides packets sent by the router.  Add
another hook for that.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agobgpd: add & use bgp packet dump hook
David Lamparter [Wed, 24 Apr 2019 15:19:09 +0000 (17:19 +0200)]
bgpd: add & use bgp packet dump hook

The MRT dump code is already hooked in at the right places to write out
packets;  the BMP code needs exactly the same access so let's make this
a hook.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agobgpd: add instance delete & config write hooks
David Lamparter [Fri, 10 May 2019 13:31:04 +0000 (15:31 +0200)]
bgpd: add instance delete & config write hooks

Both of these hooks are necessary for proper operation of extensions
that need to latch on to a particular instance.

- without the delete hook, it's impossible to get rid of stale
  references, leading to crashes with invalid instance pointers.
- the config-write hook is necessary because per-instance config needs
  to be written inside the "router bgp" block to have the appropriate
  context; adding a separate config node can't do that.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agobgpd: autocomplete "router bgp" ASN
David Lamparter [Fri, 10 May 2019 13:30:49 +0000 (15:30 +0200)]
bgpd: autocomplete "router bgp" ASN

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agobgpd: add a hook before bgp_process()
David Lamparter [Thu, 9 May 2019 09:12:14 +0000 (11:12 +0200)]
bgpd: add a hook before bgp_process()

BMP uses this to get notified about any changes to prefixes, at which
point it schedules its own processing to happen later.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agobgpd: count some per-peer stats (for BMP)
David Lamparter [Wed, 24 Apr 2019 19:40:50 +0000 (21:40 +0200)]
bgpd: count some per-peer stats (for BMP)

These counters are accessible through BMP and may be useful to monitor
bgpd.  A CLI to show them could also be added if people are interested.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agobgpd: fix last_reset_cause setup
David Lamparter [Wed, 24 Apr 2019 18:14:19 +0000 (20:14 +0200)]
bgpd: fix last_reset_cause setup

last_reset_cause_size is the length *used* in last_reset_cause[].  It's
straight up used wrong here; we're saving off a reset cause and need to
check against the *available* size in last_reset_cause[].

This could actually have led to (hopefully rare) crashes in the assert
there, since the assert condition might fail incorrectly.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agoMerge pull request #4550 from manuhalo/fix_bgp_label_cb
Donald Sharp [Wed, 3 Jul 2019 13:15:37 +0000 (09:15 -0400)]
Merge pull request #4550 from manuhalo/fix_bgp_label_cb

Fix bgp-lu label callback crash

4 years agoisisd: fix printfrr derp
David Lamparter [Wed, 3 Jul 2019 13:13:41 +0000 (15:13 +0200)]
isisd: fix printfrr derp

Yeah, gotta use v... if the arg is a va_list...

Fixes: #4600
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agoclippy: find headers relative to source tree
David Lamparter [Wed, 3 Jul 2019 12:53:32 +0000 (14:53 +0200)]
clippy: find headers relative to source tree

The current directory is in the build tree while running clippy; find
ourselves so we can access headers from the source tree.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agolib: Add a couple functions to nexthop_group.c (#4323)
David Lamparter [Wed, 3 Jul 2019 12:42:35 +0000 (14:42 +0200)]
lib: Add a couple functions to nexthop_group.c (#4323)

lib: Add a couple functions to nexthop_group.c

Co-authored-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoRun-time log filtering via vtysh commands (#4524)
David Lamparter [Wed, 3 Jul 2019 12:39:59 +0000 (14:39 +0200)]
Run-time log filtering via vtysh commands (#4524)

Run-time log filtering via vtysh commands

4 years agozebra: remove bs irdp error code
Quentin Young [Wed, 3 Jul 2019 00:27:14 +0000 (00:27 +0000)]
zebra: remove bs irdp error code

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agobgpd: Validate large-community-list against UINT_MAX
Donatas Abraitis [Tue, 2 Jul 2019 12:35:26 +0000 (15:35 +0300)]
bgpd: Validate large-community-list against UINT_MAX

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #4634 from mjstapp/vty_report_pids
Quentin Young [Tue, 2 Jul 2019 20:39:28 +0000 (16:39 -0400)]
Merge pull request #4634 from mjstapp/vty_report_pids

lib: add process pids to 'show modules'

4 years agoospfd: Do not modify list when using _RO loop
Donald Sharp [Tue, 2 Jul 2019 23:06:22 +0000 (19:06 -0400)]
ospfd: Do not modify list when using _RO loop

The shutdown of ospf was causing crashes because the shutdown
was calling a ALL_LIST_ELEMENTS_RO macro and modifying the
underlying data structures.  Switch to using ALL_LIST_ELEMENTS.

This is caused by this change:

commit f9e1501aea5d429be2ecda1a3e2bde17e6ad5e4b
Author: Donald Sharp <sharpd@cumulusnetworks.com>
Date:   Wed Feb 27 15:08:29 2019 -0500

    ospfd: Cleanup ospf->redist and ospf->external on shutdown

Effectively my original testing for this only had one external
route and as such we would not have a crash here.  It only
showed up after multiple externals have been introduced.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib: add process pids to 'show modules'
Mark Stapp [Tue, 2 Jul 2019 18:05:18 +0000 (14:05 -0400)]
lib: add process pids to 'show modules'

Add the process pids to the output produced by 'show modules'.
At least in a development setting, where there may be multiple
instances of frr running, it can be handy to be able to id
the exact pids, for debugging e.g.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #4622 from donaldsharp/import_table_fix
Sri Mohana Singamsetty [Tue, 2 Jul 2019 18:20:02 +0000 (11:20 -0700)]
Merge pull request #4622 from donaldsharp/import_table_fix

Import table fix

4 years agoMerge pull request #4598 from bisdhdh/master
Quentin Young [Tue, 2 Jul 2019 17:52:54 +0000 (13:52 -0400)]
Merge pull request #4598 from bisdhdh/master

bgpd: 'show bgp ipv6 neighbors <X::Y> prefix-counts' prefix-count is not getting displayed

4 years agobgpd: fix bgp-lu update bug
Emanuele Di Pascale [Tue, 2 Jul 2019 16:59:00 +0000 (18:59 +0200)]
bgpd: fix bgp-lu update bug

bgp update messages were not correctly calculating the size
for a labeled-unicast prefix, as they were not accounting
for the label. If the update message was large enough to
overflow the maximum packet size (4096 bytes) this could
cause bgpd to send a malformed update packet.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agoMerge pull request #4624 from qlyoung/use-standard-bools
David Lamparter [Tue, 2 Jul 2019 15:51:09 +0000 (17:51 +0200)]
Merge pull request #4624 from qlyoung/use-standard-bools

*: s/TRUE/true/, s/FALSE/false/

4 years agoMerge pull request #4086 from opensourcerouting/fix-yang-validation
Quentin Young [Tue, 2 Jul 2019 15:39:13 +0000 (11:39 -0400)]
Merge pull request #4086 from opensourcerouting/fix-yang-validation

Fix a couple of YANG validation issues

4 years agoMerge pull request #3888 from donaldsharp/ospf_cleanup
Olivier Dugeon [Tue, 2 Jul 2019 15:37:23 +0000 (17:37 +0200)]
Merge pull request #3888 from donaldsharp/ospf_cleanup

ospfd: Cleanup ospf->redist and ospf->external on shutdown

4 years agoMerge pull request #4496 from chiragshah6/evpn_dev2
Russ White [Tue, 2 Jul 2019 14:55:25 +0000 (10:55 -0400)]
Merge pull request #4496 from chiragshah6/evpn_dev2

bgpd: vrf route leak handle bgp instance delete recreate

4 years agozebra: evpn entries are not cleaned upon frr stop
Chirag Shah [Fri, 28 Jun 2019 17:42:08 +0000 (10:42 -0700)]
zebra: evpn entries are not cleaned upon frr stop

As part of PR 4458, when a client (bgpd) goes down,
zebra cleans up any evpn state including remotely learned
neighs, macs and vteps are suppose to be cleaned up,
uninstall from kernel tables.

Neighs (arps), macs and vteps (HREP entries) were not
removed from kernel tables as the uninstall flag as not set.

Clean up l3vni associated remote neighs, macs and vteps.

Ticket:CM-25468
Reviewed By:CCR-8889
Testing Done:

Validated in evpn symmetric routing topology where
remotely learned l2/l3 vnis neigh, macs and remote
vtep (hrep) entries are installed in kernel table,
perform systemctl stop frr.service and validated
all remotely learned entries cleaned up from kernel
tables.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agobgpd: 'show bgp ipv6 neighbors <X::Y> prefix-counts' prefix-count is
Biswajit Sadhu [Mon, 24 Jun 2019 07:50:33 +0000 (00:50 -0700)]
bgpd: 'show bgp ipv6 neighbors <X::Y> prefix-counts' prefix-count is
not getting displayed.

Neighbour prefix-count is not getting displayed with IPV6 neighbours
and displays the o/p “ % No such neighbor or address family ”.
However, I observed it is working fine for IPV4 neighbour.

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
4 years agoripd: fix problems with the "ip rip authentication" command
Renato Westphal [Fri, 5 Apr 2019 01:28:00 +0000 (22:28 -0300)]
ripd: fix problems with the "ip rip authentication" command

libyang-0.16-r3 doesn't allow the creation of data nodes if their
corresponding "when" statement (if any) resolves to false. This
change broke the "ip rip authentication" command.

This commit adapts this command so that it's not affected by the
new libyang stricter validation checks.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agolib: fix a couple of yang validation issues
Renato Westphal [Fri, 5 Apr 2019 01:28:00 +0000 (22:28 -0300)]
lib: fix a couple of yang validation issues

libyang-0.16-r3 contains a commit[1] that changed the autodelete
behavior of subtrees when validating data. A few FRR commands were
affected by this change since they relied on the old autodelete
behavior.

To fix these commands, use the LYD_OPT_WHENAUTODEL flag when
validating data to restore the old autodelete behavior (which adds
a lot of convenience for us).

[1] https://github.com/CESNET/libyang/commit/bbc43b1b4

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years ago*: s/TRUE/true/, s/FALSE/false/
Quentin Young [Mon, 1 Jul 2019 17:26:05 +0000 (17:26 +0000)]
*: s/TRUE/true/, s/FALSE/false/

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #4608 from donaldsharp/vtysh_pam_helping_hand
Jafar Al-Gharaibeh [Thu, 27 Jun 2019 19:04:31 +0000 (22:04 +0300)]
Merge pull request #4608 from donaldsharp/vtysh_pam_helping_hand

vtysh: Try to be perscriptive about pam failures

4 years agoMerge pull request #4610 from donaldsharp/pim_igmp_connected_source
Jafar Al-Gharaibeh [Thu, 27 Jun 2019 18:49:59 +0000 (21:49 +0300)]
Merge pull request #4610 from donaldsharp/pim_igmp_connected_source

[master]pimd: Dissallow query to be received from a non-connected source

4 years agoMerge pull request #4617 from LabNConsulting/working/master/bgp2vrf_imp1
Mark Stapp [Thu, 27 Jun 2019 13:32:52 +0000 (09:32 -0400)]
Merge pull request #4617 from LabNConsulting/working/master/bgp2vrf_imp1

topotests/ bgp_l3vpn_to_bgp_vrf: improvements

4 years agotopotest: reduce chattiness of lutil output
Lou Berger [Wed, 26 Jun 2019 20:30:59 +0000 (20:30 +0000)]
topotest: reduce chattiness of lutil output

Signed-off-by: Lou Berger <lberger@labn.net>
4 years agoNexthop Tracking and Static route fix (#4602)
David Lamparter [Wed, 26 Jun 2019 18:37:55 +0000 (20:37 +0200)]
Nexthop Tracking and Static route fix (#4602)

Nexthop Tracking and Static route fix

4 years agobgp_l3vpn_to_bgp_vrf: report zebra memory stats
Lou Berger [Wed, 26 Jun 2019 17:54:20 +0000 (17:54 +0000)]
bgp_l3vpn_to_bgp_vrf: report zebra memory stats

Signed-off-by: Lou Berger <lberger@labn.net>
4 years agobgp_l3vpn_to_bgp_vrf: refactor to try to avoid periodic failure, also collect more...
Lou Berger [Wed, 26 Jun 2019 17:53:46 +0000 (17:53 +0000)]
bgp_l3vpn_to_bgp_vrf: refactor to try to avoid periodic failure, also collect more info

Signed-off-by: Lou Berger <lberger@labn.net>
4 years agolib: Private api for nexthop_group manipulation
Stephen Worley [Mon, 24 Jun 2019 18:04:13 +0000 (14:04 -0400)]
lib: Private api for nexthop_group manipulation

Add a file that exposes functions which modify nexthop groups.
Nexthop groups are techincally immutable but there are a
few special cases where we need direct access to add/remove
nexthops after the group has been made. This file provides a
way to expose those functions in a way that makes it clear
this is a private/hidden api.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agolib: Add a nexthop_dup() that allocates and copies
Stephen Worley [Mon, 24 Jun 2019 15:37:49 +0000 (11:37 -0400)]
lib: Add a nexthop_dup() that allocates and copies

Add a nexthop_dup() api that both allocates and copies
a new nexthop from an old one. Still retain the old exposed
function nexthop_copy() so we can copy without allocation.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agolib: Put single nexthop copy into its own function
Stephen Worley [Tue, 14 May 2019 22:40:27 +0000 (15:40 -0700)]
lib: Put single nexthop copy into its own function

Put the code to copy a single nexthop into a function
of its own.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agolib: Add a couple functions to nexthop_group.c
Donald Sharp [Thu, 20 Sep 2018 17:59:35 +0000 (13:59 -0400)]
lib: Add a couple functions to nexthop_group.c

Add nexthop_group_copy and nexthop_group_add_sorted functions.

nexthop_group_copy -> Copy src nexthop_group into dst nexthop_group
nexthop_group_add_sorted -> Adds a new nexthop to the nexthop group
in a sorted manner.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agovtysh: Try to be perscriptive about pam failures
Donald Sharp [Wed, 26 Jun 2019 00:14:25 +0000 (20:14 -0400)]
vtysh: Try to be perscriptive about pam failures

When using pam for authentication, the code just silently
fails and gives no indication to the end user what has gone
wrong.  Try to increase messaging about what has gone wrong
by outputting some more data.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4575 from nitinsoniism/show_mac_arp_cache_vni_json_fix
Sri Mohana Singamsetty [Wed, 26 Jun 2019 00:03:14 +0000 (17:03 -0700)]
Merge pull request #4575 from nitinsoniism/show_mac_arp_cache_vni_json_fix

zebra: show evpn mac vni xx json output is broken

4 years agozebra: When installing route use a good proto
Donald Sharp [Tue, 25 Jun 2019 21:47:51 +0000 (17:47 -0400)]
zebra: When installing route use a good proto

When installing a table route into the kernel choose
RTPROT_ZEBRA as the installing/controlling protocol.

This way we can know we installed it as well as stop
the warnings about this special case of `ip import-table XX`

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: import table entries are not showing up in the right table
Donald Sharp [Tue, 25 Jun 2019 21:10:12 +0000 (17:10 -0400)]
zebra: import table entries are not showing up in the right table

When we are importing/removing the table entry from table X into the
default routing table we are not properly setting the table_id
of the route entry.  This is causing the route to be pushed
into the wrong internal table and to not be found for deletion.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Push VRF_DEFAULT outside of import table code
Donald Sharp [Tue, 25 Jun 2019 21:07:30 +0000 (17:07 -0400)]
zebra: Push VRF_DEFAULT outside of import table code

The import table code assumes that they will only work
in the default vrf.  This is ok, but we should push the
vrf_id and zvrf to be passed in instead of just using
VRF_DEFAULT.

This will allow us to fix a couple of things:

1) A bug in import where we are not creating the
route entry with the appropriate table so the imported
entry is showing up in the wrong spot.

2) In the future allow `ip import-table X` to become
vrf aware very easily.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Use correct parameter order for table lookup up.
Donald Sharp [Tue, 25 Jun 2019 20:35:40 +0000 (16:35 -0400)]
zebra: Use correct parameter order for table lookup up.

The import-table code when looking up the table to use
for route-import was reversing the order of the table_id
and vrf_id causing us to never ever lookup a table
and we would cause the `ip|ipv6 import-table X` commands
to be just ignored.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Improve debugging when we can't find a route to delete
Donald Sharp [Tue, 25 Jun 2019 21:45:55 +0000 (17:45 -0400)]
zebra: Improve debugging when we can't find a route to delete

Improve debugging when we cannot find a route to delete
that we have been told to delete.

New output:

2019/06/25 17:43:49 ZEBRA: default[0]:4.5.6.7/32 doesn't exist in rib
2019/06/25 17:43:49 ZEBRA: default[0]:4.5.6.8/32 doesn't exist in rib

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4525 from donaldsharp/some_cleanups
Rafael Zalamena [Tue, 25 Jun 2019 19:06:57 +0000 (16:06 -0300)]
Merge pull request #4525 from donaldsharp/some_cleanups

Some cleanups

4 years agoMerge pull request #4570 from donaldsharp/route_map_clear
Sri Mohana Singamsetty [Tue, 25 Jun 2019 17:34:11 +0000 (10:34 -0700)]
Merge pull request #4570 from donaldsharp/route_map_clear

lib: Add `clear route-map counters [WORD]` command

4 years agoMerge pull request #4606 from donaldsharp/no_redist_fixup
Renato Westphal [Tue, 25 Jun 2019 16:34:27 +0000 (13:34 -0300)]
Merge pull request #4606 from donaldsharp/no_redist_fixup

bgpd: Fixup `no redistribute ...` commands to allow any order

4 years agoMerge pull request #4522 from LabNConsulting/working/master/issue4479
Quentin Young [Tue, 25 Jun 2019 15:45:19 +0000 (11:45 -0400)]
Merge pull request #4522 from LabNConsulting/working/master/issue4479

bgpd: address issue #4479 crash during instance removal

4 years agoMerge pull request #4544 from chiragshah6/mdev
Sri Mohana Singamsetty [Tue, 25 Jun 2019 15:45:04 +0000 (08:45 -0700)]
Merge pull request #4544 from chiragshah6/mdev

bgpd: print ecom in evpn route output

4 years agoMerge pull request #4458 from karamalla0406/frr4123
Donald Sharp [Tue, 25 Jun 2019 15:30:14 +0000 (11:30 -0400)]
Merge pull request #4458 from karamalla0406/frr4123

zebra: Clean up BGP EVPN configuration when the client, BGPD, goes down

4 years agodoc: Add a performance note for log filtering
Stephen Worley [Tue, 25 Jun 2019 14:49:43 +0000 (10:49 -0400)]
doc: Add a performance note for log filtering

Add a not under the log-filter command to indicate
that, while filtering reduces load on the system by
large margins, there may still be a small performance
hit from filtering those.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agoMerge pull request #4603 from opensourcerouting/vty-recursion
Donald Sharp [Tue, 25 Jun 2019 13:19:57 +0000 (09:19 -0400)]
Merge pull request #4603 from opensourcerouting/vty-recursion

lib: add a check for {[...]} in DEFUNs

4 years agoPim bug fixes (#4519)
David Lamparter [Tue, 25 Jun 2019 12:08:48 +0000 (14:08 +0200)]
Pim bug fixes (#4519)

Pim bug fixes

Co-authored-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agoMerge pull request #4588 from donaldsharp/vrrp_access_list
David Lamparter [Tue, 25 Jun 2019 12:08:08 +0000 (14:08 +0200)]
Merge pull request #4588 from donaldsharp/vrrp_access_list

vrrpd: Allow vrrp to gracefully ignore access list commands

4 years agoMerge pull request #4520 from rgirada/fix_clear_mroute
David Lamparter [Tue, 25 Jun 2019 12:06:13 +0000 (14:06 +0200)]
Merge pull request #4520 from rgirada/fix_clear_mroute

pimd: Added cli to generate igmp query.

4 years agoMerge pull request #4584 from donaldsharp/rib_detail_improvements
David Lamparter [Tue, 25 Jun 2019 12:03:55 +0000 (14:03 +0200)]
Merge pull request #4584 from donaldsharp/rib_detail_improvements

zebra logging improvements

4 years agolib: add a check for {[...]} in DEFUNs
David Lamparter [Tue, 25 Jun 2019 11:34:12 +0000 (13:34 +0200)]
lib: add a check for {[...]} in DEFUNs

Our command matcher doesn't handle {[...]} correctly;  let's warn about
it so the DEFUN can be changed to [{...}] (which does work as expected.)

Fixes: #4594
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agopimd: Dissallow query to be received from a non-connected source
Donald Sharp [Tue, 25 Jun 2019 04:30:11 +0000 (00:30 -0400)]
pimd: Dissallow query to be received from a non-connected source

When we receive an igmp query on a interface, ensure that the
source address of the packet is connected to the incoming
interface.  This will prevent a meanie from crafting a igmp
packet with a source address less than ours and causing
us to suspend query activities.

Fixes: #1692
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Fixup `no redistribute ...` commands to allow any order
Donald Sharp [Mon, 24 Jun 2019 23:11:55 +0000 (19:11 -0400)]
bgpd: Fixup `no redistribute ...` commands to allow any order

The `no redistribute ...` commands were not allowing
the input to be in any order.  Fix code to allow this.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agostaticd: If we are told a nexthop has changed reinstall the route.
Donald Sharp [Mon, 24 Jun 2019 14:46:24 +0000 (10:46 -0400)]
staticd: If we are told a nexthop has changed reinstall the route.

If we are told that a dependant nexthop has changed, just
reinstall the route.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Fix rnh old -vs- new comparison
Donald Sharp [Mon, 24 Jun 2019 13:50:55 +0000 (09:50 -0400)]
zebra: Fix rnh old -vs- new comparison

1) If we are moving the nexthop we are tracking to
a new rn in the rib, then we know that the route
to get to that nexthop has changed.  As such
we should notify the upper level.

This manifested itself because the code had a trigraph `?`
in the wrong order.  Put the comparison in the right order.

2) If we are re-matching to the same rn and we call compare_state
then we need to see if our stored nexthops are the same or different.

If they are the same we should not notify.  If they are different
we should notify.  compare_state was only comparing the flags
on a route and since those are not necessarily the right flags
to look at( and we are well after the fact that the route has
already changed and been processed ) let's just compare
the nexthops to see if they are the same or different.

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