]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
4 years agolib: Use gotos in filter control functions
Stephen Worley [Tue, 18 Jun 2019 21:57:57 +0000 (17:57 -0400)]
lib: Use gotos in filter control functions

Use gotos to reduce return paths in the log filter
add/del/dump functions.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agotests: Make checkRouterRunning() `show logging`
Stephen Worley [Fri, 14 Jun 2019 18:13:22 +0000 (14:13 -0400)]
tests: Make checkRouterRunning() `show logging`

Adding in the command `show log-filter` made `show log`
ambiguous. Change the checkRouterRunning() test to do
full `show logging` so it works again.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agolib: Add vrrpd,sharpd to DAEMONS_* strings
Stephen Worley [Thu, 13 Jun 2019 21:59:16 +0000 (17:59 -0400)]
lib: Add vrrpd,sharpd to DAEMONS_* strings

Add vrrpd and sharpd to the DAEMONS_* list so they
can be dispatched daemons independent commands
such as `show work-queues` and `log-filter`.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agodoc: Add docs for log-filter and show log-filter
Stephen Worley [Thu, 13 Jun 2019 20:07:08 +0000 (16:07 -0400)]
doc: Add docs for log-filter and show log-filter

Add some user documentation for applying/deleting/showing
log filters with the new commands.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agolib: Filter logs as they come in via macros
Stephen Worley [Thu, 13 Jun 2019 21:48:53 +0000 (17:48 -0400)]
lib: Filter logs as they come in via macros

As logging functions are called, if filters are stored,
look for the filter substring in the logs. If it is not
found, do not output the log to a file or stdout.

If the filter is matched, handle the log call per usual.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agolib,vtysh: Add vtysh commands for log-filter
Stephen Worley [Thu, 13 Jun 2019 21:46:29 +0000 (17:46 -0400)]
lib,vtysh: Add vtysh commands for log-filter

Add vtysh commands to add/del/clear/show filters across
all daemons and independently on each one. Add automake and
clippy boilerplate for those commands as well.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agovtysh: Make show work-queue execute by name
Stephen Worley [Thu, 13 Jun 2019 21:31:38 +0000 (17:31 -0400)]
vtysh: Make show work-queue execute by name

Update show work-queue to use the execute_name() code
path when dispatching to a specific daemon.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agovtysh: Execute command on client by name only
Stephen Worley [Thu, 13 Jun 2019 21:29:33 +0000 (17:29 -0400)]
vtysh: Execute command on client by name only

Add static function path for exectuting a command
on a client daemon via a string of its name only.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agolib: Use memmove to adjust filters after del
Stephen Worley [Tue, 18 Jun 2019 23:22:03 +0000 (19:22 -0400)]
lib: Use memmove to adjust filters after del

Simplify the code in deleting a filter by using memmove rather
than iterating. Memmove handles overlapping strings safely so
this is fine here.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agolib: Add log filter manipulation code
Stephen Worley [Thu, 13 Jun 2019 21:15:32 +0000 (17:15 -0400)]
lib: Add log filter manipulation code

Add code for manipulation/creation of log filters
and their table. Specifically, add lookup,clear,add,del,dump
functionality.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agovtysh: Update vtysh commands with all daemon str
Stephen Worley [Thu, 13 Jun 2019 21:08:36 +0000 (17:08 -0400)]
vtysh: Update vtysh commands with all daemon str

Update the vtysh commands that target all daemons to
use the DAEMONS_* macro.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agolib: Add some all daemon command strings
Stephen Worley [Thu, 13 Jun 2019 21:06:36 +0000 (17:06 -0400)]
lib: Add some all daemon command strings

Add some strings for defining vty commands that target
all daemons.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agoMerge pull request #4557 from dslicenc/zebra_rnh_eval
Mark Stapp [Wed, 19 Jun 2019 16:14:13 +0000 (12:14 -0400)]
Merge pull request #4557 from dslicenc/zebra_rnh_eval

zebra: resolve issue with rnh not evaluating nexhops correctly

