]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
4 years agoMerge pull request #8148 from qlyoung/fix-pim-nb-static-mroute-loop-check
Jafar Al-Gharaibeh [Wed, 24 Feb 2021 23:50:57 +0000 (17:50 -0600)]
Merge pull request #8148 from qlyoung/fix-pim-nb-static-mroute-loop-check

pimd: do static mroute loop check in NB VALIDATE

4 years agopimd: do static mroute loop check in NB VALIDATE
Quentin Young [Wed, 24 Feb 2021 22:57:26 +0000 (17:57 -0500)]
pimd: do static mroute loop check in NB VALIDATE

We can proactively check whether this mroute will be nacked by loopfree
MFC checks so let's do it in the apply phase and emit a useful error
message.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agoMerge pull request #8128 from qlyoung/docs-cleanup
Mark Stapp [Wed, 24 Feb 2021 21:53:42 +0000 (16:53 -0500)]
Merge pull request #8128 from qlyoung/docs-cleanup

General docs cleanup

4 years agoMerge pull request #7957 from idryzhov/ospf-instance
Quentin Young [Wed, 24 Feb 2021 18:30:10 +0000 (13:30 -0500)]
Merge pull request #7957 from idryzhov/ospf-instance

4 years agoMerge pull request #8023 from volta-networks/feat_add_agentx_enabled_hook
Quentin Young [Wed, 24 Feb 2021 18:24:33 +0000 (13:24 -0500)]
Merge pull request #8023 from volta-networks/feat_add_agentx_enabled_hook

lib: add agentx_enabled hook

4 years agodoc: more misc. cleanups
Quentin Young [Wed, 24 Feb 2021 18:06:26 +0000 (13:06 -0500)]
doc: more misc. cleanups

- Re-add wrongly removed ISIS commands
- Re-add distribution commands in BGP
- Remove nonexistent commands in pathd
- Fix typo in OSPF6
- Improve command defs in PIM

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agovtysh: fix show_per_daemon for multi-instance ospfd
Igor Ryzhov [Wed, 27 Jan 2021 23:41:42 +0000 (02:41 +0300)]
vtysh: fix show_per_daemon for multi-instance ospfd

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoospfd: don't rely on instance existence in vty
Igor Ryzhov [Wed, 27 Jan 2021 23:41:07 +0000 (02:41 +0300)]
ospfd: don't rely on instance existence in vty

Store instance index at startup and use it when processing vty commands.
The instance itself may be created and deleted by the user in runtime
using `[no] router ospf X` command.

Fixes #7908

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoMerge pull request #7879 from AnuradhaKaruppiah/advertise-svi-mac
Patrick Ruddy [Wed, 24 Feb 2021 10:20:24 +0000 (10:20 +0000)]
Merge pull request #7879 from AnuradhaKaruppiah/advertise-svi-mac

evpn-mh: Advertise SVI MAC as a type-2 route if EVPN MH is enabled

4 years agoMerge pull request #8134 from ton31337/fix/doc_formatting
Quentin Young [Tue, 23 Feb 2021 23:50:18 +0000 (18:50 -0500)]
Merge pull request #8134 from ton31337/fix/doc_formatting

doc: Format highlighted syntax properly for Systemtap examples

4 years agodoc: clean up a couple snafus in doc changes
Quentin Young [Tue, 23 Feb 2021 20:57:56 +0000 (15:57 -0500)]
doc: clean up a couple snafus in doc changes

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agoMerge pull request #8035 from qlyoung/remove-more-sprintf
Mark Stapp [Tue, 23 Feb 2021 20:55:02 +0000 (15:55 -0500)]
Merge pull request #8035 from qlyoung/remove-more-sprintf

*: remove more sprintf()

4 years agodoc: fix dupe bug-reports label, index entry
Quentin Young [Tue, 23 Feb 2021 20:49:19 +0000 (15:49 -0500)]
doc: fix dupe bug-reports label, index entry

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agodoc: update docs on docs
Quentin Young [Tue, 23 Feb 2021 20:43:13 +0000 (15:43 -0500)]
doc: update docs on docs

- Don't document 'no' commands
- Don't use .. index:: for clicmds
- Don't document all possible variants

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agodoc: Format highlighted syntax properly for Systemtap examples
Donatas Abraitis [Tue, 23 Feb 2021 12:31:41 +0000 (14:31 +0200)]
doc: Format highlighted syntax properly for Systemtap examples

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #8095 from idryzhov/fix-nb-stale-pointers
Russ White [Tue, 23 Feb 2021 16:15:31 +0000 (11:15 -0500)]
Merge pull request #8095 from idryzhov/fix-nb-stale-pointers

