]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
3 years agozebra: fpm_nl_process() reschedule dp thread
Duncan Eastoe [Tue, 22 Dec 2020 19:47:17 +0000 (19:47 +0000)]
zebra: fpm_nl_process() reschedule dp thread

fpm_nl_process() now ensures that the dataplane thread is rescheduled
if it hits the work limit while processing its incoming work queue.

This would probably already occur due to some other event, such as
fpm_process_queue() enqueuing completed work to the output queue,
however it does no harm to add this explicit reschedule.

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
3 years agozebra: resched dp thread if output queue limit hit
Duncan Eastoe [Tue, 22 Dec 2020 18:35:40 +0000 (18:35 +0000)]
zebra: resched dp thread if output queue limit hit

If the dataplane thread hits the work limit while processing the
output queue for any given provider, we now explicitly reschedule
the thread.

Otherwise, if the number of items in the output queue is greater than
the work limit, draining of that output queue is dependent on new
dataplane work.

Routes which are not drained from the output queue are stuck with
the 'q' flag, so this is a similar issue to that observed in
164d8e86081fdf33992b6c45af446bac6103e20c.

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
3 years agoMerge pull request #7767 from mjstapp/fix_dplane_extra_info
Rafael Zalamena [Tue, 22 Dec 2020 18:08:35 +0000 (15:08 -0300)]
Merge pull request #7767 from mjstapp/fix_dplane_extra_info

zebra: fix loop logic in dplane for extra intf info

3 years agoMerge pull request #7472 from opensourcerouting/fpm-fixes
Mark Stapp [Tue, 22 Dec 2020 16:37:58 +0000 (11:37 -0500)]
Merge pull request #7472 from opensourcerouting/fpm-fixes

fpm: frr-reload, IPv6 and an improvement

3 years agoMerge pull request #7758 from donaldsharp/tests_dict_values
Mark Stapp [Tue, 22 Dec 2020 15:48:29 +0000 (10:48 -0500)]
Merge pull request #7758 from donaldsharp/tests_dict_values

tests: dict_values are not lists in version 3

3 years agoMerge pull request #7779 from pjdruddy/pr-bgp-doc-warn
Donatas Abraitis [Tue, 22 Dec 2020 07:27:59 +0000 (09:27 +0200)]
Merge pull request #7779 from pjdruddy/pr-bgp-doc-warn

doc: fix warning in bgp.rst

3 years agodoc: fix warning in bgp.rst
Pat Ruddy [Mon, 21 Dec 2020 17:35:39 +0000 (17:35 +0000)]
doc: fix warning in bgp.rst

remove indent to fix
make[1]: Entering directory '/home/pat/git/frr'
  SPHINX   doc/user/_build/.doctrees/environment.pickle
/home/pat/git/frr/doc/user/bgp.rst:3477: WARNING: Explicit markup ends
without a blank line; unexpected unindent.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agoMerge pull request #7773 from GalaxyGorilla/clippy_clappy
Mark Stapp [Mon, 21 Dec 2020 13:13:50 +0000 (08:13 -0500)]
Merge pull request #7773 from GalaxyGorilla/clippy_clappy

pathd: un-guard clippy files

3 years agopathd: un-guard clippy files
GalaxyGorilla [Sat, 19 Dec 2020 21:06:24 +0000 (21:06 +0000)]
pathd: un-guard clippy files

The relevant clippy machinery in python/makevars.py assumes to get
'raw' Makefile text containing all `clippy_scan` variables. If those
files in the `clippy_scan` variable are later on used in the
compilation process does not matter.

Signed-off-by: GalaxyGorilla <sascha@netdef.org>
3 years agoMerge pull request #7768 from donaldsharp/route_map_opt
Donatas Abraitis [Sat, 19 Dec 2020 13:02:15 +0000 (15:02 +0200)]
Merge pull request #7768 from donaldsharp/route_map_opt

Route map dependency fix

3 years agotests: dict_values are not lists in version 3
Donald Sharp [Thu, 17 Dec 2020 19:04:21 +0000 (14:04 -0500)]
tests: dict_values are not lists in version 3

While accidently running the topotests with version 3
I keep getting:

TypeError: `dict_values` object does not support indexing..

version 2 of python dict.values() returns a list.
version 3 does not

Write some code to allow both to be handled.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7766 from deastoe/dplane-fpm-nl_optimisations
Donald Sharp [Fri, 18 Dec 2020 23:47:35 +0000 (18:47 -0500)]
Merge pull request #7766 from deastoe/dplane-fpm-nl_optimisations

dplane_fpm_nl optimisations

3 years agolib: Add a warning for when we are not operating correctly
Donald Sharp [Fri, 18 Dec 2020 19:38:40 +0000 (14:38 -0500)]
lib: Add a warning for when we are not operating correctly

There exists a possibilty that route map dependencies
have gotten wrong.  Prevent the crash and warn the user
that we may be in trouble.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7351 from opensourcerouting/feature/pathd
Olivier Dugeon [Fri, 18 Dec 2020 19:28:22 +0000 (20:28 +0100)]
Merge pull request #7351 from opensourcerouting/feature/pathd

Add a new SR-TE policy management daemon and an optional PCEP module

3 years agolib: Fix dependency of match types in route-map code
Donald Sharp [Fri, 18 Dec 2020 19:22:09 +0000 (14:22 -0500)]
lib: Fix dependency of match types in route-map code

Route-maps contain a hash of hash's that contain the
container type name ( say community or access list or whatever )
and then it has a hash of route-maps that this maps too

Suppose you have this:

!
frr version 7.3.1
frr defaults traditional
hostname eva
log stdout
!
debug route-map
!
router bgp 239
 neighbor 192.168.161.2 remote-as external
 !
 address-family ipv4 unicast
  neighbor 192.168.161.2 route-map foo in
 exit-address-family
!
bgp community-list standard 7000:40002 permit 7000:40002
bgp community-list standard 7000:40002 permit 7000:40003
!
route-map foo deny 20
 match community 7000:40002
!
route-map foo permit 10
!
line vty
!
end

You have a community hash which has an

7000:40002 entry

