]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
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 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 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>
3 years agoMerge pull request #7690 from donaldsharp/nht_show_is_not_not_not
Mark Stapp [Wed, 9 Dec 2020 12:58:37 +0000 (07:58 -0500)]
Merge pull request #7690 from donaldsharp/nht_show_is_not_not_not

zebra, tests: Fix `show ip nht`

3 years agolib: prevent libyang abstraction memory leak
Rafael Zalamena [Wed, 9 Dec 2020 12:57:28 +0000 (09:57 -0300)]
lib: prevent libyang abstraction memory leak

Call `ly_set_free()` on `YANG_ITER_STOP` as well.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agoMerge pull request #7688 from kuldeepkash/bgp_multi_vrf
Donald Sharp [Wed, 9 Dec 2020 12:47:09 +0000 (07:47 -0500)]
Merge pull request #7688 from kuldeepkash/bgp_multi_vrf

tests: Enhanced auto-rd verification logic for evpn_type5 tests

3 years agoMerge pull request #7694 from slankdev/slankdev-use-zservsend-1
Donald Sharp [Wed, 9 Dec 2020 12:36:32 +0000 (07:36 -0500)]
Merge pull request #7694 from slankdev/slankdev-use-zservsend-1

zebra: use zserv_send_message instead of writen

3 years agozebra: use zserv_send_message instead of writen
Hiroki Shirokura [Wed, 9 Dec 2020 08:17:13 +0000 (17:17 +0900)]
zebra: use zserv_send_message instead of writen

Following functions is using writen to dispatch message
into socket, but another function uses zserv_send_message.
This commit does tiny unification for zapi's socket messaging.

Funcs:
- zsend_assign_label_chunk_response()
- zsend_label_manager_connect_response()

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agoospf6d : Code refactoring for route redistribution.
Kaushik [Mon, 9 Nov 2020 15:51:29 +0000 (07:51 -0800)]
ospf6d : Code refactoring for route redistribution.

1. Created new ospf6_redist structure.
2. Moved the 'route_map' structure from structure 'ospf6' to
   structure 'ospf6_redist'.
3. Added new message type OSPF6_REDISTRIBUTE.
4. Added the placeholder for metric option in structure ospf6_redist
   for redistribute.
5. Added few API's for route redistribute lookup, add & del.

Signed-off-by: Kaushik <kaushik@niralnetworks.com>
3 years agozebra, tests: Fix `show ip nht`
Donald Sharp [Tue, 8 Dec 2020 20:50:46 +0000 (15:50 -0500)]
zebra, tests: Fix `show ip nht`

The `show ip nht` and `show ipv6 nht` commands were broken.
This is because recent code commit: 0154d8ce45a5099d2d0b9dd3de4e

assumed that p must not be NULL and this is not the case.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7684 from donaldsharp/metric_doc
Mark Stapp [Tue, 8 Dec 2020 17:16:43 +0000 (12:16 -0500)]
Merge pull request #7684 from donaldsharp/metric_doc

doc: Add some notes about RR semantics and the Linux Kernel

3 years agotests: Enhanced auto-rd verification as per changes done in #7652
kuldeepkash [Tue, 8 Dec 2020 15:50:16 +0000 (15:50 +0000)]
tests: Enhanced auto-rd verification as per changes done in #7652

1. As per recent changes done in PR #7652, we have modified the auto-rd verification logic
link: https://github.com/FRRouting/frr/pull/7652
Signed-off-by: kuldeepkash <kashyapk@vmware.com>
3 years agonhrpd: fix SA warning in nhrp_interface
Mark Stapp [Tue, 8 Dec 2020 14:10:10 +0000 (09:10 -0500)]
nhrpd: fix SA warning in nhrp_interface

Clear SA warning from recent nhrp cache code changes.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agodoc: Update sharpd and bgpd documentation
Donald Sharp [Sat, 5 Dec 2020 20:41:53 +0000 (15:41 -0500)]
doc: Update sharpd and bgpd documentation