fix stale pointers in northbound nodes

4 years agoMerge pull request #8020 from ton31337/feature/test_aggregator_as_with_0_exabgp
Russ White [Tue, 23 Feb 2021 16:06:34 +0000 (11:06 -0500)]
Merge pull request #8020 from ton31337/feature/test_aggregator_as_with_0_exabgp

tests: Test if BGP AGGREGATOR attribute is discarded if ASN comes as 0

4 years agoMerge pull request #8130 from ton31337/feature/document_systemtap_usdt
Donald Sharp [Tue, 23 Feb 2021 12:25:19 +0000 (07:25 -0500)]
Merge pull request #8130 from ton31337/feature/document_systemtap_usdt

doc: Instruction how to use Systemtap with FRRouting

4 years agoMerge pull request #7435 from sudhanshukumar22/bgp-peer-group-issue
Donatas Abraitis [Tue, 23 Feb 2021 07:14:24 +0000 (09:14 +0200)]
Merge pull request #7435 from sudhanshukumar22/bgp-peer-group-issue

Bgp peer group issue

4 years agoMerge pull request #7460 from pguibert6WIND/remove_bgp_constraint
Donatas Abraitis [Tue, 23 Feb 2021 07:02:04 +0000 (09:02 +0200)]
Merge pull request #7460 from pguibert6WIND/remove_bgp_constraint

bgpd: upon bgp deletion, do not systematically ask to remove main bgp

4 years agodoc: Instruction how to use Systemtap with FRRouting
Donatas Abraitis [Mon, 22 Feb 2021 21:36:01 +0000 (23:36 +0200)]
doc: Instruction how to use Systemtap with FRRouting

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agodoc: remove 'no' form of commands
Quentin Young [Fri, 19 Feb 2021 22:32:07 +0000 (17:32 -0500)]
doc: remove 'no' form of commands

These don't need to be documented, most of the time they are obvious,
when they aren't the behavior can just be described in the command
description.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agodoc: automatically generate index entries for cli
Quentin Young [Fri, 19 Feb 2021 20:33:45 +0000 (15:33 -0500)]
doc: automatically generate index entries for cli

- Generate index entries automatically
- Remove manual command index entries
- Clean up a few other manual index entries

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agodoc: clean up duplicate/wrong commands
Quentin Young [Thu, 18 Feb 2021 22:52:33 +0000 (17:52 -0500)]
doc: clean up duplicate/wrong commands

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agoMerge pull request #8105 from donaldsharp/reduce_monotime
Mark Stapp [Mon, 22 Feb 2021 18:04:43 +0000 (13:04 -0500)]
Merge pull request #8105 from donaldsharp/reduce_monotime

lib: Reduce getrusage/monotime for event handling

4 years agolib: register dependency between control plane protocol and vrf nb nodes
Igor Ryzhov [Tue, 16 Feb 2021 09:57:01 +0000 (12:57 +0300)]
lib: register dependency between control plane protocol and vrf nb nodes

When the control plane protocol is created, the vrf structure is
allocated, and its address is stored in the northbound node.
The vrf structure may later be deleted by the user, which will lead to
a stale pointer stored in this node.

Instead of this, allow daemons that use the vrf pointer to register the
dependency between the control plane protocol and vrf nodes. This will
guarantee that the nodes will always be created and deleted together, and
there won't be any stale pointers.

Add such registration to staticd and pimd.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agolib: add definitions for vrf xpaths
Igor Ryzhov [Tue, 16 Feb 2021 09:57:30 +0000 (12:57 +0300)]
lib: add definitions for vrf xpaths

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agobgpd: don't rely on northbound control plane protocol vrf pointer
Igor Ryzhov [Mon, 15 Feb 2021 18:17:08 +0000 (21:17 +0300)]
bgpd: don't rely on northbound control plane protocol vrf pointer

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agolib: add ability to register dependencies between northbound nodes
Igor Ryzhov [Tue, 16 Feb 2021 09:49:25 +0000 (12:49 +0300)]
lib: add ability to register dependencies between northbound nodes

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoMerge pull request #8125 from opensourcerouting/topotest-labn-jsoncmp
Donald Sharp [Mon, 22 Feb 2021 14:38:03 +0000 (09:38 -0500)]
Merge pull request #8125 from opensourcerouting/topotest-labn-jsoncmp