4 years agozebra: resolve issue with rnh not evaluating nexhops correctly
Don Slice [Wed, 19 Jun 2019 11:22:21 +0000 (11:22 +0000)]
zebra: resolve issue with rnh not evaluating nexhops correctly

Problem discovered in testing that occasionally when an interface
address was flushed, the corresponding route would be removed from
the kernel and zebra but remain in the bgp table and be advertised
to peers.  Discovered that when zebra_rib_evaluate_nexthops spun
thru the tree list of rns, if the timing and circumstances were
right, it would move elements and miss evaluating some.  Changed
from frr_each to frr_each_safe and the problem is now gone.

Ticket: CM-25301
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
4 years agoMerge pull request #4554 from donaldsharp/nht_improved_debugging
Mark Stapp [Wed, 19 Jun 2019 13:02:26 +0000 (09:02 -0400)]
Merge pull request #4554 from donaldsharp/nht_improved_debugging

zebra: Display a bit better debugging for rnh tracking

4 years agoMerge pull request #4553 from qlyoung/readme-add-vrrp
Mark Stapp [Wed, 19 Jun 2019 12:39:18 +0000 (08:39 -0400)]
Merge pull request #4553 from qlyoung/readme-add-vrrp

README.md: add VRRP to list of protocols

4 years agoMerge pull request #4260 from vishaldhingra/lcomm
Donald Sharp [Wed, 19 Jun 2019 00:45:57 +0000 (20:45 -0400)]
Merge pull request #4260 from vishaldhingra/lcomm

bgpd: Added the as-set option for IPV6 agg. route

4 years agozebra: Display a bit better debugging for rnh tracking
Donald Sharp [Tue, 18 Jun 2019 19:47:10 +0000 (15:47 -0400)]
zebra: Display a bit better debugging for rnh tracking

Add a expected count for the route node we will be processing
as part of nexthop resolution and modify the type to display
a useful string of what the type is instead of a number.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4495 from donaldsharp/pim_debug_expiry
Russ White [Tue, 18 Jun 2019 15:31:02 +0000 (11:31 -0400)]
Merge pull request #4495 from donaldsharp/pim_debug_expiry

pimd: Add a debug to indicate the ifchannel expiry timer has popped

4 years agoMerge pull request #4300 from adharkar/frr-master-rmap_debug
Donald Sharp [Tue, 18 Jun 2019 15:24:10 +0000 (11:24 -0400)]
Merge pull request #4300 from adharkar/frr-master-rmap_debug

Lib: Debugs for route-map code in FRR

4 years agoMerge pull request #4513 from chiragshah6/evpn_dev1
Sri Mohana Singamsetty [Tue, 18 Jun 2019 14:10:05 +0000 (07:10 -0700)]
Merge pull request #4513 from chiragshah6/evpn_dev1

bgpd: skip evpn remove marked routes from rescan

4 years agoMerge pull request #4543 from donaldsharp/mac_hash_string_leak
Russ White [Tue, 18 Jun 2019 14:07:58 +0000 (10:07 -0400)]
Merge pull request #4543 from donaldsharp/mac_hash_string_leak

bgpd: Fix memleak of Mac Hash String upon insertion

4 years agoMerge pull request #4546 from donaldsharp/better_debugs
Russ White [Tue, 18 Jun 2019 14:06:54 +0000 (10:06 -0400)]
Merge pull request #4546 from donaldsharp/better_debugs

zebra: Increase debugs to understand why we rejected a kernel route

4 years agozebra: Increase debugs to understand why we rejected a kernel route
Donald Sharp [Tue, 18 Jun 2019 12:47:28 +0000 (08:47 -0400)]
zebra: Increase debugs to understand why we rejected a kernel route

Add a bit of extra code to indicate to the operator why
we intentionally rejected a kernel route from being used.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4530 from donaldsharp/pim_debugs
Rafael Zalamena [Tue, 18 Jun 2019 11:44:33 +0000 (08:44 -0300)]
Merge pull request #4530 from donaldsharp/pim_debugs

Pim debugs