This entry has a hash of routemaps that are referencing it.  In this above
example it would have `foo` as the single entry.

Given the above config if you do this:

eva# conf
eva(config)# route-map foo deny 20
eva(config-route-map)# match community 7000:4003
eva(config-route-map)#

We would expect the `7000:40002` community hash to no longer have
a reference to the `foo` routemap.  Instead we see the code doing this:

2020/12/18 13:47:12 BGP: bgpd 7.3.1 starting: vty@2605, bgp@<all>:179
2020/12/18 13:47:47 BGP: Add route-map foo
2020/12/18 13:47:47 BGP: Route-map foo add sequence 10, type: permit
2020/12/18 13:47:57 BGP: Route-map foo add sequence 20, type: deny
2020/12/18 13:48:05 BGP: Adding dependency for filter 7000:40002 in route-map foo
2020/12/18 13:48:05 BGP: route_map_print_dependency: Dependency for 7000:40002: foo
2020/12/18 13:48:41 BGP: bgp_update_receive: rcvd End-of-RIB for IPv4 Unicast from 192.168.161.2 in vrf default
2020/12/18 13:49:19 BGP: Deleting dependency for filter 7000:4003 in route-map foo
2020/12/18 13:49:19 BGP: Adding dependency for filter 7000:4003 in route-map foo
2020/12/18 13:49:19 BGP: route_map_print_dependency: Dependency for 7000:4003: foo

Note how the code attempts to remove the dependency for `7000:4003` instead of the
dependency for `7000:40002`.  Then we create a new hash for `7000:4003` and then
install the routemap name in it.

This is wrong.  We should remove the `7000:40002` dependency and then install
a dependency for `7000:4003`.

Fix the code to do the right thing.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agolib: Add some useful debugs to understand what is going on
Donald Sharp [Fri, 18 Dec 2020 03:25:27 +0000 (22:25 -0500)]
lib: Add some useful debugs to understand what is going on

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agolib: arg can never be NULL
Donald Sharp [Fri, 18 Dec 2020 03:23:02 +0000 (22:23 -0500)]
lib: arg can never be NULL

Arg can never be null, get rid of an unneeded if statement

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: fix loop logic in dplane for extra intf info
Mark Stapp [Fri, 18 Dec 2020 18:49:07 +0000 (13:49 -0500)]
zebra: fix loop logic in dplane for extra intf info

The way a couple of clauses were placed in a loop meant that
some info might not be collected - re-order things just a bit.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agopathd: Add optional support for PCEP to pathd
Sebastien Merle [Fri, 16 Oct 2020 14:55:51 +0000 (16:55 +0200)]
pathd: Add optional support for PCEP to pathd

This new dynamic module makes pathd behave as a PCC for dynamic candidate path
using the external library pcpelib https://github.com/volta-networks/pceplib .

The candidate paths defined as dynamic will trigger computation requests to the
configured PCE, and the PCE response will be used to update the policy.

It supports multiple PCE. The one with smaller precedence will be elected
as the master PCE, and only if the connection repeatedly fails, the PCC will
switch to another PCE.

Example of configuration:

segment-routing
 traffic-eng
  pcep
   pce-config CONF
    source-address ip 10.10.10.10
    sr-draft07
   !
   pce PCE1
    config CONF
    address ip 1.1.1.1
   !
   pce PCE2
    config CONF
    address ip 2.2.2.2
   !
   pcc
    peer PCE1 precedence 10
    peer PCE2 precedence 20
   !
  !
 !
!

Co-authored-by: Brady Johnson <brady@voltanet.io>
Co-authored-by: Emanuele Di Pascale <emanuele@voltanet.io>
Co-authored-by: GalaxyGorilla <sascha@netdef.org>
Co-authored-by: Javier Garcia <javier.garcia@voltanet.io>
Co-authored-by: Renato Westphal <renato@opensourcerouting.org>
Co-authored-by: Sebastien Merle <sebastien@netdef.org>
Signed-off-by: Sebastien Merle <sebastien@netdef.org>
3 years agozebra: reduce atomic ops in fpm_process_queue()
Duncan Eastoe [Fri, 18 Dec 2020 14:35:21 +0000 (14:35 +0000)]
zebra: reduce atomic ops in fpm_process_queue()

Maintain the count of contexts which have been processed in a local
variable, and perform a single atomic update after we have consumed
all queued contexts.

Generally this results in at least one less atomic operation per
context.

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
3 years agozebra: local var in fpm_process_queue() sched cond
Duncan Eastoe [Fri, 18 Dec 2020 14:29:36 +0000 (14:29 +0000)]
zebra: local var in fpm_process_queue() sched cond

Don't use an atomic operation to determine whether fpm_process_queue()
needs to be re-scheduled. Instead we can simply use a local variable
to determine if we stopped processing because we ran out of buffers.

In the case where we would have re-scheduled due to new context objects
in the queue (enqueued after we stopped processing), fpm_nl_process()
will schedule us (or will have done already).

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
3 years agozebra: reduce atomic ops in fpm_nl_process()
Duncan Eastoe [Fri, 18 Dec 2020 14:21:18 +0000 (14:21 +0000)]
zebra: reduce atomic ops in fpm_nl_process()

Maintain the peak ctxqueue length in a local variable, and perform
a single atomic update after processing all contexts.

Generally this results in at least one less atomic operation per
context.

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
3 years agopathd: New SR-TE policy management daemon
Sebastien Merle [Fri, 31 Jul 2020 16:04:20 +0000 (18:04 +0200)]
pathd: New SR-TE policy management daemon

This new daemon manages Segment-Routing Traffic-Engineering
(SR-TE) Policies and installs them into zebra. It provides
the usual yang support and vtysh commands to define or change
SR-TE Policies.

In a nutshell SR-TE Policies provide the possibility to steer
traffic through a (possibly dynamic) list of Segment Routing
segments to the endpoint of the policy. This list of segments
is part of a Candidate Path which again belongs to the SR-TE
Policy. SR-TE Policies are uniquely identified by their color
and endpoint. The color can be used to e.g. match BGP
communities on incoming traffic.