tests: JSON comparison command for LabN topotests

4 years agolib: Reduce getrusage/monotime for event handling
Donald Sharp [Thu, 18 Feb 2021 00:58:19 +0000 (19:58 -0500)]
lib: Reduce getrusage/monotime for event handling

When handling a large number of events at one time
FRR will call monotime and getrusage 2 times for each
event.  With this change modify the code to change
this to (X events / 2) + 1 calls of getrusage and monotime

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #8114 from volta-networks/fix_c++_xrefdata
David Lamparter [Mon, 22 Feb 2021 13:52:37 +0000 (14:52 +0100)]
Merge pull request #8114 from volta-networks/fix_c++_xrefdata

lib: fix c++ usage of zlog

4 years agoMerge pull request #7920 from donaldsharp/more_pytest_cleanup
Mark Stapp [Mon, 22 Feb 2021 12:31:22 +0000 (07:31 -0500)]
Merge pull request #7920 from donaldsharp/more_pytest_cleanup

More pytest cleanup

4 years agotests: example using new "jsoncmp_pass" command
David Schweizer [Mon, 22 Feb 2021 09:49:36 +0000 (10:49 +0100)]
tests: example using new "jsoncmp_pass" command

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
4 years agolib: fix c++ usage of zlog
Emanuele Di Pascale [Mon, 22 Feb 2021 09:29:55 +0000 (10:29 +0100)]
lib: fix c++ usage of zlog

Since some recent commit, building c++ code attempting to use zlog_debug
(or any other level) would fail with the following complaint:

lib/zlog.h:91:3: sorry, unimplemented: non-trivial designated
initializers not supported
   };
   ^
lib/zlog.h:105:26: note: in expansion of macro ‘_zlog_ref’
 #define zlog_debug(...)  _zlog_ref(LOG_DEBUG, __VA_ARGS__)

This is due to out-of-order initialization of the xrefdata struct
fields. Setting them all in the order in which they are defined
fixes the issue.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agotests: JSON comparison command for LabN topotests
David Schweizer [Mon, 22 Feb 2021 09:31:57 +0000 (10:31 +0100)]
tests: JSON comparison command for LabN topotests