Update these two daemons to include the new
ability for both bgp and sharpd to send extra informational
data to zebra.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd, zebra: Add ability for bgp to send AS-Path information to zebra
Donald Sharp [Sat, 5 Dec 2020 20:34:59 +0000 (15:34 -0500)]
bgpd, zebra: Add ability for bgp to send AS-Path information to zebra

Add a bit of code to allow bgp to send the AS-Path associated with
the route being installed to zebra so it can be displayed and
used as part of the `show ip route A` command in zebra.

eva# show ip route 20.0.0.0/11
Routing entry for 20.0.0.0/11
  Known via "bgp", distance 20, metric 0, best
  Last update 00:00:00 ago
  * 192.168.161.1, via enp39s0, weight 1
    AS-Path: 60000 64539 15096 6939 8075

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agosharpd, zebra: Pass and display opaque data as PoC
Donald Sharp [Sat, 5 Dec 2020 19:51:21 +0000 (14:51 -0500)]
sharpd, zebra: Pass and display opaque data as PoC

Pass data from sharpd to zebra as opaque data and display
it as part of the detailed route data.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Setup structure for opaque data to be displayed
Donald Sharp [Sat, 5 Dec 2020 12:06:38 +0000 (07:06 -0500)]
zebra: Setup structure for opaque data to be displayed

Setup the output mechanism for opaque data to be displayed
to the end operator.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Gather opaque data into the route entry for storage
Donald Sharp [Sat, 5 Dec 2020 01:01:51 +0000 (20:01 -0500)]
zebra: Gather opaque data into the route entry for storage

Just gather the opaque data into the route entry.  Later
commits will display this data for end users as well as
to send it down.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agolib: Add encode/decode of opaque data
Donald Sharp [Sat, 5 Dec 2020 00:40:22 +0000 (19:40 -0500)]
lib: Add encode/decode of opaque data

Add a bit of code that allows for opaque data to be
sent from an upper level protocol to zebra.  This is just
pass through data that will be used as part of displaying
useful data about a route in a `show ip route` command
in future commits.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agolib, zebra: Fix overlapping message types
Donald Sharp [Mon, 7 Dec 2020 17:13:06 +0000 (12:13 -0500)]
lib, zebra: Fix overlapping message types

We had duplicate message id's.  Shit's broke yo.

Fix.  I have no idea how this properly worked.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7683 from volta-networks/feat_zapi_client_close
Donald Sharp [Tue, 8 Dec 2020 14:05:00 +0000 (09:05 -0500)]
Merge pull request #7683 from volta-networks/feat_zapi_client_close

zebra: Adding zapi client close notification

3 years agodoc: Add some notes about RR semantics and the Linux Kernel
Donald Sharp [Tue, 8 Dec 2020 14:02:02 +0000 (09:02 -0500)]
doc: Add some notes about RR semantics and the Linux Kernel

Add doc about RR semantics for Linux Kernel and why it works
the way it does.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Adding zapi client close notification
Karen Schoener [Mon, 7 Dec 2020 23:01:01 +0000 (18:01 -0500)]
zebra: Adding zapi client close notification

When zebra detects a client close, send a zapi client close
notification.

Signed-off-by: Karen Schoener <karen@voltanet.io>
3 years agoMerge pull request #7681 from chiragshah6/mdev
Russ White [Mon, 7 Dec 2020 22:19:09 +0000 (17:19 -0500)]
Merge pull request #7681 from chiragshah6/mdev

bgpd: fix distance for aggregate route

3 years agoMerge pull request #7582 from AnuradhaKaruppiah/frr-reload-cleanup
Russ White [Mon, 7 Dec 2020 21:19:04 +0000 (16:19 -0500)]
Merge pull request #7582 from AnuradhaKaruppiah/frr-reload-cleanup

frr reload fixes for mac and ip normalization

3 years agoMerge pull request #7501 from pguibert6WIND/nhrp_map_fix
Russ White [Mon, 7 Dec 2020 21:17:39 +0000 (16:17 -0500)]
Merge pull request #7501 from pguibert6WIND/nhrp_map_fix

nhrpd: cache config may disappear if iface not present at startup