There can be multiple Candidate Paths for a single
policy, the active Candidate Path is chosen according to
certain conditions of which the most important is its
preference. Candidate Paths can be explicit (fixed list of
segments) or dynamic (list of segment comes from e.g. PCEP, see
below).

Configuration example:

segment-routing
 traffic-eng
  segment-list SL
   index 10 mpls label 1111
   index 20 mpls label 2222
  !
  policy color 4 endpoint 10.10.10.4
   name POL4
   binding-sid 104
   candidate-path preference 100 name exp explicit segment-list SL
   candidate-path preference 200 name dyn dynamic
  !
 !
!

There is an important connection between dynamic Candidate
Paths and the overall topic of Path Computation. Later on for
pathd a dynamic module will be introduced that is capable
of communicating via the PCEP protocol with a PCE (Path
Computation Element) which again is capable of calculating
paths according to its local TED (Traffic Engineering Database).
This dynamic module will be able to inject the mentioned
dynamic Candidate Paths into pathd based on calculated paths
from a PCE.

https://tools.ietf.org/html/draft-ietf-spring-segment-routing-policy-06

Co-authored-by: Sebastien Merle <sebastien@netdef.org>
Co-authored-by: Renato Westphal <renato@opensourcerouting.org>
Co-authored-by: GalaxyGorilla <sascha@netdef.org>
Co-authored-by: Emanuele Di Pascale <emanuele@voltanet.io>
Signed-off-by: Sebastien Merle <sebastien@netdef.org>
3 years agozebra: reduce dplane_fpm_nl ctxqueue_mutex contention
Duncan Eastoe [Fri, 18 Dec 2020 14:04:45 +0000 (14:04 +0000)]
zebra: reduce dplane_fpm_nl ctxqueue_mutex contention

Reduce code in the critical sections of fpm_nl_process() and
fpm_process_queue() to the bare minimum - basically only enqueue
and dequeue operations on the shared ctxqueue.

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
3 years agoMerge pull request #7760 from donaldsharp/DIE_IN_A_FIRE
Donatas Abraitis [Fri, 18 Dec 2020 09:26:10 +0000 (11:26 +0200)]
Merge pull request #7760 from donaldsharp/DIE_IN_A_FIRE

Die in a fire

3 years agobgpd: Remove awful test of strmatch + get_afi_safi_str
Donald Sharp [Thu, 17 Dec 2020 21:49:20 +0000 (16:49 -0500)]
bgpd: Remove awful test of strmatch + get_afi_safi_str

Remove awful test of a strmatch against a call to get_afi_safi_str.
These are the easy ones as that the real decision point is/was
underneath this test.  This is just duplicate expensive testing.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Use the header
Donald Sharp [Thu, 17 Dec 2020 21:36:22 +0000 (16:36 -0500)]
bgpd: Use the header

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Somewhat optimize string returns
Donald Sharp [Thu, 17 Dec 2020 21:33:11 +0000 (16:33 -0500)]
bgpd: Somewhat optimize string returns

There is no need for a cascading series of if statements
for the afi.  Clean it up slightly

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7757 from donaldsharp/tests_unicode
Mark Stapp [Thu, 17 Dec 2020 21:23:17 +0000 (16:23 -0500)]
Merge pull request #7757 from donaldsharp/tests_unicode

tests: unicode to frr_unicode

3 years agoMerge pull request #7755 from mjstapp/fix_rnh_via_default
Donald Sharp [Thu, 17 Dec 2020 19:07:00 +0000 (14:07 -0500)]
Merge pull request #7755 from mjstapp/fix_rnh_via_default

zebra: nht resolve-via-default doesn't need force

3 years agotests: unicode to frr_unicode
Donald Sharp [Thu, 17 Dec 2020 18:19:52 +0000 (13:19 -0500)]
tests: unicode to frr_unicode

Let's standardize on the internal to frr unicode function.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: nht resolve-via-default doesn't need force
Mark Stapp [Thu, 17 Dec 2020 16:22:09 +0000 (11:22 -0500)]
zebra: nht resolve-via-default doesn't need force

We don't need to use the 'force' flag when processing the
resolve-via-default clis for ip and ipv6: we can just do normal
nht processing.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #7744 from donaldsharp/end_configuration
Mark Stapp [Wed, 16 Dec 2020 18:47:24 +0000 (13:47 -0500)]
Merge pull request #7744 from donaldsharp/end_configuration

End configuration changes

3 years agoMerge pull request #7719 from mkoskar/patch-1
Mark Stapp [Wed, 16 Dec 2020 13:46:24 +0000 (08:46 -0500)]
Merge pull request #7719 from mkoskar/patch-1

doc: Remove duplicate word

3 years agodoc: Remove duplicate word
Miroslav Koškár [Fri, 11 Dec 2020 10:53:17 +0000 (11:53 +0100)]
doc: Remove duplicate word

"FRR is currently currently implementing ..."

Signed-off-by: Miroslav Koškár <mk@mkoskar.com>
3 years agoMerge pull request #7739 from mobash-rasool/pim-fixes
Jafar Al-Gharaibeh [Tue, 15 Dec 2020 22:14:32 +0000 (16:14 -0600)]
Merge pull request #7739 from mobash-rasool/pim-fixes

pimd: correcting the  definition for  Mroute flag "R"

3 years agovtysh: When dry-running no need to start/end configuration
Donald Sharp [Tue, 15 Dec 2020 19:45:23 +0000 (14:45 -0500)]
vtysh: When dry-running no need to start/end configuration

When doing a dry run don't send start/end configuration
commands.

Ticket: CM-32665
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agolib, vtysh: Modify start/end configuration commands to be more hidden
Donald Sharp [Tue, 15 Dec 2020 19:21:56 +0000 (14:21 -0500)]
lib, vtysh: Modify start/end configuration commands to be more hidden

There exists a world where some people have put `end` in their
configuration.  Then vtysh will command search for it and find
it and then bad things happen.

Ticket: CM-32665
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7634 from AnuradhaKaruppiah/df-fixes
Patrick Ruddy [Tue, 15 Dec 2020 18:17:51 +0000 (18:17 +0000)]
Merge pull request #7634 from AnuradhaKaruppiah/df-fixes

evpn-mh: DF fixes