The changes add the "jsoncmp_pass" and the "jsoncmp_fail" commands to
compare VTY shell's JSON output to an expected JSON object during
topotests using the LabN testing framework. This helps to eliminate
false negative test results (i.e. due to routes beeing out of order
after convergence or cosmetic changes in VTY shell's text output).

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
4 years agoMerge pull request #7444 from sudhanshukumar22/bgp-clean-dampening-issue
Donatas Abraitis [Mon, 22 Feb 2021 07:37:04 +0000 (09:37 +0200)]
Merge pull request #7444 from sudhanshukumar22/bgp-clean-dampening-issue

bgpd: clear ip bgp dampening was not triggering the route calculation…

4 years agoMerge pull request #8119 from donaldsharp/clippy_mem_leak
David Lamparter [Mon, 22 Feb 2021 05:41:23 +0000 (06:41 +0100)]
Merge pull request #8119 from donaldsharp/clippy_mem_leak

lib: Free memory leak in error path in clippy

4 years agolib: Free memory leak in error path in clippy
Donald Sharp [Sat, 20 Feb 2021 12:38:06 +0000 (07:38 -0500)]
lib: Free memory leak in error path in clippy

When running clippy, the main function in it's
error path could leak the memory pointed to by name.
Fix this.  This was/is reported by clang SA.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #8111 from volta-networks/fix_bgp_plist_vpn
Donatas Abraitis [Sat, 20 Feb 2021 10:23:26 +0000 (12:23 +0200)]
Merge pull request #8111 from volta-networks/fix_bgp_plist_vpn

bgpd: fix 'neighbor X prefix-list Y in' SAFI VPN

4 years agoMerge pull request #8112 from pguibert6WIND/bgp_flowspec_attrunchanged
Donald Sharp [Fri, 19 Feb 2021 23:30:36 +0000 (18:30 -0500)]
Merge pull request #8112 from pguibert6WIND/bgp_flowspec_attrunchanged

bgpd: add attribute-unchanged attribute to flowspec

4 years agoMerge pull request #8116 from qlyoung/clippy-name-wchar
Martin Winter [Fri, 19 Feb 2021 23:26:05 +0000 (00:26 +0100)]
Merge pull request #8116 from qlyoung/clippy-name-wchar

lib: use right type for wconv() return val

4 years agolib: use right type for wconv() return val
Quentin Young [Fri, 19 Feb 2021 16:58:11 +0000 (11:58 -0500)]
lib: use right type for wconv() return val

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agozebra: fix problem with SVI MAC not being sent to BGP
Anuradha Karuppiah [Thu, 18 Feb 2021 02:36:56 +0000 (18:36 -0800)]
zebra: fix problem with SVI MAC not being sent to BGP

For MH the SVI MAC is advertised to prevent flooding of ARP replies.
But because of a bug the SVI MAC was being added to the zebra database
but not sent to bgpd for advertising.

Ticket: CM-33329

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
4 years agozebra: drop the SVI MAC cleanup done as a part of interface delete
Anuradha Karuppiah [Fri, 22 Jan 2021 01:55:35 +0000 (17:55 -0800)]
zebra: drop the SVI MAC cleanup done as a part of interface delete

As a part of FRR shutdown interfaces are force flushed (in an arbitary
order). Interfaces are already down at that point i.e. resources like
SVI-MAC have already been released. Attempting to clean it up again
as a part of the force-flush was resulting in access of freed up memory -

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
==26457== Thread 1:
==26457== Invalid read of size 8
==26457==    at 0x1AE6B0: zebra_evpn_acc_bd_svi_set (zebra_evpn_mh.c:606)
==26457==    by 0x1B1460: zebra_evpn_if_cleanup (zebra_evpn_mh.c:1040)
==26457==    by 0x13CA69: if_zebra_delete_hook (interface.c:244)
==26457==    by 0x48A0E34: hook_call_if_del (if.c:59)
==26457==    by 0x48A0E34: if_delete_retain (if.c:290)
==26457==    by 0x48A2F94: if_delete (if.c:313)
==26457==    by 0x48A3169: if_terminate (if.c:1217)
==26457==    by 0x48E0024: vrf_delete (vrf.c:254)
==26457==    by 0x48E0024: vrf_delete (vrf.c:225)
==26457==    by 0x48E02FE: vrf_terminate (vrf.c:551)
==26457==    by 0x1442E1: sigint (main.c:203)
==26457==    by 0x1442E1: sigint (main.c:141)
==26457==    by 0x48CF862: quagga_sigevent_process (sigevent.c:103)
==26457==    by 0x48DD324: thread_fetch (thread.c:1404)
==26457==    by 0x48A926A: frr_run (libfrr.c:1122)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
(gdb) bt
(gdb) fr 5
1037    zebra/zebra_evpn_mh.c: No such file or directory.
(gdb) p zif->ifp->name
$2 = "vlan131", '\000' <repeats 12 times>
(gdb) p zif->link->info
$5 = (void *) 0x1
(gdb) p/x zif->ifp->flags
$7 = 0x1002
(gdb)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Ticket: CM-32435

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
4 years agozebra: prevent crash in evpn if cleanup
Chirag Shah [Tue, 24 Nov 2020 20:22:49 +0000 (12:22 -0800)]
zebra: prevent crash in evpn if cleanup

zebra crash is seen while cleaning up evpn interface
during shutdown event.
evpn interface clean up is called from vrf_delete callback

(gdb) frame 4
(is_up=false, br_zif=0x0, vlan_zif=0x557f31fb36f0) at zebra/zebra_evpn_mh.c:614
614     zebra/zebra_evpn_mh.c: No such file or directory.
(gdb) p tmp_br_zif
$1 = (struct zebra_if *) 0x0
(gdb) p vlan_zif->link
$2 = (struct interface *) 0x557f31fb2d40
(gdb) p vlan_zif->link->info
$3 = (void *) 0x0
(gdb) p zebra_if->ifp->name
No symbol "zebra_if" in current context.
(gdb) p vlan_zif->ifp->name
$4 = "peerlink-3.4094\000\000\000\000"

Ticket:CM-32435
Reviewed By:CCR-10957
Testing Done:

Signed-off-by: Chirag Shah <chirag@nvidia.com>
4 years agozebra: changes to advertise SVI mac by default if evpn-mh is enabled
Anuradha Karuppiah [Mon, 2 Nov 2020 18:53:50 +0000 (10:53 -0800)]
zebra: changes to advertise SVI mac by default if evpn-mh is enabled

Added support for advertising SVI MAC if EVPN-MH is enabled.

In the case of EVPN MH arp replies from an attached server can be sent to
the ES-peer. To prevent flooding of the reply the SVI MAC needs to be
advertised by default.

Note:
advertise-svi-ip could have been used as an alternate way to advertise
SVI MAC. However that config cannot be turned on if SVI IPs are
re-used (which is done to avoid wasting IP addresses in a subnet).

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: fix problem with SVI IP being advertised even if disabled
Anuradha Karuppiah [Tue, 3 Nov 2020 22:34:46 +0000 (14:34 -0800)]
zebra: fix problem with SVI IP being advertised even if disabled

SVI IP is being advertised unconditionally i.e. even if disabled (and
that is the default config). This can be problematic when the SVI address
is re-used across racks.

Added the user config condition in all the relevant places where the
SVI advertisement is triggered.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agoMerge pull request #8079 from pjdruddy/pr-snmp-coverity
Donald Sharp [Fri, 19 Feb 2021 13:54:02 +0000 (08:54 -0500)]
Merge pull request #8079 from pjdruddy/pr-snmp-coverity

MPLSL3VPN snmp coverity fixes

4 years agoMerge pull request #8102 from volta-networks/fix_ospf6_error_logs
Donald Sharp [Fri, 19 Feb 2021 13:22:47 +0000 (08:22 -0500)]
Merge pull request #8102 from volta-networks/fix_ospf6_error_logs

ospf6d: Update logs that indicate why ospf6 adjacency is not coming up.

4 years agoMerge pull request #8103 from mjstapp/fix_thread_awaken
Donald Sharp [Fri, 19 Feb 2021 13:21:31 +0000 (08:21 -0500)]
Merge pull request #8103 from mjstapp/fix_thread_awaken

lib: don't awaken from poll for every timer

4 years agoMerge pull request #8107 from ranjanyash54/intra_prefix_metric
Donald Sharp [Fri, 19 Feb 2021 13:19:53 +0000 (08:19 -0500)]
Merge pull request #8107 from ranjanyash54/intra_prefix_metric

ospf6d: Show metric in intra-prefix LSA detail

4 years agobgpd: add attribute-unchanged attribute to flowspec
Philippe Guibert [Fri, 19 Feb 2021 13:17:05 +0000 (14:17 +0100)]
bgpd: add attribute-unchanged attribute to flowspec

flowspec address family can now use attribute-unchanged attribute.
This parameter is necessary when it comes to play with
route-server-client, as that latter command forces to change
attribute-unchanged nexthop.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agobgpd: fix 'neighbor X prefix-list Y in' SAFI VPN
Emanuele Di Pascale [Fri, 19 Feb 2021 12:26:04 +0000 (13:26 +0100)]
bgpd: fix 'neighbor X prefix-list Y in' SAFI VPN

this particular callback had not been implemented in the northbound
conversion, so the command had no effect.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agoospf6d: Metric option in intra-prefix LSA detail
Yash Ranjan [Thu, 18 Feb 2021 12:38:11 +0000 (04:38 -0800)]
ospf6d: Metric option in intra-prefix LSA detail

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
4 years agoMerge pull request #8106 from donaldsharp/fix_bad_interaction
Mark Stapp [Thu, 18 Feb 2021 15:31:04 +0000 (10:31 -0500)]
Merge pull request #8106 from donaldsharp/fix_bad_interaction

bgpd: Fix crash when we don't have a nexthop

4 years agoospf6d: Update logs that indicate why ospf6 adjacency is not coming up.
lynne [Wed, 17 Feb 2021 14:21:43 +0000 (09:21 -0500)]
ospf6d: Update logs that indicate why ospf6 adjacency is not coming up.

Add more details to these logs to help make it easier to determine why
ospf6 adjacency is not coming up.   Also make these logs show up without
having to turn on debug logging, again making it easier to debug the
misconfiguration.

Signed-off-by: Lynne Morrison <lynne@voltaio.net>
4 years agolib: pass the thread_master to process_timers()
Mark Stapp [Thu, 18 Feb 2021 14:38:19 +0000 (09:38 -0500)]
lib: pass the thread_master to process_timers()

Pass the thread_master pointer to process_timers() as we
do for other list-processing apis.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agolib: don't awaken from poll for every timer
Mark Stapp [Thu, 18 Feb 2021 14:37:09 +0000 (09:37 -0500)]
lib: don't awaken from poll for every timer

Only ask the event-loop poll() to awaken if a newly-added timer
actually might have changed the required timeout. Also compute
timer deadline outside of mutex locks.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agolib: remove unneeded arg from timer api
Mark Stapp [Thu, 18 Feb 2021 14:34:16 +0000 (09:34 -0500)]
lib: remove unneeded arg from timer api

Timers are always type TIMER - remove 'type' arg from some
timer apis.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agolib: small code cleanup in thread.c
Mark Stapp [Thu, 18 Feb 2021 14:41:38 +0000 (09:41 -0500)]
lib: small code cleanup in thread.c

Fix an indentation in thread.c.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agobgpd: Fix crash when we don't have a nexthop
Donald Sharp [Thu, 18 Feb 2021 11:55:29 +0000 (06:55 -0500)]
bgpd: Fix crash when we don't have a nexthop

Recent changes to allow bgpd to handle v6 LL slightly
differently in the nexthop tracking code has not
interacted well with the blackhole nexthop change
for peers.  Modify the code to do the right thing

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #8104 from qlyoung/fix-clang-sa-feb2021
Donatas Abraitis [Thu, 18 Feb 2021 11:30:26 +0000 (13:30 +0200)]
Merge pull request #8104 from qlyoung/fix-clang-sa-feb2021

lib: fix some misc SA warnings

4 years agoMerge pull request #7942 from donaldsharp/rpki_reload_fix
Donatas Abraitis [Thu, 18 Feb 2021 07:34:27 +0000 (09:34 +0200)]
Merge pull request #7942 from donaldsharp/rpki_reload_fix

frr-reload: rpki context exiting uses exit and not end

4 years agoMerge pull request #8012 from mjstapp/fix_topo_ver_check
Donatas Abraitis [Thu, 18 Feb 2021 07:26:15 +0000 (09:26 +0200)]
Merge pull request #8012 from mjstapp/fix_topo_ver_check

tests: report kernel version check failures

4 years agoMerge pull request #8041 from donaldsharp/v6_ll_interface
Donatas Abraitis [Thu, 18 Feb 2021 07:22:51 +0000 (09:22 +0200)]
Merge pull request #8041 from donaldsharp/v6_ll_interface

bgpd: Switch LL nexthop tracking to be interface based

4 years agolib: fix some misc SA warnings
Quentin Young [Wed, 17 Feb 2021 22:01:06 +0000 (17:01 -0500)]
lib: fix some misc SA warnings

- clippy.c: fix valid memleak
- defun_lex.l: suppress warnings in generated code
- northbound_cli.c: suppress warning in eldritch libyang macro

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agoMerge pull request #8062 from donaldsharp/bgp_blackhole
Russ White [Wed, 17 Feb 2021 20:47:51 +0000 (15:47 -0500)]
Merge pull request #8062 from donaldsharp/bgp_blackhole

bgpd: Blackhole nexthops are not reachable

4 years agoMerge pull request #8068 from qlyoung/bmp-tracing
Russ White [Wed, 17 Feb 2021 17:59:56 +0000 (12:59 -0500)]
Merge pull request #8068 from qlyoung/bmp-tracing

BMP tracepoints

4 years agoMerge pull request #8101 from idryzhov/staticd-fixes
Mark Stapp [Wed, 17 Feb 2021 16:05:17 +0000 (11:05 -0500)]
Merge pull request #8101 from idryzhov/staticd-fixes

multiple staticd fixes

4 years agobgpd, lib: add oid2in6_addr utility and use it
Pat Ruddy [Sun, 14 Feb 2021 12:09:55 +0000 (12:09 +0000)]
bgpd, lib: add oid2in6_addr utility and use it

The existing code was using the oid2in_addr API to copy IPv6
addresses passing an IPv6 length. Create a utility to do this
properly and avoid annoying coverity with type checking.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agobgpd: mplsvpn snmp: NULL check correct pointer
Pat Ruddy [Sun, 14 Feb 2021 12:08:08 +0000 (12:08 +0000)]
bgpd: mplsvpn snmp: NULL check correct pointer

Check the dereferenced pointer to the bgp instance and not the
pointer to it.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agobgpd: mplsvpn SNMP correctly validate incoming rt_index
Pat Ruddy [Sun, 14 Feb 2021 11:39:50 +0000 (11:39 +0000)]
bgpd: mplsvpn SNMP correctly validate incoming rt_index

check that RT index is in the allowed range

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agoMerge pull request #8098 from donaldsharp/af_inet_is_proto
Mark Stapp [Wed, 17 Feb 2021 13:15:24 +0000 (08:15 -0500)]
Merge pull request #8098 from donaldsharp/af_inet_is_proto

zebra: use AF_INET for protocol family

4 years agobgpd: Switch LL nexthop tracking to be interface based
Donald Sharp [Thu, 17 Dec 2020 14:46:30 +0000 (09:46 -0500)]
bgpd: Switch LL nexthop tracking to be interface based

bgp is currently registering v6 LL as nexthops to be tracked
from zebra.  This presents several problems.

a) zebra does not properly track multiple prefixes that match
the same route properly at this point in time.
b) BGP was receiving nexthops that were just incorrect because
of (a).
c) When a nexthop changed that really didn't affect the v6 LL
we were responding incorrectly because of this