3 years agobgpd: fix distance for aggregate route
Chirag Shah [Wed, 2 Dec 2020 00:02:36 +0000 (16:02 -0800)]
bgpd: fix distance for aggregate route

bgp aggregate address installs route with self peer which
can have peer->su of unspecifed type.
bgp_distance_apply bailed out as it fails to parse
sockunion2hostprefix for af type unspec.

config:
 address-family ipv4 unicast
  aggregate-address 50.1.0.0/16 summary-only

Testing Done:

Before:
B>* 50.1.0.0/16 [20/0] unreachable (blackhole), weight 1, 00:00:02

After:
B>* 50.1.0.0/16 [200/0] unreachable (blackhole), weight 1, 00:01:28

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 years agolib: silently ignore duplicated values
Rafael Zalamena [Mon, 7 Dec 2020 15:10:42 +0000 (12:10 -0300)]
lib: silently ignore duplicated values

Keep the previous CLI behavior of silently ignoring access lists which
contain the same value.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agolib: disallow prefix list duplicated values
Rafael Zalamena [Mon, 7 Dec 2020 15:08:44 +0000 (12:08 -0300)]
lib: disallow prefix list duplicated values

Don't allow users to create multiple entries in the same list with the
same value to keep the behavior previously to northbound migration.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agoMerge pull request #7671 from idryzhov/bfd-fix-session-lookup
Rafael Zalamena [Mon, 7 Dec 2020 13:09:34 +0000 (10:09 -0300)]
Merge pull request #7671 from idryzhov/bfd-fix-session-lookup

bfd: fix session lookup

3 years agoMerge pull request #7679 from donaldsharp/topo_fixes
Donatas Abraitis [Mon, 7 Dec 2020 09:14:09 +0000 (11:14 +0200)]
Merge pull request #7679 from donaldsharp/topo_fixes

tests: Close some open handles

3 years agotests: Close some open handles
Donald Sharp [Sun, 6 Dec 2020 01:05:52 +0000 (20:05 -0500)]
tests: Close some open handles

I accidently installed something that is telling me about
unlosed handles in the tests.  Let's clean them up.

<and yes I have no idea wtf I did>

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agolib: silently ignore duplicated values
Rafael Zalamena [Fri, 4 Dec 2020 21:12:58 +0000 (18:12 -0300)]
lib: silently ignore duplicated values

Keep the previous CLI behavior of silently ignoring access lists which
contain the same value.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agolib: disallow access list duplicated values
Rafael Zalamena [Fri, 4 Dec 2020 21:11:45 +0000 (18:11 -0300)]
lib: disallow access list duplicated values

Don't allow users to create multiple rules in the same list with the
same value to keep the behavior previously to northbound migration.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agoMerge pull request #7675 from donaldsharp/bgp_nh
Mark Stapp [Fri, 4 Dec 2020 20:36:27 +0000 (15:36 -0500)]
Merge pull request #7675 from donaldsharp/bgp_nh

bgpd: Let's actually track if the nh was updated

3 years agoMerge pull request #7669 from ranjanyash54/2370
Donald Sharp [Fri, 4 Dec 2020 15:39:53 +0000 (10:39 -0500)]
Merge pull request #7669 from ranjanyash54/2370

ospf6d: Router-ID filter is not filtering the show command "do show i…

3 years agoMerge pull request #7673 from idryzhov/isisd-sa
Donald Sharp [Fri, 4 Dec 2020 15:39:14 +0000 (10:39 -0500)]
Merge pull request #7673 from idryzhov/isisd-sa

isisd: fix SA warning

3 years agoMerge pull request #7667 from donaldsharp/vtysh_more_useful_data
Mark Stapp [Fri, 4 Dec 2020 13:14:23 +0000 (08:14 -0500)]
Merge pull request #7667 from donaldsharp/vtysh_more_useful_data

Vtysh more useful data

3 years agobgpd: Let's actually track if the nh was updated
Donald Sharp [Fri, 4 Dec 2020 13:01:31 +0000 (08:01 -0500)]
bgpd: Let's actually track if the nh was updated