3 years agozebra: add support for DF delay timer
Anuradha Karuppiah [Sun, 14 Jun 2020 19:13:23 +0000 (12:13 -0700)]
zebra: add support for DF delay timer

When a new ES is created it is held in a non-DF state for 3 seconds
as specified by RFC7432. This allows the switch time to import
the Type-4 routes from the peers. And the peers time to rx the new
Type-4 route.

root@torm-11:mgmt:~# vtysh -c "show evpn es 03:44:38:39:ff:ff:01:00:00:01"|grep DF
 DF status: non-df
 DF delay: 00:00:01
 DF preference: 50000
root@torm-11:mgmt:~# vtysh -c "show evpn es 03:44:38:39:ff:ff:01:00:00:01"|grep DF
 DF status: df
 DF preference: 50000
root@torm-11:mgmt:~#

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: display DF status only for local ESs
Anuradha Karuppiah [Sun, 14 Jun 2020 13:51:58 +0000 (06:51 -0700)]
zebra: display DF status only for local ESs

For remote ESs it is not relevant and confuses the admin.

Local ES sample -
===============
root@torm-11:mgmt:~# vtysh -c "show evpn es 03:44:38:39:ff:ff:01:00:00:01"
ESI: 03:44:38:39:ff:ff:01:00:00:01
 Type: Local,Remote
 Interface: hostbond1
 State: up
 Bridge port: yes
 Ready for BGP: yes
 VNI Count: 10
 MAC Count: 3
 DF: status: df preference: 50000 >>>>>>>>>>>>>>>
 Nexthop group: 536870913
 VTEPs:
     27.0.0.16 df_alg: preference df_pref: 32767 nh: 268435465
     27.0.0.17 df_alg: preference df_pref: 32767 nh: 268435466

root@torm-11:mgmt:~#

Remote ES sample -
===============
root@torm-11:mgmt:~# vtysh -c "show evpn es 03:44:38:39:ff:ff:02:00:00:01"
ESI: 03:44:38:39:ff:ff:02:00:00:01
 Type: Remote
 Interface: -
 Ready for BGP: no
 VNI Count: 0
 MAC Count: 6
 DF: status: - preference: 0 >>>>>>>>>>>>>>>
 Nexthop group: 536870919
 VTEPs:
     27.0.0.18 nh: 268435464
     27.0.0.19 nh: 268435467
     27.0.0.20 nh: 268435461

root@torm-11:mgmt:~#

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agoMerge pull request #7637 from AnuradhaKaruppiah/evpn-pim-fixes
Patrick Ruddy [Tue, 15 Dec 2020 17:36:24 +0000 (17:36 +0000)]
Merge pull request #7637 from AnuradhaKaruppiah/evpn-pim-fixes

evpn-pim: cleanup and display fixes

3 years agoMerge pull request #7636 from AnuradhaKaruppiah/type-0-esi
Patrick Ruddy [Tue, 15 Dec 2020 17:33:46 +0000 (17:33 +0000)]
Merge pull request #7636 from AnuradhaKaruppiah/type-0-esi

zebra: support for type-0 ESI

3 years agoMerge pull request #7633 from AnuradhaKaruppiah/protodown-fixes
Patrick Ruddy [Tue, 15 Dec 2020 17:23:32 +0000 (17:23 +0000)]
Merge pull request #7633 from AnuradhaKaruppiah/protodown-fixes

evpn-mh: protodown handling fixes

3 years agopimd: correcting the definition for Mroute flag "R"
Mobashshera Rasool [Tue, 15 Dec 2020 12:36:34 +0000 (12:36 +0000)]
pimd: correcting the  definition for  Mroute flag "R"

The flag "R" in below display description denotes the
SGRpt Pruned but the description shows something else
hence correcting the definition.

R2(config)# do show ip mroute
IP Multicast Routing Table
Flags: S- Sparse, C - Connected, P - Pruned
R - RP-bit set, F - Register flag

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agoMerge pull request #7717 from ranjanyash54/2368
Russ White [Tue, 15 Dec 2020 12:29:10 +0000 (07:29 -0500)]
Merge pull request #7717 from ranjanyash54/2368

ospf6d: ospfv3 disable on the interface, but interface prefix still s…

3 years agoMerge pull request #7728 from mobash-rasool/pim-fixes
Russ White [Tue, 15 Dec 2020 12:22:06 +0000 (07:22 -0500)]
Merge pull request #7728 from mobash-rasool/pim-fixes

ospf6d: Link LSA is not updated when router priority is modified

3 years agoMerge pull request #7735 from ton31337/fix/move_to_options_bgp_master_extra_zebra_data
Russ White [Tue, 15 Dec 2020 12:14:17 +0000 (07:14 -0500)]
Merge pull request #7735 from ton31337/fix/move_to_options_bgp_master_extra_zebra_data

bgpd: Use bgp master flags for send extra data to zebra

3 years agoMerge pull request #7736 from ton31337/fix/s_addr_INADDR_ANY
Russ White [Tue, 15 Dec 2020 12:12:49 +0000 (07:12 -0500)]
Merge pull request #7736 from ton31337/fix/s_addr_INADDR_ANY

*: Replace s_addr check agains 0 with INADDR_ANY

3 years agoMerge pull request #7737 from mjstapp/fix_ospf_vty_ntoa
Russ White [Tue, 15 Dec 2020 12:11:00 +0000 (07:11 -0500)]
Merge pull request #7737 from mjstapp/fix_ospf_vty_ntoa

ospfd: avoid inet_ntoa

3 years agoospfd: avoid inet_ntoa
Mark Stapp [Mon, 14 Dec 2020 22:01:18 +0000 (17:01 -0500)]
ospfd: avoid inet_ntoa

some recent commits re-introduced use of inet_ntoa() - fix
them.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years ago*: Replace s_addr check agains 0 with INADDR_ANY
Donatas Abraitis [Mon, 14 Dec 2020 19:01:31 +0000 (21:01 +0200)]
*: Replace s_addr check agains 0 with INADDR_ANY

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #7162 from opensourcerouting/zebra-human-netlink
Stephen Worley [Mon, 14 Dec 2020 19:03:35 +0000 (14:03 -0500)]
Merge pull request #7162 from opensourcerouting/zebra-human-netlink