Modify the code such that bgp nexthop tracking notices that
we are trying to register a v6 LL.  When we do so, shortcut
and watch interface up/down events for this v6 LL and do
the work when an interface goes up / down for this type
of tracking.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #8099 from donaldsharp/more_ignore_revs
Mark Stapp [Wed, 17 Feb 2021 13:11:32 +0000 (08:11 -0500)]
Merge pull request #8099 from donaldsharp/more_ignore_revs

*: Add another commit to .git-blame-ignore-revs

4 years agostaticd: fix vrf enabling
Igor Ryzhov [Wed, 17 Feb 2021 12:06:20 +0000 (15:06 +0300)]
staticd: fix vrf enabling

When enabling the VRF, we should not install the nexthops that rely on
non-existent VRF.

For example, if we have route "1.1.1.0/24 2.2.2.2 vrf red nexthop-vrf blue",
and VRF red is enabled, we should not install it if VRF blue doesn't exist.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agostaticd: fix nexthop creation and installation
Igor Ryzhov [Wed, 17 Feb 2021 11:19:40 +0000 (14:19 +0300)]
staticd: fix nexthop creation and installation

Currently, staticd creates a VRF for the nexthop it is trying to install.
Later, when this nexthop is deleted, the VRF stays in the system and can
not be deleted by the user because "no vrf" command doesn't work for this
VRF because it was not created through northbound code.