4 years agoREADME.md: add VRRP to list of protocols
Quentin Young [Tue, 18 Jun 2019 02:07:07 +0000 (02:07 +0000)]
README.md: add VRRP to list of protocols

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agobgpd: Fix memleak of Mac Hash String upon insertion
Donald Sharp [Tue, 18 Jun 2019 00:16:30 +0000 (20:16 -0400)]
bgpd: Fix memleak of Mac Hash String upon insertion

If we get a callback for a interface change but we do not
actually have to move the mac entry in the hash then
we were accidently leaking the Mac Hash String all over
ourselves.  Messy Messy!

Ticket: CM-25351
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4514 from opensourcerouting/warnings-20190612
Donald Sharp [Mon, 17 Jun 2019 19:19:42 +0000 (15:19 -0400)]
Merge pull request #4514 from opensourcerouting/warnings-20190612

*: kill more warnings

4 years agoDocument FRR service manipulation (#4528)
David Lamparter [Mon, 17 Jun 2019 19:16:55 +0000 (21:16 +0200)]
Document FRR service manipulation (#4528)

Document FRR service manipulation

4 years agoMerge pull request #4538 from dslicenc/int_vrf_all_brief
Mark Stapp [Mon, 17 Jun 2019 18:46:01 +0000 (14:46 -0400)]
Merge pull request #4538 from dslicenc/int_vrf_all_brief

zebra: add ability to "show interface vrf all brief"

4 years agoMerge pull request #4505 from ton31337/feature/autocomplete_bgp_peer-group
Quentin Young [Mon, 17 Jun 2019 17:53:48 +0000 (13:53 -0400)]
Merge pull request #4505 from ton31337/feature/autocomplete_bgp_peer-group

bgpd: List all groups dynamically for commands with peer-group

4 years agoMerge pull request #4537 from mjstapp/fix_mpls_config_doc
Quentin Young [Mon, 17 Jun 2019 17:52:13 +0000 (13:52 -0400)]
Merge pull request #4537 from mjstapp/fix_mpls_config_doc

doc: add config file name for mpls config

4 years agozebra: add ability to "show interface vrf all brief"
Don Slice [Thu, 13 Jun 2019 11:22:11 +0000 (11:22 +0000)]
zebra: add ability to "show interface vrf all brief"

Found that the "show interface brief" command was missing the
ability to specify all vrfs.   Added that capability via this
fix.

Ticket: CM-25139
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
4 years agoMerge pull request #4517 from chiragshah6/mdev
Sri Mohana Singamsetty [Mon, 17 Jun 2019 17:10:13 +0000 (10:10 -0700)]
Merge pull request #4517 from chiragshah6/mdev

bgpd: show bgp vrfs formatting

4 years agodoc: add service control instructions
Quentin Young [Fri, 14 Jun 2019 17:37:15 +0000 (17:37 +0000)]
doc: add service control instructions

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agodoc: add config file name for mpls config
Mark Stapp [Mon, 17 Jun 2019 16:08:06 +0000 (12:08 -0400)]
doc: add config file name for mpls config

We say something about what needs to be configured - but don't
name the file where the change needs to go.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #4532 from donaldsharp/fuzzing
Mark Stapp [Mon, 17 Jun 2019 14:11:59 +0000 (10:11 -0400)]
Merge pull request #4532 from donaldsharp/fuzzing

zebra: Fuzzing code has gotten a bit out of date

4 years agobgpd: Added the as-set option for IPV6 agg. route
vishaldhingra [Mon, 6 May 2019 03:57:58 +0000 (20:57 -0700)]
bgpd: Added the as-set option for IPV6 agg. route

FRR has no option for the as-set for aggregate route
under IPV6 address family. Added the command to
configure the as-set option for IPV6.

Signed-off-by: vishaldhingra <vdhingra@vmware.com>
4 years agozebra: Fuzzing code has gotten a bit out of date
Donald Sharp [Sat, 15 Jun 2019 12:25:25 +0000 (08:25 -0400)]
zebra: Fuzzing code has gotten a bit out of date

Update the fuzzing code to compile again.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agopimd: Add debugs for channel_oil creation and deletion
Donald Sharp [Fri, 14 Jun 2019 23:18:51 +0000 (19:18 -0400)]
pimd: Add debugs for channel_oil creation and deletion

Add some debugs so we can see channel oil creation and deletion
events.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agopimd: Display ifp name in pim_channel_oil_dump
Donald Sharp [Fri, 14 Jun 2019 23:01:46 +0000 (19:01 -0400)]
pimd: Display ifp name in pim_channel_oil_dump

The vifi being displayed is just confusing.  Display the
actual interface name being used in the mroute.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib: Prevent infinite loop in fd handling (#4516)
David Lamparter [Fri, 14 Jun 2019 21:48:36 +0000 (23:48 +0200)]
lib: Prevent infinite loop in fd handling (#4516)

lib: Prevent infinite loop in fd handling

4 years agoeliminate snprintf from AF_INET/AF_INET6 prefix2str, add prefix2str test (#4521)
David Lamparter [Fri, 14 Jun 2019 19:48:34 +0000 (21:48 +0200)]
eliminate snprintf from AF_INET/AF_INET6 prefix2str, add prefix2str test (#4521)

eliminate snprintf from AF_INET/AF_INET6 prefix2str, add prefix2str test

4 years agodoc: add vrrpd service line
Quentin Young [Fri, 14 Jun 2019 17:37:00 +0000 (17:37 +0000)]
doc: add vrrpd service line

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #4523 from LabNConsulting/working/master/issue4515
David Lamparter [Fri, 14 Jun 2019 16:28:04 +0000 (18:28 +0200)]
Merge pull request #4523 from LabNConsulting/working/master/issue4515

tests/topotests: bgp_l3vpn_to_bgp_vrf address issue #4515

4 years agoMerge pull request #4526 from CHKDSK88/endian
Donald Sharp [Fri, 14 Jun 2019 16:05:41 +0000 (12:05 -0400)]
Merge pull request #4526 from CHKDSK88/endian

eigrpd: Fix endianness issue in packets

4 years agobgpd: show bgp vrfs formatting
Chirag Shah [Tue, 11 Jun 2019 22:06:57 +0000 (15:06 -0700)]
bgpd: show bgp vrfs formatting

show bgp vrfs command is formatted with couple
of things.

show bgp vrfs to inclue bgp vrf instance's
SVI interface.
Move L3vni, RMAC and SVI value in next line.

Ticket:CM-25317
Reviewed By:CCR-8816
Testing Done:

New Output:
TORS1# show bgp vrfs
Type  Id     routerId          #PeersVfg  #PeersEstb  Name
             L3-VNI            RouterMAC              Interface
DFLT  0      27.0.0.15         2          2           default
             0                 00:00:00:00:00:00      unknown
 VRF  31     45.0.8.2          0          0           vrf3
             4003              00:02:00:00:00:4e      vlan4003
 VRF  35     45.0.2.2          0          0           vrf1
             4001              00:02:00:00:00:4e      vlan4001
 VRF  25     45.0.6.2          0          0           vrf2
             4002              00:02:00:00:00:4e      vlan4002

Total number of VRFs (including default): 4

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agoeigrpd: Fix endianness issue in packets
Pawel Dembicki [Fri, 14 Jun 2019 10:28:00 +0000 (12:28 +0200)]
eigrpd: Fix endianness issue in packets

Net prefixes in eigrp update packets is created and read
without check host endianness.

This patch use ntohl and htonl to read and write ip prefix
from and to packet.

Tested: x86, powerpc

Signed-off-by: Pawel Dembicki <p.dembicki@wb.com.pl>
4 years agoMerge pull request #4512 from mjstapp/fix_bgp_auto_rid
Sri Mohana Singamsetty [Fri, 14 Jun 2019 00:55:59 +0000 (17:55 -0700)]
Merge pull request #4512 from mjstapp/fix_bgp_auto_rid

bgpd: auto router-id should not change configured vpn RD/RT

4 years agotests/topotests: bgp_l3vpn_to_bgp_vrf double the amount of time to wait during scalin...
Lou Berger [Thu, 13 Jun 2019 21:01:30 +0000 (21:01 +0000)]
tests/topotests: bgp_l3vpn_to_bgp_vrf double the amount of time to wait during scaling tests

Signed-off-by: Lou Berger <lberger@labn.net>
4 years agoMerge pull request #4499 from kssoman/core
Lou Berger [Thu, 13 Jun 2019 20:08:11 +0000 (16:08 -0400)]
Merge pull request #4499 from kssoman/core

bgpd: Process core when bgp instance is deleted

4 years agobgpd, lib: Add iana_afi2str and iana_safi2str for eye pleasing strings (#4439)
David Lamparter [Thu, 13 Jun 2019 20:06:49 +0000 (22:06 +0200)]
bgpd, lib: Add iana_afi2str and iana_safi2str for eye pleasing strings (#4439)

bgpd, lib: Add iana_afi2str and iana_safi2str for eye pleasing strings

4 years agolib: Add function name to `show thread poll`
Donald Sharp [Thu, 13 Jun 2019 02:36:45 +0000 (22:36 -0400)]
lib: Add function name to `show thread poll`

When displaying `show thread poll` data add the
function we are supposed to call when the poll
event happens.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib: Add check for non-preexisting thread
Donald Sharp [Thu, 13 Jun 2019 02:27:29 +0000 (22:27 -0400)]
lib: Add check for non-preexisting thread

When adding a read/write poll event and we are using a developmental
build add a bit of code to ensure that we do not already have an read
or write event scheduled.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib: Prevent infinite loop in fd handling
Donald Sharp [Thu, 13 Jun 2019 01:13:18 +0000 (21:13 -0400)]
lib: Prevent infinite loop in fd handling

If we have a case where have created a fd for i/o and we have
removed the handling thread but still have the fd in the poll
data structure, there existed a case where we would get
the handle this fd return from poll but we would immediately
do nothing with it because we didn't have a thread to hand
the event to.

This leads to an infinite loop.  Prevent the infinite loop
from happening and log the problem.

We still need to find the cause of this happening.  But
let's prevent the system from melting down in the mean time.

Fixes: #2796
Signed-off-by: David Lamparter <equinox@diac24.net>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4500 from opensourcerouting/clippy-improve
Quentin Young [Thu, 13 Jun 2019 19:06:24 +0000 (15:06 -0400)]
Merge pull request #4500 from opensourcerouting/clippy-improve

clippy: batch of improvements

4 years agobgpd: fix uninitialized & wrong endian NOTIFY
David Lamparter [Wed, 12 Jun 2019 21:17:26 +0000 (23:17 +0200)]
bgpd: fix uninitialized & wrong endian NOTIFY

notify_data_remote_as4 would contain garbage if optlen == 0, and also
as4 is in host byte order while the notify needs network byte order.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agobgpd/rfapi: fix clang-SA warning
David Lamparter [Wed, 12 Jun 2019 20:41:49 +0000 (22:41 +0200)]
bgpd/rfapi: fix clang-SA warning

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agotests: add prefix2str test
Quentin Young [Thu, 13 Jun 2019 18:18:42 +0000 (18:18 +0000)]
tests: add prefix2str test

Only tests IPv4 and IPv6 right now.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #4509 from opensourcerouting/spanish-intquisition
Quentin Young [Thu, 13 Jun 2019 18:00:50 +0000 (14:00 -0400)]
Merge pull request #4509 from opensourcerouting/spanish-intquisition

lib: make printfrr int64_t usable

4 years agolib: remove snprintf from prefix2str
Quentin Young [Thu, 13 Jun 2019 17:08:05 +0000 (17:08 +0000)]
lib: remove snprintf from prefix2str

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #4502 from opensourcerouting/topotest-backward-compat
Donald Sharp [Thu, 13 Jun 2019 13:19:02 +0000 (09:19 -0400)]
Merge pull request #4502 from opensourcerouting/topotest-backward-compat

topotests: backward compatibility fix

4 years agoMerge pull request #4448 from opensourcerouting/cxx-container-of
Mark Stapp [Thu, 13 Jun 2019 12:38:05 +0000 (08:38 -0400)]
Merge pull request #4448 from opensourcerouting/cxx-container-of

lib: const-unaware container_of for C++

4 years agoldpd: fix clang-SA warning in packet reading
David Lamparter [Wed, 12 Jun 2019 20:39:18 +0000 (22:39 +0200)]
ldpd: fix clang-SA warning in packet reading

clang-SA thinks we can skip the SA but have something allocated in buf.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agoospfd: fix clang-SA warning
David Lamparter [Wed, 12 Jun 2019 20:32:30 +0000 (22:32 +0200)]
ospfd: fix clang-SA warning

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agobuild: improve ranlib -D autoconf test
David Lamparter [Wed, 12 Jun 2019 18:43:31 +0000 (20:43 +0200)]
build: improve ranlib -D autoconf test

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agoripd, ripngd: fix OpenBSD compiler warning
David Lamparter [Wed, 12 Jun 2019 18:39:46 +0000 (20:39 +0200)]
ripd, ripngd: fix OpenBSD compiler warning

The fact that the OpenBSD RB_TREE stuff results in a compiler warning on
OpenBSD - and OpenBSD alone - is pretty funny, I have to say...

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years ago*: config.h or zebra.h is the first #include
David Lamparter [Wed, 12 Jun 2019 18:18:12 +0000 (20:18 +0200)]
*: config.h or zebra.h is the first #include

This is mostly relevant for Solaris, where config.h sets up some #define
that affect overall header behaviour, so it needs to be before anything
else.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agobgpd: fix clang format warning
David Lamparter [Wed, 12 Jun 2019 18:06:23 +0000 (20:06 +0200)]
bgpd: fix clang format warning

... by simplifying the code to use %pI6 instead.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agoMerge pull request #4506 from opensourcerouting/fix-outdated-candidate
Donald Sharp [Thu, 13 Jun 2019 10:01:28 +0000 (06:01 -0400)]
Merge pull request #4506 from opensourcerouting/fix-outdated-candidate

lib: fix outdated candidate configuration issue

4 years agobgpd: skip evpn remove marked routes from rescan
Chirag Shah [Tue, 4 Jun 2019 01:42:00 +0000 (18:42 -0700)]
bgpd: skip evpn remove marked routes from rescan

Skip evpn routes marked for removed from rescan list
when an interface is flapped.

Ticket:CM-24933
Testing Done:
Validated in a scenario where evpn route is marked
for remove as bgp evpn withdrawal is received. Due to
link flap (frr restart of downstream router), the route
was considered for readd via bgp_update. With this
fix, the remove marked routes are skipped from update.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agoDocker binary image on Debian Buster (#4504)
David Lamparter [Wed, 12 Jun 2019 22:24:27 +0000 (00:24 +0200)]
Docker binary image on Debian Buster (#4504)

Docker binary image on Debian Buster

4 years agolib/clippy: ignore -Wstrict-aliasing
David Lamparter [Wed, 12 Jun 2019 17:16:40 +0000 (19:16 +0200)]
lib/clippy: ignore -Wstrict-aliasing

This warning is both meaningless and unfixable, just ignore it.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib: drop DSO_SELF on inet_ntop
David Lamparter [Wed, 12 Jun 2019 17:15:02 +0000 (19:15 +0200)]
lib: drop DSO_SELF on inet_ntop

NetBSD doesn't seem to like this.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years ago*: fix northbound initializer warning on OpenBSD
David Lamparter [Wed, 12 Jun 2019 17:13:30 +0000 (19:13 +0200)]
*: fix northbound initializer warning on OpenBSD

For some reason, the compiler on OpenBSD on our CI boxes doesn't like
struct initializers with ".a.b = x, .a.c = y", generating a warning
about overwritten initializers...

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agoMerge pull request #4510 from sworleys/DOC-systemd-devel
David Lamparter [Wed, 12 Jun 2019 17:58:17 +0000 (19:58 +0200)]
Merge pull request #4510 from sworleys/DOC-systemd-devel

doc: Add systemd-devel to fedora build instruction

4 years agobuild: use -O2, not -Os
David Lamparter [Wed, 12 Jun 2019 15:37:24 +0000 (17:37 +0200)]
build: use -O2, not -Os

apparently -Os is quite a bit slower...

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agotools: add vim snippet
David Lamparter [Wed, 12 Jun 2019 15:32:29 +0000 (17:32 +0200)]
tools: add vim snippet

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib: make "%Ld" work for int64_t
David Lamparter [Wed, 12 Jun 2019 15:08:01 +0000 (17:08 +0200)]
lib: make "%Ld" work for int64_t

... without compiler plugins.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib: use snprintfrr() in "hidden" printfs
David Lamparter [Wed, 12 Jun 2019 15:11:21 +0000 (17:11 +0200)]
lib: use snprintfrr() in "hidden" printfs

We need to be calling snprintfrr() instead of snprintf() in places that
wrap snprintf in some user-exposed way; otherwise the extensions won't
be available for those functions.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agozebra: fix stats printing formats
David Lamparter [Wed, 12 Jun 2019 17:35:08 +0000 (19:35 +0200)]
zebra: fix stats printing formats

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib/clippy: expand some macros
David Lamparter [Tue, 11 Jun 2019 13:35:28 +0000 (15:35 +0200)]
lib/clippy: expand some macros

At least the "easy" cases of macros work.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib/clippy: assert() for non-optional args
David Lamparter [Tue, 4 Jun 2019 18:27:05 +0000 (20:27 +0200)]
lib/clippy: assert() for non-optional args

This is mostly to help static analysis; since we know from the command
string which args are optional and which aren't, we can add assert()
statements on them.

Fixes: #3270
Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib/clippy: error out on unsupported bits
David Lamparter [Tue, 4 Jun 2019 15:07:57 +0000 (17:07 +0200)]
lib/clippy: error out on unsupported bits

clippy can't process #ifdef or similar bits inside of an argument list
(e.g. within the braces of a DEFUN or DEFPY statement.)  Improve error
reporting to catch these cases instead of generating broken C code.

Fixes: #3840
Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agobuild: improve env var handling for cross build
David Lamparter [Tue, 4 Jun 2019 14:20:20 +0000 (16:20 +0200)]
build: improve env var handling for cross build

We can use `$ac_precious_vars` to get at autoconf's conception of which
environment variables are relevant.  This makes "HOST_..." setup more
consistent for cross-compilation setups.

Fixes: #4006
Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agobuild: improve clippy options
David Lamparter [Tue, 4 Jun 2019 13:35:16 +0000 (15:35 +0200)]
build: improve clippy options

* adds a `--with-clippy=...` option to use a prebuilt clippy binary
* limits the autoconf tests done for `--enable-clippy-only`
  (e.g. no libyang)

Fixes: #3921
Fixes: #4006
Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agobuild: remove tests/Makefile.in
David Lamparter [Tue, 4 Jun 2019 12:28:36 +0000 (14:28 +0200)]
build: remove tests/Makefile.in

this was accidentally added in 370c8e07

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agobuild: use -Wno-yacc on bison 3.3+
David Lamparter [Tue, 4 Jun 2019 12:23:29 +0000 (14:23 +0200)]
build: use -Wno-yacc on bison 3.3+

we only support bison, we don't care about yacc compatibility.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agobuild: slim down configure.ac
David Lamparter [Tue, 4 Jun 2019 12:12:30 +0000 (14:12 +0200)]
build: slim down configure.ac

Quite a few tests are deprecated/unnecessary at this point.  Remove
everything that is pointless.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agodoc: Add systemd-devel to fedora build instruction
Stephen Worley [Wed, 12 Jun 2019 15:59:21 +0000 (11:59 -0400)]
doc: Add systemd-devel to fedora build instruction

systemd-devel is a neccessary package for building frr, added to
the install list.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agobgpd: auto router-id should not change configured vpn RD/RT
Mark Stapp [Tue, 11 Jun 2019 17:47:15 +0000 (13:47 -0400)]
bgpd: auto router-id should not change configured vpn RD/RT

A router-id change that isn't explicitly configured (a change
from zebra, for example) should not replace a configured vpn
RD/RT.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agolib: fix outdated candidate configuration issue
Renato Westphal [Mon, 27 May 2019 22:48:13 +0000 (19:48 -0300)]
lib: fix outdated candidate configuration issue

Even when using the classic CLI mode (i.e. when --tcli is not
used), the northbound code still uses vty->candidate_config
to perform configuration changes. From the perspective of the
user, the running configuration is being edited directly, but
under the hood the northbound layer does a full configuration
transaction for each command.  When the running configuration is
edited by a northbound client other than the CLI (e.g. kernel,
gRPC), vty->candidate_config might become outdated, and this can
lead to lots of weird problems. To fix this, always regenerate
vty->candidate_config before each configuration command when
using the classic CLI mode. When using the transactional CLI,
the user needs to update the candidate manually using the "update"
command, otherwise the "commit" command will fail with this error:
"% Candidate configuration needs to be updated before commit".

Fixes some problems reported by Don after moving an interface from
one VRF to another one while zebra is running.

Reported-by: Don Slice <dslice@cumulusnetworks.com>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoMerge pull request #3509 from faickermo/fix_bgp_ipv6_default_nexthop
Donald Sharp [Wed, 12 Jun 2019 12:23:03 +0000 (08:23 -0400)]
Merge pull request #3509 from faickermo/fix_bgp_ipv6_default_nexthop

bgpd: Set bgp default nexthop value of IPv6

4 years agoLib: Debugs for route-map code in FRR
Ameya Dharkar [Thu, 9 May 2019 22:34:52 +0000 (15:34 -0700)]
Lib: Debugs for route-map code in FRR

Added a CLI "debug route-map" to enble route-map debugs

Added debugs for following triggers
1. Add/delete a route-map
2. Add/delete a sequence in route-map
3. Add/delete a match statement(dependency)
4. Update a dependency
5. Apply a route-map

Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
4 years agodocker: Docker binary image on Debian Buster
Rob Gil [Tue, 11 Jun 2019 15:47:08 +0000 (11:47 -0400)]
docker: Docker binary image on Debian Buster

Utilizes debian buster and the support libyang from the vendor.

Signed-off-by: Rob Gil <rob@rem5.com>
4 years agobgpd: List all groups dynamically for commands with peer-group
Donatas Abraitis [Tue, 11 Jun 2019 20:29:32 +0000 (23:29 +0300)]
bgpd: List all groups dynamically for commands with peer-group

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #4498 from ak503/ldpd
Quentin Young [Tue, 11 Jun 2019 18:16:35 +0000 (14:16 -0400)]
Merge pull request #4498 from ak503/ldpd

ldpd: Fix shutdown

4 years agotopotests: backward compatibility fix
Rafael Zalamena [Tue, 11 Jun 2019 16:53:13 +0000 (13:53 -0300)]
topotests: backward compatibility fix

Allow old topologies to use default parameters from `pytest.ini`.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agolib: const-unaware container_of for C++
David Lamparter [Mon, 3 Jun 2019 13:41:05 +0000 (15:41 +0200)]
lib: const-unaware container_of for C++

This version of container_of() should work on C++, by ditching the
unavailable builtins (at the cost of no longer checking for "const"
violations.)

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agobgpd: Process core when bgp instance is deleted
Soman K S [Tue, 11 Jun 2019 13:20:09 +0000 (06:20 -0700)]
bgpd: Process core when bgp instance is deleted

* When the bgp is being deleted and routes are in clear workqueue
  and new aggregate address being allocated
* Added flag BGP_FLAG_DELETE_IN_PROGRESS in bgp structure to
  bgp instance is being  deleted
* When adding aggregate route check this flag and  peer_self is valid

Signed-off-by: Soman K S <somanks@vmware.com>