zebra: human readable netlink dumps

3 years agobgpd: Use bgp master flags for send extra data to zebra
Donatas Abraitis [Mon, 14 Dec 2020 18:28:44 +0000 (20:28 +0200)]
bgpd: Use bgp master flags for send extra data to zebra

root@exit1-debian-9:~/frr# vtysh -c 'conf' -c 'bgp send-extra-data zebra'
root@exit1-debian-9:~/frr# vtysh -c 'show run' | grep send-extra
root@exit1-debian-9:~/frr# vtysh -c 'conf' -c 'no bgp send-extra-data zebra'
root@exit1-debian-9:~/frr# vtysh -c 'show run' | grep send-extra
no bgp send-extra-data zebra

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agozebra: restart start-up delay timer when the first uplink comes up
Anuradha Karuppiah [Wed, 7 Oct 2020 20:09:50 +0000 (13:09 -0700)]
zebra: restart start-up delay timer when the first uplink comes up

When all the uplinks go down the VTEP is disconnected from the
VxLAN overlay and this was handled by proto-downing the ES bonds. When
the uplinks come up again we need to re-enable the ES bonds but that
needs to be done after a delay to allow the EVPN network to converge.

And that is done by firing off the startup-delay timer on first
uplink-up.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: re-sync protodown state with the dplane on new ES add
Anuradha Karuppiah [Mon, 15 Jun 2020 14:41:47 +0000 (07:41 -0700)]
zebra: re-sync protodown state with the dplane on new ES add

1. When a bond is associated with an ES we may need to re-sync
the dplane protodown state (which maybe stale/set by some other
app).
2. Also change the uplink state display to avoid confusion with
protodown reason code (both used to show uplink-up).

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: update protodown display
Anuradha Karuppiah [Sun, 14 Jun 2020 14:31:45 +0000 (07:31 -0700)]
zebra: update protodown display

protodown state is a combination of the dplane and zebra states.
protodown reason is maintained exclusively by zebra. Display this
information on two separate lines to make that ownership clearer.

Also display n/a for bonds as the dplane doesn't support protodowning
the bond device.

Sample output -
==============
root@torm-11:mgmt:~# vtysh -c "show interface hostbond1"|grep -i protodown
  protodown: off (n/a)
  protodown reasons: (uplinks-down)
root@torm-11:mgmt:~# vtysh -c "show interface swp5"|grep -i protodown
  protodown: on
  protodown reasons: (uplinks-down)
root@torm-11:mgmt:~#

PS: Cosmetic changes only, no functional change.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: re-sync protodown state when a port/mbr is linked to an ES-bond
Anuradha Karuppiah [Thu, 4 Jun 2020 12:57:33 +0000 (05:57 -0700)]
zebra: re-sync protodown state when a port/mbr is linked to an ES-bond

The code for this was already there but was not kicking in because of a
zebra local reason-code dup check. Even if the reason-code is the same,
if the dplane and zebra disagree about the protodown state zebra will
need to re-program the dplane.

Fixed a couple of spelling errors in the protodown logs to make greps
easy.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agoMerge pull request #7726 from chiragshah6/mdev
Patrick Ruddy [Mon, 14 Dec 2020 16:28:09 +0000 (16:28 +0000)]
Merge pull request #7726 from chiragshah6/mdev

bgpd: fix evpn route-map vni filter at origin

3 years agoMerge pull request #7664 from donaldsharp/global_bgp_wait
Donatas Abraitis [Mon, 14 Dec 2020 08:28:02 +0000 (10:28 +0200)]
Merge pull request #7664 from donaldsharp/global_bgp_wait

Global bgp wait

3 years agoospf6d: Link LSA is not updated when router priority is modified
Mobashshera Rasool [Mon, 14 Dec 2020 07:45:47 +0000 (07:45 +0000)]
ospf6d: Link LSA is not updated when router priority is modified

Issue: #7727

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agoospf6d: ospfv3 disable on the interface, but interface prefix still shown in the...
Yash Ranjan [Tue, 1 Dec 2020 06:21:04 +0000 (22:21 -0800)]
ospf6d: ospfv3 disable on the interface, but interface prefix still shown in the output

When the ospfv3 interface is disabled by the command "no interface <eth> area <area-id>
the linked interface prefixes does not get flushed

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
3 years agobgpd: fix evpn route-map vni filter at origin
Chirag Shah [Thu, 10 Dec 2020 21:59:56 +0000 (13:59 -0800)]
bgpd: fix evpn route-map vni filter at origin

evpn route-map match (filter) on vni is not working
at the origin of the routes.

evpn match vni route checks for encap type as vxlan.
the source route attribute is not set with vxlan encap
thus the match filter wouldn't work.

Ticket:CM-32554
Reviewed By:CCR-11056
Testing Done:

At source have match vni plus set statement in route-map.
Validate the origin of the route's outbound correctly sets
the 'set' statment based on match vni filter.

At origin:
route-map RM-EVPN-TE-Matches permit 10
 match evpn vni 4001
  set large-community 10:10:119

Receiving end:

Route [5]:[0]:[24]:[78.41.1.0] VNI 4001
5550
  27.0.0.15 from TORS1(downlink-5) (27.0.0.15)
    Origin incomplete, metric 0, valid, external, bestpath-from-AS 5550, best (First path received)
    Extended Community: RT:5550:4001 ET:8 Rmac:00:02:00:00:00:4d
    Large Community: 10:10:119    <--- Large community stamped
    Last update: Thu Dec 10 22:19:26 2020

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 years agoMerge pull request #7713 from ranjanyash54/2371
Donald Sharp [Sat, 12 Dec 2020 01:58:52 +0000 (20:58 -0500)]
Merge pull request #7713 from ranjanyash54/2371

ospf6d: Fix the prefix walking for show database command for intra-prefix and link

3 years agoMerge pull request #7716 from ton31337/fix/print_string_for_afi_safi_mp_bgp
Donald Sharp [Sat, 12 Dec 2020 01:40:25 +0000 (20:40 -0500)]
Merge pull request #7716 from ton31337/fix/print_string_for_afi_safi_mp_bgp