There is no need to create the VRF. Just set nh_vrf_id to VRF_UNKNOWN
when the VRF doesn't exist.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agostaticd: fix nexthop validation
Igor Ryzhov [Wed, 17 Feb 2021 10:06:56 +0000 (13:06 +0300)]
staticd: fix nexthop validation

When checking for local connected address used as a nexthop gateway, we
should check nexthop VRF, not route VRF.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years ago*: Add another commit to .git-blame-ignore-revs
Donald Sharp [Tue, 16 Feb 2021 21:09:41 +0000 (16:09 -0500)]
*: Add another commit to .git-blame-ignore-revs

Commit: 996c93142d3abfab0f6d6c800474e22a8cfbdbc5
is a bit of a reformat and the .git-blame-ignore-revs
is missing this commit.  Add it to it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agozebra: use AF_INET for protocol family
Donald Sharp [Tue, 16 Feb 2021 20:54:08 +0000 (15:54 -0500)]
zebra: use AF_INET for protocol family

When looking up the conversion from kernel protocol to
internal protocol family make sure we use the correct
AF_INET( what the kernel uses ) instead of AFI_IP (which
is what FRR uses ).

Routes from OSPF will show up from the kernel as OSPF6 instead of
OSPF.  Which will cause mayhem

Ticket: CM-33306
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agotests: report kernel version check failures
Mark Stapp [Wed, 3 Feb 2021 17:18:36 +0000 (12:18 -0500)]
tests: report kernel version check failures