In bgp_zebra_announce when iterating over multipath
we were checking to ensure that the nexthop was updated
but never initially clearing the nh_updated variable.
Thus leading to a situation where we could crash.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoospf6d: Router-ID filter is not filtering the show command "do show ipv6 ospf6 neighb...
Yash Ranjan [Fri, 4 Dec 2020 09:40:33 +0000 (01:40 -0800)]
ospf6d: Router-ID filter is not filtering the show command "do show ipv6 ospf6 neighbour A.B.C.D"

Compare the neighbour id string from the arguments to the router_id of
the neighbor. If equal then call the show function.

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
3 years agoisisd: fix SA warning
Igor Ryzhov [Fri, 4 Dec 2020 12:11:20 +0000 (15:11 +0300)]
isisd: fix SA warning

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobfd: fix session lookup
Igor Ryzhov [Fri, 4 Dec 2020 11:37:36 +0000 (14:37 +0300)]
bfd: fix session lookup

local-address is optional for both IPv4 and IPv6.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #7663 from donaldsharp/vtysh_history_display
Donatas Abraitis [Fri, 4 Dec 2020 08:25:18 +0000 (10:25 +0200)]
Merge pull request #7663 from donaldsharp/vtysh_history_display

doc, vtysh: Add a `show history` command

3 years agovtysh: Have help dump the how FRR was built
Donald Sharp [Fri, 4 Dec 2020 03:23:57 +0000 (22:23 -0500)]
vtysh: Have help dump the how FRR was built

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agovtysh: Display version w/ vtysh --help
Donald Sharp [Fri, 4 Dec 2020 03:21:43 +0000 (22:21 -0500)]
vtysh: Display version w/ vtysh --help

Add a bit of useful data to know what version of FRR we
are playing with in this vtysh instance.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7618 from ckishimo/nssa_role
Donald Sharp [Thu, 3 Dec 2020 21:24:21 +0000 (16:24 -0500)]
Merge pull request #7618 from ckishimo/nssa_role

ospfd: fix cosmetic show ip ospf when NSSA

3 years agoMerge pull request #7661 from volta-networks/fix_ldpsync_hello_timeout
Donald Sharp [Thu, 3 Dec 2020 21:14:17 +0000 (16:14 -0500)]
Merge pull request #7661 from volta-networks/fix_ldpsync_hello_timeout

isisd, ospfd: increase timeout to fix intermittent LDP Sync test failure

3 years agoMerge pull request #7656 from donaldsharp/bgp_convergence
Mark Stapp [Thu, 3 Dec 2020 19:17:09 +0000 (14:17 -0500)]
Merge pull request #7656 from donaldsharp/bgp_convergence

tests: Wait for convergence first

3 years agodoc, vtysh: Add a `show history` command
Donald Sharp [Thu, 3 Dec 2020 17:36:29 +0000 (12:36 -0500)]
doc, vtysh: Add a `show history` command

Dump the cli history to the user in vtysh when a `show history`
command is entered.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7399 from AnuradhaKaruppiah/mh-mac-ecmp-fixes
Patrick Ruddy [Thu, 3 Dec 2020 16:27:49 +0000 (16:27 +0000)]
Merge pull request #7399 from AnuradhaKaruppiah/mh-mac-ecmp-fixes

evpn-mh: miscellaneous fixes in MAC-sync and MAC-ECMP handling

3 years agoisisd, ospfd: increase timeout to fix intermittent LDP Sync test failure
Karen Schoener [Thu, 3 Dec 2020 16:23:59 +0000 (11:23 -0500)]
isisd, ospfd: increase timeout to fix intermittent LDP Sync test failure

Currently, IGPs are coded to receive a 'hello' message from LDP every second.
Intermittently, LDP Sync topotests are failing because the IGPs fail to
receive this 'hello' message every second.
When the LDP Sync topotests fail, LDP logs show that LDP is processing
zapi messages for 1-2 seconds.

This is a shortterm fix, in order to prevent CI pipeline failures.
The longterm fix is in progress.

Signed-off-by: Karen Schoener <karen@voltanet.io>