bgpd: Print afi/safi as strings for some zlog_debug outputs

3 years agoMerge pull request #7721 from deastoe/dplane-fpm-routes-stuck-in-queued
Mark Stapp [Fri, 11 Dec 2020 20:19:23 +0000 (15:19 -0500)]
Merge pull request #7721 from deastoe/dplane-fpm-routes-stuck-in-queued

Routes stuck with 'q' flag when dplane_fpm_nl is in use

3 years agozebra: routes stuck with 'q' when using dplane FPM
Duncan Eastoe [Fri, 11 Dec 2020 11:07:59 +0000 (11:07 +0000)]
zebra: routes stuck with 'q' when using dplane FPM

New work enqueued to the dplane_fpm_nl provider is initially de-queued
and re-enqueued, in fpm_nl_process(), to be processed by the provider's
own thread.

After performing this initial de-queue/enqueue we return to
dplane_thread_loop() and check the dplane_fpm_nl output queue for any
work which has been completed.

Since this work is being processed in another thread it is very likely
that there will be some (or all) work still outstanding at this point.
The dataplane thread finishes up any other tasks and then waits until
it is next scheduled. In the meantime the dplane_fpm_nl thread is
processing its work queue until completion.

The issue arises here as the dataplane thread is not explicitly
re-scheduled once dplane_fpm_nl has drained its work queue and
populated its output queue with completed work.

This completed work can sit in the output queue for an indeterminate
period of time, depending upon when the dataplane thread is next
scheduled for other work. If the RIB has reached a stable state then
this could be a significant period of time. During this period zebra
marks these routes as queued, even though they have actually been
processed by all dataplane providers.

An un-related RIB change which triggers a FIB update will result in
the dataplane thread being scheduled and this completed work then
being processed. At this point the routes will then no longer be
marked as queued by zebra. However this new FIB update might itself
then fall victim to the same scenario!

We can observe the above behaviour in these detailed dplane logs.

    11:24:47 zebra[7282]: dplane: incoming new work counter: 2
    11:24:47 zebra[7282]: dplane enqueues 2 new work to provider 'Kernel'
    11:24:47 zebra[7282]: dplane provider 'Kernel': processing
    11:24:47 zebra[7282]: Dplane NEIGH_DISCOVER, ip 192.168.2.2, ifindex 9
    11:24:47 zebra[7282]: Dplane NEIGH_DISCOVER, ip 192.168.2.2, ifindex 9
    11:24:47 zebra[7282]: dplane dequeues 2 completed work from provider Kernel
    11:24:47 zebra[7282]: dplane enqueues 2 new work to provider 'dplane_fpm_nl'
    11:24:47 zebra[7282]: dplane dequeues 1 completed work from provider dplane_fpm_nl
    11:24:47 zebra[7282]: dplane has 1 completed, 0 errors, for zebra main

2 contexts (all incoming work) have been queued to dplane_fpm_nl - all good.
1 completed context was de-queued, so there is outstanding work.

    11:24:58 zebra[7282]: dplane: incoming new work counter: 2
    11:24:58 zebra[7282]: dplane enqueues 2 new work to provider 'Kernel'
    11:24:58 zebra[7282]: dplane provider 'Kernel': processing
    11:24:58 zebra[7282]: ID (193) Dplane nexthop update ctx 0x55c429b6fed0 op NH_INSTALL
    11:24:58 zebra[7282]: 0:5.5.5.5/32 Dplane route update ctx 0x55c429b79690 op ROUTE_INSTALL
    11:24:58 zebra[7282]: dplane dequeues 2 completed work from provider Kernel
    11:24:58 zebra[7282]: dplane enqueues 2 new work to provider 'dplane_fpm_nl'
    11:24:58 zebra[7282]: dplane dequeues 2 completed work from provider dplane_fpm_nl
    11:24:58 zebra[7282]: dplane has 2 completed, 0 errors, for zebra main

A further 2 contexts (all incoming work) have been queued to dplane_fpm_nl - all good.
2 completed contexts were de-queued, which sounds good as that is what we en-queued.
However, there is an outstanding context from earlier, so there is still outstanding
work.

Indeed the new 5.5.5.5/32 route is marked as queued:

    O>q 5.5.5.5/32 [110/10] via 192.168.2.2, dp0p1s3, weight 1, 00:01:19

This remains the case until we trigger a FIB update by installation of the
(eg.) 10.10.10.10/32 route:

    11:26:41 zebra[7282]: dplane: incoming new work counter: 2
    11:26:41 zebra[7282]: dplane enqueues 2 new work to provider 'Kernel'
    11:26:41 zebra[7282]: dplane provider 'Kernel': processing
    11:26:41 zebra[7282]: ID (195) Dplane nexthop update ctx 0x55c429b78ce0 op NH_INSTALL
    11:26:41 zebra[7282]: 0:10.10.10.10/32 Dplane route update ctx 0x55c429b7a040 op ROUTE_INSTALL
    11:26:41 zebra[7282]: dplane dequeues 2 completed work from provider Kernel
    11:26:41 zebra[7282]: dplane enqueues 2 new work to provider 'dplane_fpm_nl'
    11:26:41 zebra[7282]: dplane dequeues 2 completed work from provider dplane_fpm_nl
    11:26:41 zebra[7282]: dplane has 2 completed, 0 errors, for zebra main
    11:26:41 zebra[7282]: zebra2proto: Please add this protocol(2) to proper rt_netlink.c handling
    11:26:41 zebra[7282]: Nexthop dplane ctx 0x55c429b6fed0, op NH_INSTALL, nexthop ID (193), result SUCCESS
    11:26:41 zebra[7282]: default(0:254):5.5.5.5/32 Processing dplane result ctx 0x55c429b79690, op ROUTE_INSTALL result SUCCESS

We observe the same 2 enqueues and 2 dequeues as before, which again suggests
that there is outstanding work.

As expected, the 5.5.5.5/32 route is no longer marked as queued:

    O>* 5.5.5.5/32 [110/10] via 192.168.2.2, dp0p1s3, weight 1, 00:02:06