Report kernel version check failures in the test log.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agolib: add agentx_enabled hook
Karen Schoener [Fri, 5 Feb 2021 21:05:36 +0000 (16:05 -0500)]
lib: add agentx_enabled hook

Adding agentx_enabled hook.

This permits the main LDP process to signal the lde and ldpe
processes when agentx is enabled.

Signed-off-by: Karen Schoener <karen@voltanet.io>
4 years agoMerge pull request #8015 from mjstapp/fix_topo_gen_support
Martin Winter [Tue, 16 Feb 2021 16:49:18 +0000 (17:49 +0100)]
Merge pull request #8015 from mjstapp/fix_topo_gen_support

tests: make generate support bundle python3

4 years agoMerge pull request #8051 from volta-networks/fix_ospf6_hello_lo
Russ White [Tue, 16 Feb 2021 16:42:01 +0000 (11:42 -0500)]
Merge pull request #8051 from volta-networks/fix_ospf6_hello_lo

ospf6d: Don't send hellos on loopback interface

4 years agoMerge pull request #8059 from ton31337/fix/nexthop_ipv4_handling_table_map_apply
Russ White [Tue, 16 Feb 2021 16:32:25 +0000 (11:32 -0500)]
Merge pull request #8059 from ton31337/fix/nexthop_ipv4_handling_table_map_apply

bgpd: Print IPv4 nexthop for IPv6 prefixes under bgp_table_map_apply()

4 years agoMerge pull request #8066 from dteach-rv/master
Russ White [Tue, 16 Feb 2021 16:27:19 +0000 (11:27 -0500)]
Merge pull request #8066 from dteach-rv/master

Add Support for rfc 8050 MRT add-path

4 years agoMerge pull request #8077 from taspelund/ospf_flood_debug_improvements
Russ White [Tue, 16 Feb 2021 16:19:47 +0000 (11:19 -0500)]
Merge pull request #8077 from taspelund/ospf_flood_debug_improvements

ospfd: cleanup ospf_flood debugs

4 years agoMerge pull request #8093 from opensourcerouting/format-strings-20210216
Russ White [Tue, 16 Feb 2021 12:46:40 +0000 (07:46 -0500)]
Merge pull request #8093 from opensourcerouting/format-strings-20210216

*: fix format string SNAFUs

4 years agoMerge pull request #8091 from mjstapp/fix_config_icc_diag
Donald Sharp [Tue, 16 Feb 2021 00:11:38 +0000 (19:11 -0500)]
Merge pull request #8091 from mjstapp/fix_config_icc_diag

build: detect ICC, only try ICC options if ICC

4 years agoMerge pull request #8044 from SaiGomathiN/nsg
Donald Sharp [Mon, 15 Feb 2021 23:55:01 +0000 (18:55 -0500)]
Merge pull request #8044 from SaiGomathiN/nsg

pimd: json support added

4 years ago*: fix format string SNAFUs
David Lamparter [Mon, 15 Feb 2021 23:46:48 +0000 (00:46 +0100)]
*: fix format string SNAFUs

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agoMerge pull request #8050 from taspelund/bgp_vpn_advertised_routes
Donatas Abraitis [Mon, 15 Feb 2021 20:38:17 +0000 (22:38 +0200)]
Merge pull request #8050 from taspelund/bgp_vpn_advertised_routes

bgpd: fix empty advertised-routes for 2-tier safis

4 years agoMerge pull request #8075 from opensourcerouting/assorted-20210212
Donald Sharp [Mon, 15 Feb 2021 20:20:18 +0000 (15:20 -0500)]
Merge pull request #8075 from opensourcerouting/assorted-20210212

lib: bunch of random small fixes

4 years agobuild: detect ICC, only try ICC options if ICC
Mark Stapp [Mon, 15 Feb 2021 18:59:02 +0000 (13:59 -0500)]
build: detect ICC, only try ICC options if ICC

Some ICC command-line options can cause confusion for other
compilers; test for ICC specifically, and only try to use those
options if ICC is being used.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #8082 from donaldsharp/nhrp_priv
Patrick Ruddy [Mon, 15 Feb 2021 15:19:48 +0000 (15:19 +0000)]
Merge pull request #8082 from donaldsharp/nhrp_priv

new clang fixes

4 years agoMerge pull request #8081 from ton31337/fix/static_network_vrf
Donald Sharp [Mon, 15 Feb 2021 15:15:21 +0000 (10:15 -0500)]
Merge pull request #8081 from ton31337/fix/static_network_vrf

bgpd: Check for peer->su_remote if not NULL when handling IPv6 nexthop

4 years agotests: make generate support bundle python3 only
Mark Stapp [Thu, 4 Feb 2021 16:13:01 +0000 (11:13 -0500)]
tests: make generate support bundle python3 only

Make the generate-support-bundle script and interactions more
python3-friendly, and use python3 explicitly.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #8067 from qlyoung/fix-bmp-incorrect-peer-down-message
Mark Stapp [Mon, 15 Feb 2021 13:11:25 +0000 (08:11 -0500)]
Merge pull request #8067 from qlyoung/fix-bmp-incorrect-peer-down-message

bgpd: send correct BMP down message when nht fails

4 years agolib: fix CRNL causing empty prompt lines
David Lamparter [Fri, 12 Feb 2021 22:30:55 +0000 (23:30 +0100)]
lib: fix CRNL causing empty prompt lines

CR, NL and CRNL are all OK, but CRNL shouldn't get treated as 2
newlines (which causes an empty command to be executed => empty prompt
line.)

Signed-off-by: David Lamparter <equinox@diac24.net>