But the 10.10.10.10/32 route is, as we have not yet processed the completed
context:

    C>q 10.10.10.10/32 is directly connected, lo, 00:26:05

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
3 years agozebra: dplane API to get provider output q length
Duncan Eastoe [Fri, 11 Dec 2020 11:03:53 +0000 (11:03 +0000)]
zebra: dplane API to get provider output q length

Returns the current number of (completed) contexts in the provider's
output queue (dp_ctx_out_q), allowing access to this data from the
provider itself.

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
3 years agoMerge pull request #7711 from volta-networks/fix_ldpsync_client_close_callback
Renato Westphal [Fri, 11 Dec 2020 14:25:53 +0000 (11:25 -0300)]
Merge pull request #7711 from volta-networks/fix_ldpsync_client_close_callback

isisd, ospfd: update 'client close' callback to 'ldp fail' api

3 years agodplane_fpm_nl: queue peak counter never increments
Duncan Eastoe [Fri, 11 Dec 2020 10:26:54 +0000 (10:26 +0000)]
dplane_fpm_nl: queue peak counter never increments

The context queue length peak counter is always set to its current
value, hence never increments.

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
3 years agobgpd: Print afi/safi as strings when handling update/withdraw in zlog_debug
Donatas Abraitis [Fri, 11 Dec 2020 09:44:38 +0000 (11:44 +0200)]
bgpd: Print afi/safi as strings when handling update/withdraw in zlog_debug

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Print afi/safi as strings when handling capability in zlog_debug
Donatas Abraitis [Fri, 11 Dec 2020 09:41:30 +0000 (11:41 +0200)]
bgpd: Print afi/safi as strings when handling capability in zlog_debug

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoospf6d: Fix for "show ipv6 ospf6 database link"
Yash Ranjan [Fri, 11 Dec 2020 05:19:55 +0000 (21:19 -0800)]
ospf6d: Fix for "show ipv6 ospf6 database link"

Some prefixes were not shown in the link database
show command, due to issues with pointer calculation.

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
3 years agoospf6d: Fix for "show ipv6 ospf6 database intra-prefix"
Yash Ranjan [Fri, 11 Dec 2020 05:16:37 +0000 (21:16 -0800)]
ospf6d: Fix for "show ipv6 ospf6 database intra-prefix"

Some prefixes were not shown in the intra-prefix database
show command, due to issues with pointer calculation.

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
3 years agoisisd, ospfd: update 'client close' callback to 'ldp fail' api
Karen Schoener [Thu, 10 Dec 2020 18:35:34 +0000 (13:35 -0500)]
isisd, ospfd: update 'client close' callback to 'ldp fail' api

Update 'client close' callback to 'ldp fail' api.

Signed-off-by: Karen Schoener <karen@voltanet.io>
3 years agozebra: Allow `show zebra client` to give clues about route update status
Donald Sharp [Thu, 3 Dec 2020 20:55:45 +0000 (15:55 -0500)]
zebra: Allow `show zebra client` to give clues about route update status

When entering `show zebra client` allow the display of the client->notify_status
for route updates.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agodoc: Update doc for new global command `bgp suppress-fib-pending`
Donald Sharp [Thu, 3 Dec 2020 20:47:12 +0000 (15:47 -0500)]
doc: Update doc for new global command `bgp suppress-fib-pending`

Document this silliness.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Add global `bgp suppress-fib-pending` command
Donald Sharp [Thu, 3 Dec 2020 20:48:59 +0000 (15:48 -0500)]
bgpd: Add global `bgp suppress-fib-pending` command

On top of the recent `bgp suppress-fib-pending which
was at a BGP_NODE level, add this command at the CONFIG_NODE
level as well and allow the command to apply to all instances
of bgp running.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7678 from donaldsharp/aspath_to_zebra
Russ White [Thu, 10 Dec 2020 15:38:14 +0000 (10:38 -0500)]
Merge pull request #7678 from donaldsharp/aspath_to_zebra

Aspath to zebra

3 years agoMerge pull request #7677 from opensourcerouting/acl-back-compat
Donald Sharp [Thu, 10 Dec 2020 13:14:34 +0000 (08:14 -0500)]
Merge pull request #7677 from opensourcerouting/acl-back-compat

lib: restore previous access/prefix list behaviour

3 years agoMerge pull request #7706 from slankdev/slankdev-unexpose-lm-func-1
Donald Sharp [Thu, 10 Dec 2020 12:43:02 +0000 (07:43 -0500)]
Merge pull request #7706 from slankdev/slankdev-unexpose-lm-func-1

zebra: unexpose label-manager util-funcs as static

3 years agoMerge pull request #7708 from ton31337/fix/doc_hash_cmp
Rafael Zalamena [Thu, 10 Dec 2020 12:22:22 +0000 (09:22 -0300)]
Merge pull request #7708 from ton31337/fix/doc_hash_cmp

doc: update doc comment on hash_cmp (round 2)

3 years agoMerge pull request #7697 from pguibert6WIND/zebra_crash_startup_zns
Rafael Zalamena [Thu, 10 Dec 2020 12:10:34 +0000 (09:10 -0300)]
Merge pull request #7697 from pguibert6WIND/zebra_crash_startup_zns

zebra: anticipate zns creation at vrf creation when backend is vrf-lite

3 years agoMerge pull request #7492 from Niral-Networks/niral_ospfv3_fix_redist
Rafael Zalamena [Thu, 10 Dec 2020 12:01:12 +0000 (09:01 -0300)]
Merge pull request #7492 from Niral-Networks/niral_ospfv3_fix_redist

ospf6d : Code refactoring for route redistribution.

3 years agodoc: update doc comment on hash_cmp (round 2)
Donatas Abraitis [Thu, 10 Dec 2020 09:20:42 +0000 (11:20 +0200)]
doc: update doc comment on hash_cmp (round 2)

Related: c8aad9c3a4b3e6d6d85fcedaab80cc271015b1f9

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #7649 from qlyoung/fix-doc-comment-hashcmp
Donatas Abraitis [Thu, 10 Dec 2020 09:07:06 +0000 (11:07 +0200)]
Merge pull request #7649 from qlyoung/fix-doc-comment-hashcmp

lib: update doc comment on hash_cmp

3 years agoMerge pull request #7524 from donaldsharp/zebra_route_map_tighten
Donatas Abraitis [Thu, 10 Dec 2020 09:01:25 +0000 (11:01 +0200)]
Merge pull request #7524 from donaldsharp/zebra_route_map_tighten

zebra: deny when route map is specified but does not exist yet

3 years agoMerge pull request #7705 from chiragshah6/mdev
Donatas Abraitis [Thu, 10 Dec 2020 08:58:59 +0000 (10:58 +0200)]
Merge pull request #7705 from chiragshah6/mdev

bgpd: local routes use non-default distance

3 years agoMerge pull request #7703 from volta-networks/fix_ldpsync_remove_hello
Donald Sharp [Thu, 10 Dec 2020 01:21:11 +0000 (20:21 -0500)]
Merge pull request #7703 from volta-networks/fix_ldpsync_remove_hello

ldpd, isisd, ospfd: Remove periodic ldp-sync hello message

3 years agozebra: unexpose label-manager util-funcs as static
Hiroki Shirokura [Thu, 10 Dec 2020 00:33:29 +0000 (09:33 +0900)]
zebra: unexpose label-manager util-funcs as static

Following functions which is a piece of label-maanager implementation
isn't called from out side of its file. And all lines of label-manager
are coded on zebra/label_manager.c at this time. So these functions
should be unexposed.

Functions:
- create_label_chunk
- assign_label_chunk
- delete_label_chunk
- release_label_chunk

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agobgpd: local routes use non-default distance
Chirag Shah [Wed, 9 Dec 2020 05:04:50 +0000 (21:04 -0800)]
bgpd: local routes use non-default distance

Use user provided AD for local routes (aggregate).

 address-family ipv4 unicast
  distance bgp 20 200 210
  network 47.2.2.8/30
  aggregate-address 51.1.0.0/16

Testing Done:

Before aggr route uses default 200 AD even user provided local AD.
B>* 51.1.0.0/16 [200/0] unreachable (blackhole), weight 1, 00:01:14

After:
B>* 51.1.0.0/16 [210/0] unreachable (blackhole), weight 1, 00:00:01

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 years agoMerge pull request #7685 from mjstapp/fix_nhrp_int_sa
Donald Sharp [Wed, 9 Dec 2020 20:02:42 +0000 (15:02 -0500)]
Merge pull request #7685 from mjstapp/fix_nhrp_int_sa

nhrpd: fix SA warning in nhrp_interface

3 years agoldpd, isisd, ospfd: Remove periodic ldp-sync hello message
Karen Schoener [Wed, 9 Dec 2020 17:09:18 +0000 (12:09 -0500)]
ldpd, isisd, ospfd: Remove periodic ldp-sync hello message

Removing the obsolete ldp-sync periodic 'hello' message.

When ldp-sync is configured, IGPs take action if the LDP process goes down.

The IGPs have been updated to use the zapi client close callback to detect
the LDP process going down.

Signed-off-by: Karen Schoener <karen@voltanet.io>
3 years agoMerge pull request #7699 from opensourcerouting/ldpd-printfrr-issue
Mark Stapp [Wed, 9 Dec 2020 18:36:28 +0000 (13:36 -0500)]
Merge pull request #7699 from opensourcerouting/ldpd-printfrr-issue

ldpd: fix printfrr format specifiers in the child processes

3 years agoMerge pull request #7700 from opensourcerouting/isisd-null-check
Mark Stapp [Wed, 9 Dec 2020 18:34:11 +0000 (13:34 -0500)]
Merge pull request #7700 from opensourcerouting/isisd-null-check

isisd: fix null pointer dereference when parsing LSP

3 years agoMerge pull request #7686 from volta-networks/fix_ldpsync_igps_detect_client_close
Donald Sharp [Wed, 9 Dec 2020 16:49:22 +0000 (11:49 -0500)]
Merge pull request #7686 from volta-networks/fix_ldpsync_igps_detect_client_close

isisd, ospfd: IGPs detect LDP down via zapi client close message

3 years agoisisd: fix null pointer dereference when parsing LSP
Renato Westphal [Thu, 3 Dec 2020 15:19:06 +0000 (12:19 -0300)]
isisd: fix null pointer dereference when parsing LSP

In some extraordinary circumstances an LSP might not have any
TLV. Add a null check to prevent a crash when that happens.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoldpd: fix printfrr format specifiers in the child processes
Renato Westphal [Sun, 6 Dec 2020 00:44:41 +0000 (21:44 -0300)]
ldpd: fix printfrr format specifiers in the child processes

In ldpd, the child processes send IPC messages to the main process to
perform logging in their behalf (access to the file descriptor used
for logging needs to be serialized). This commit fixes a problem
that was preventing the printfrr format specifiers from working in
the child processes, since vsnprintf() was being used instead of
vsnprintfrr() before sending the log messages to the parent process.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoisisd, ospfd: IGPs detect LDP down via zapi client close message
Karen Schoener [Tue, 8 Dec 2020 14:44:27 +0000 (09:44 -0500)]
isisd, ospfd: IGPs detect LDP down via zapi client close message

When ldp-sync is configured, IGPs take action if the LDP process goes down.

Currently, IGPs detect the LDP process is down if they do not receive a
periodic 'hello' message from LDP within 1 second.

Intermittently, this heartbeat mechanism causes false topotest failures.
When the failure occurs, LDP is busy receiving messages from zebra for a
few seconds.  During this time, LDP does not send the expected periodic
message.

With this change, IGPs detect LDP down via zapi client close message.

Signed-off-by: Karen Schoener <karen@voltanet.io>
3 years agozebra: anticipate zns creation at vrf creation when backend is vrf-lite
Philippe Guibert [Tue, 8 Dec 2020 11:11:05 +0000 (11:11 +0000)]
zebra: anticipate zns creation at vrf creation when backend is vrf-lite

in the case the namespace pointer is already available, feed it at vrf
creation. this prevents from crashing if the netlink parsing already
began, and the vrf-lite is not enabled yet.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>