]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
4 years agoMerge pull request #6342 from Orange-OpenSource/dev_isis_sr dev_isis_sr
Renato Westphal [Thu, 14 May 2020 17:23:03 +0000 (14:23 -0300)]
Merge pull request #6342 from Orange-OpenSource/dev_isis_sr

isisd: Preparation to merge Segment-Routing into master

4 years agoisisd: Update documentation for Segment Routing
Olivier Dugeon [Tue, 5 May 2020 14:40:35 +0000 (16:40 +0200)]
isisd: Update documentation for Segment Routing

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
4 years agoisisd: Update Segment Routing Show Commands
Olivier Dugeon [Tue, 5 May 2020 14:29:46 +0000 (16:29 +0200)]
isisd: Update Segment Routing Show Commands

 * Improve `show isis segment-routing prefix-sids` output
 * Add new `show isis segment-routing node' command

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
4 years agoisisd: IS-IS-SR preparation for master 5/5
Olivier Dugeon [Mon, 4 May 2020 17:39:20 +0000 (19:39 +0200)]
isisd: IS-IS-SR preparation for master 5/5

Update comments (doxygen style) for all functions.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
4 years agoisisd: IS-IS-SR preparation for master 4/5
Olivier Dugeon [Mon, 4 May 2020 16:26:21 +0000 (18:26 +0200)]
isisd: IS-IS-SR preparation for master 4/5

 * Regroup fonctions to install label for Prefix and Adjacency SID
 * Change 'replace_semantics' variable name by 'make_before_break' in
   sr_prefix_reinstall() function and adjust comments
 * Call directly lsp_regenerate_schedule() from isis_nb_config.c when MSD
   is updated

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
4 years agoisisd: IS-IS-SR preparation for master 3/5
Olivier Dugeon [Mon, 4 May 2020 07:40:36 +0000 (09:40 +0200)]
isisd: IS-IS-SR preparation for master 3/5

Add debug macro and debug messages

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
4 years agoisisd: IS-IS-SR preparation for master 2/5
Olivier Dugeon [Sun, 3 May 2020 18:01:20 +0000 (20:01 +0200)]
isisd: IS-IS-SR preparation for master 2/5

 * Rename functions following rules: isis_sr_XXX is kept for external functions
   and isis_sr prefix remove for static ones
 * Rename local_label & remote_label variables by input_label & output_label
 * Change parameter order (to follow other functions) in sr_node_srgb_update()

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
4 years agoisisd: IS-IS-SR preparation for master 1/5
Olivier Dugeon [Thu, 30 Apr 2020 09:23:15 +0000 (11:23 +0200)]
isisd: IS-IS-SR preparation for master 1/5

 * Rename RB-TREE variable from tree_sr_XXX to srdb_XXX
 * Replace parse_flags by an enum and rename it srdb_state which reflects
   more the role of this flag: determined the state of SR-Node and SR-Prefix
   stored in the SRDB: VALIDATED, NEW, MODIFIED, UNCHANGED

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
5 years agoisisd: Update IS-IS SR Label Manager
Olivier Dugeon [Fri, 10 Apr 2020 15:12:48 +0000 (17:12 +0200)]
isisd: Update IS-IS SR Label Manager

This change modify the way IS-IS is connected to the Label Manager:
 - Add emission of Hello Message prior to the connection as per
   modification introduced by PR #5925
 - Add 'session_id' as per modification introduced by PR #6224
 - Add Doxygen documentation to Label Manager functions

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
5 years agoisisd: Update ISIS-SR with new ZAPI message
Olivier Dugeon [Tue, 3 Mar 2020 15:59:33 +0000 (16:59 +0100)]
isisd: Update ISIS-SR with new ZAPI message

Update label enforcement due to modification in zapi message:
zapi_nexthop_label becomes zapi_nexthop as per PR #5813

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
5 years agotests: add topotest for IS-IS SR
Renato Westphal [Mon, 23 Sep 2019 12:38:04 +0000 (09:38 -0300)]
tests: add topotest for IS-IS SR

This commit introduces a comprehensive test for IS-IS Segment
Routing. It features the following network topology:

                         +---------+
                         |         |
                         |   RT1   |
                         | 1.1.1.1 |
                         |         |
                         +---------+
                              |eth-sw1
                              |
                              |
                              |
         +---------+          |          +---------+
         |         |          |          |         |
         |   RT2   |eth-sw1   |   eth-sw1|   RT3   |
         | 2.2.2.2 +----------+----------+ 3.3.3.3 |
         |         |     10.0.1.0/24     |         |
         +---------+                     +---------+
    eth-rt4-1|  |eth-rt4-2          eth-rt5-1|  |eth-rt5-2
             |  |                            |  |
  10.0.2.0/24|  |10.0.3.0/24      10.0.4.0/24|  |10.0.5.0/24
             |  |                            |  |
    eth-rt2-1|  |eth-rt2-2          eth-rt3-1|  |eth-rt3-2
         +---------+                     +---------+
         |         |                     |         |
         |   RT4   |     10.0.6.0/24     |   RT5   |
         | 4.4.4.4 +---------------------+ 5.5.5.5 |
         |         |eth-rt5       eth-rt4|         |
         +---------+                     +---------+
       eth-rt6|                                |eth-rt6
              |                                |
   10.0.7.0/24|                                |10.0.8.0/24
              |          +---------+           |
              |          |         |           |
              |          |   RT6   |           |
              +----------+ 6.6.6.6 +-----------+
                  eth-rt4|         |eth-rt5
                         +---------+

Each router has both an IPv4 and an IPv6 loopback address, each of
which has a corresponding Prefix-SID configured.

Basic SR functionality is tested. First, the topotest ensures that
all expected Prefix-SIDs and Adj-SIDs are flooded and installed
correctly in all routers of the network. Later, network failures
are simulated and configuration changes are performed in several
different routers. The topotest then checks if IS-IS has converged
as expected in the network according to the network failures and
configuration changes that happened.

The topotest comprises 11 different steps, each with four individual
tests (for a total of 44 tests). A summary of what each step does
is provided below:

---

STEP 1:
-Initial network convergence

---

Step 2:
Action(s):
-Disable IS-IS on the eth-rt5 interface on rt4

Expected changes:
-rt4 should uninstall the Adj-SIDs pointing to rt5
-rt5 should uninstall the Adj-SIDs pointing to rt4
-rt2 should reinstall rt5's Prefix-SIDs (2 nexthops deleted)
-rt3 should reinstall rt4's Prefix-SIDs (2 nexthops deleted)
-rt4 should reinstall rt3's Prefix-SIDs (1 nexthop deleted)
-rt4 should reinstall rt5's Prefix-SIDs (1 nexthop changed)
-rt5 should reinstall rt2's Prefix-SIDs (1 nexthop deleted)
-rt5 should reinstall rt4's Prefix-SIDs (1 nexthop changed)

---

Step 3:
Action(s):
-Shut down the eth-rt4 interface on rt6
-Shut down the eth-rt5 interface on rt6

Expected changes:
-All routers should uninstall rt6's Prefix-SIDs
-rt4 and rt5 should uninstall the Adj-SIDs pointing to rt6
-rt4 should reconverge rt5's Prefix-SIDs through rt2 using ECMP
-rt5 should reconverge rt4's Prefix-SIDs through rt3 using ECMP
-rt6 should uninstall all its IS-IS routes, Prefix-SIDs and Adj-SIDs

---

Step 4:
Action(s):
-Bring up the eth-rt4 interface on rt6
-Bring up the eth-rt5 interface on rt6
-Change rt6's SRGB

Expected changes:
-All routers should install rt6's Prefix-SIDs
-rt4 and rt5 should install Adj-SIDs for rt6
-rt4 should reconverge rt5's Prefix-SIDs through rt6 using the new SRGB
-rt5 should reconverge rt4's Prefix-SIDs through rt6 using the new SRGB
-rt6 should reinstall all IS-IS routes and Prefix-SIDs from the network,
and Adj-SIDs for rt4 and rt5

---

Step 5:
Action(s):
-Disable SR on rt6

Expected changes:
-All routers should uninstall rt6's Prefix-SIDs
-rt4 should uninstall rt5's Prefix-SIDs since the nexthop router hasn't
SR enabled anymore
-rt5 should uninstall rt4's Prefix-SIDs since the nexthop router hasn't
SR enabled anymore
-rt6 should uninstall all Prefix-SIDs from the network, and the Adj-SIDs
for rt4 and rt5

---

Step 6:
Action(s):
-Enable SR on rt6

Expected changes:
-All routers should install rt6's Prefix-SIDs
-rt4 should install rt5's Prefix-SIDs through rt6
-rt5 should install rt4's Prefix-SIDs through rt6
-rt6 should install all Prefix-SIDs from the network, and Adj-SIDs for
rt4 and rt5

---

Step 7:
Action(s):
-Delete rt1's Prefix-SIDs

Expected changes:
-All routers should uninstall rt1's Prefix-SIDs

---

Step 8:
Action(s):
-Re-add rt1's Prefix-SIDs

Expected changes:
-All routers should install rt1's Prefix-SIDs

---

Step 9:
Action(s):
-Change rt1's Prefix-SIDs to use the no-php option
-Change rt6's Prefix-SIDs to stop using the explicit-null option

Expected changes:
-rt2 and rt3 should reinstall rt1's Prefix-SIDs accordingly
-rt4 and rt5 should reinstall rt6's Prefix-SIDs accordingly

---

Step 10:
Action(s):
-Remove the IPv4 address from rt4's eth-rt2-1 interface

Expected changes:
-rt2 should uninstall the IPv4 Adj-SIDs attached to the eth-rt4-1
interface
-rt2 should reinstall all IPv4 Prefix-SIDs whose nexthop router is rt4
(ECMP shouldn't be used anymore)
-rt4 should reinstall all IPv4 Prefix-SIDs whose nexthop router is rt2
(ECMP shouldn't be used anymore)

---

Step 11:
Action(s):
-Restore the original network setup

Expected changes:
-All routes, Prefix-SIDs and Adj-SIDs should be the same as they were
after the initial network convergence (step 1)

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agodoc: add documentation for IS-IS Segment Routing
Olivier Dugeon [Thu, 8 Aug 2019 19:44:23 +0000 (16:44 -0300)]
doc: add documentation for IS-IS Segment Routing

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
5 years agoisisd: add support for segment routing
Renato Westphal [Sun, 4 Aug 2019 01:02:37 +0000 (22:02 -0300)]
isisd: add support for segment routing

This is an implementation of the IS-IS SR draft [1] for FRR.

The following features are supported:
* IPv4 and IPv6 Prefix-SIDs;
* IPv4 and IPv6 Adj-SIDs and LAN-Adj-SIDs;
* Index and absolute labels;
* The no-php and explicit-null Prefix-SID flags;
* Full integration with the Label Manager.

Known limitations:
* No support for Anycast-SIDs;
* No support for the SID/Label Binding TLV (required for LDP interop).
* No support for persistent Adj-SIDs;
* No support for multiple SRGBs.

[1] draft-ietf-isis-segment-routing-extensions-25

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoisisd: add segment-routing CLI commands
Renato Westphal [Wed, 7 Aug 2019 16:37:00 +0000 (13:37 -0300)]
isisd: add segment-routing CLI commands

In the name of consistency, these commands are very similar to the
ospfd SR configuration commands.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoisisd: add segment-routing YANG nodes and skeleton callbacks
Renato Westphal [Wed, 7 Aug 2019 16:35:07 +0000 (13:35 -0300)]
isisd: add segment-routing YANG nodes and skeleton callbacks

Most definitions were borrowed from the IETF IS-IS SR YANG module,
with a few adaptations. Of particular notice are the following:
* No support for the configuration of multiple SRGBs.
* No distinction between local and connected Prefix-SIDs, both are
  configured the same way.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoisisd: remove refcount from the isis_nexthop structure
Renato Westphal [Fri, 6 Sep 2019 03:57:14 +0000 (00:57 -0300)]
isisd: remove refcount from the isis_nexthop structure

isisd implements an optimization that allows multiple routes to
share the same nexthop (using a refcount) in order to save memory.

Now that SR support is coming, however, it will be necessary to
embed additional SR-related information inside the isis_nexthop
structure. But this can only be done if the nexthops aren't shared
among routes anymore.

Removing this memory optimization should have minimal impact since
the isis_nexthop structure is really small. On large networks with
thousands of routes, the memory saving would be in the order of a
few kilobytes.  Not something we should be concerned about nowadays.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoisisd: split vty_out_timestr() into two helper functions
Renato Westphal [Sat, 10 Aug 2019 20:57:43 +0000 (17:57 -0300)]
isisd: split vty_out_timestr() into two helper functions

The new log_uptime() function logs an UNIX timestamp to a buffer
provided by the user. It's very flexibile and can be used in a
variety of contexts, different from vty_out_timestr() which is too
tied to the VTY code.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoisisd: introduce new adjacency hooks
Renato Westphal [Wed, 7 Aug 2019 22:54:00 +0000 (19:54 -0300)]
isisd: introduce new adjacency hooks

The 'isis_adj_ip_enabled_hook' hook will be called whenever
an adjacency goes from zero to one or more IPv4 or IPv6
addresses. Conversely, the 'isis_adj_ip_disabled_hook' hook will
be called whenever an adjacency goes from one or more IPv4/IPv6
addresses to no addresses at all.

These hooks will be used by the upcoming SR code to add/delete
Adj-SIDs depending on the IP addresses present in the remote
adjacencies.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agolib: constify a few parameters of helper functions
Renato Westphal [Wed, 7 Aug 2019 23:00:58 +0000 (20:00 -0300)]
lib: constify a few parameters of helper functions

Parameters should be const whenever possible to improve code
readability and remove the need to cast away the constness of
const arguments.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoMerge pull request #6241 from volta-networks/fix_ldp_acl
Renato Westphal [Thu, 30 Apr 2020 01:44:25 +0000 (22:44 -0300)]
Merge pull request #6241 from volta-networks/fix_ldp_acl

ldpd: fix ACL rule modification

5 years agoMerge pull request #6314 from pjdruddy/fix-arp-cache-vtep-json-cli
Sri Mohana Singamsetty [Wed, 29 Apr 2020 16:31:22 +0000 (09:31 -0700)]
Merge pull request #6314 from pjdruddy/fix-arp-cache-vtep-json-cli

zebra: fix json for show evpn arp-cache vni vtep

5 years agoMerge pull request #5786 from mjstapp/fix_notif_empty_nhg
Stephen Worley [Wed, 29 Apr 2020 16:28:56 +0000 (12:28 -0400)]
Merge pull request #5786 from mjstapp/fix_notif_empty_nhg

zebra: fix handling of failed route install via notification

5 years agoldpd: fix ACL rule modification
lynne [Wed, 15 Apr 2020 17:49:41 +0000 (13:49 -0400)]
ldpd: fix ACL rule modification

Changes to ACL rules were not applied to LDP.  This fix allows
LDP to be notified when a rule in an ACL filter is modified by
the user. The filter is properly applied to the LDP session.
The filter may cause a LDP session to go down/up or to remove/add
labels being advertised/received from a neighbor.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Signed-off-by: Karen Schoener <karen@voltanet.io>
5 years agoMerge pull request #6309 from dslicenc/ra-retrans-interval
Russ White [Wed, 29 Apr 2020 15:10:33 +0000 (11:10 -0400)]
Merge pull request #6309 from dslicenc/ra-retrans-interval

zebra: add ability to set retransmit timer for IPv6 RAs

5 years agoMerge pull request #6303 from dslicenc/stop-enhe-ras
Russ White [Wed, 29 Apr 2020 15:09:58 +0000 (11:09 -0400)]
Merge pull request #6303 from dslicenc/stop-enhe-ras

bgpd: turn off RAs when numbered peers are deleted

5 years agoMerge pull request #6313 from volta-networks/fix_zebra_pw_nht
Donald Sharp [Wed, 29 Apr 2020 14:22:04 +0000 (10:22 -0400)]
Merge pull request #6313 from volta-networks/fix_zebra_pw_nht

zebra: fix zebra pseudowire manager NHT

5 years agoMerge pull request #6299 from ton31337/fix/access-list_deletion
Donald Sharp [Wed, 29 Apr 2020 12:31:31 +0000 (08:31 -0400)]
Merge pull request #6299 from ton31337/fix/access-list_deletion

lib: Delete the entire access-list only if there are no more entries

5 years agozebra: fix json for show evpn arp-cache vni vtep
Pat Ruddy [Wed, 29 Apr 2020 11:22:14 +0000 (12:22 +0100)]
zebra: fix json for show evpn arp-cache vni vtep

The function zebra_vxlan_print_neigh_vni_vtep does not create
a json object when json has been requested from the CLI and as a
result it prints out the information in normal CLI format.
Fix is to allocate the json object when required.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
5 years agodoc: Documentation for ipv6 nd ra-retrans-timer command
Don Slice [Wed, 22 Apr 2020 11:55:10 +0000 (11:55 +0000)]
doc: Documentation for ipv6 nd ra-retrans-timer command

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agozebra: add ability to set retransmit timer for IPv6 RAs
Don Slice [Tue, 28 Apr 2020 11:54:14 +0000 (11:54 +0000)]
zebra: add ability to set retransmit timer for IPv6 RAs

Reported by testing agency that rfc 4861 section 6.2.1 states
that all implementations must have a configuration knob to change
the setting of the advertised retransmit timer sent in RA packets.
This fix adds that capability.

Ticket: CM-29199
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agoMerge pull request #6228 from donaldsharp/change_network_statement_default
David Lamparter [Wed, 29 Apr 2020 07:02:42 +0000 (09:02 +0200)]
Merge pull request #6228 from donaldsharp/change_network_statement_default

5 years agoMerge pull request #6310 from donaldsharp/revert_the_behavior
Sri Mohana Singamsetty [Tue, 28 Apr 2020 22:41:47 +0000 (15:41 -0700)]
Merge pull request #6310 from donaldsharp/revert_the_behavior

Revert "vtysh: fix searching commands in parent nodes"

5 years agodoc: Update doc for the `bgp network import-check` command
Donald Sharp [Wed, 15 Apr 2020 12:31:27 +0000 (08:31 -0400)]
doc: Update doc for the `bgp network import-check` command

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd,tests: Modify import-check to require underlying prefixes to exist
Donald Sharp [Wed, 15 Apr 2020 12:21:11 +0000 (08:21 -0400)]
bgpd,tests: Modify import-check to require underlying prefixes to exist

Modify the import-check command to require the underlying prefix
to exist in the rib.  General consensus is that this is the correct
behavior.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #6302 from volta-networks/fix_ldpd_af_reload
Donald Sharp [Tue, 28 Apr 2020 19:05:57 +0000 (15:05 -0400)]
Merge pull request #6302 from volta-networks/fix_ldpd_af_reload

tools: fix frr-reload AF issue with ldpd

5 years agozebra: fix zebra pseudowire manager NHT
Karen Schoener [Mon, 27 Apr 2020 18:31:50 +0000 (14:31 -0400)]
zebra: fix zebra pseudowire manager NHT

Intermittently, there is a 30 second delay for a LDP pseudowire to become
operational.

One way to reproduce the issue is: Once PW is up, shutdown link to trigger
a change to the pseudowire's next hop, and then restore link to cause
pseudowire to return to original NH.

Problem Descripton:
    The Zebra PW manager installs pseudowires in the data plane when the
    following two conditions are met:
        1. Pseudowire is labeled via LDP mapping messages
        2. A labeled NH route exists to reach the remote pseudowire endpoint

    The Zebra PW manager registers a NHT callback when a pseudowire is enabled.
    This allows the Zebra PW manager to install or reinstall the pseudowire.

    The Zebra PW manager deregisters for the NHT callback when the pseudowire is
    disabled.  When LDP learns the remote-pseudowire status is 'not forwarding',
    LDP notifies Zebra that the pseudowire is disabled.

    This creates a race condition where a new labeled NH can be resolved after the
    Zebra PW manager deregistered for the NHT callback.

    For static pseudowires, it makes sense for Zebra PW manager to deregister for
    NHT callbacks for disabled pseudowires.  Static pseudowires become disabled
    via CLI configuration commands.

    For LDP pseudowires, the Zebra PW manager should not deregister for NHT
    callbacks for disabled pseudowires.

Overview of changes:
    1. Zebra PW manager should not deregister for NHT callbacks when an LDP
       pseudowire is disabled.
       Zebra PW manager will register for NHT callbacks when the LDP pseudowire
       is first enabled.
       Zebra PW manager will deregister for NHT callbacks when the LDP
       pseudowire is deleted.
    2. Remove the 30 second timer that was added in PR4122.
       PR4122 tried to fix this race condition with a timer.
       Once we eliminate the race condition (by keeping the Zebra PW manager
       registered for NHT callbacks), this timer can be removed.
    3. Zebra PW manager handling of static pseudowires will remain as-is.
       Zebra PW manager will register for NHT callbacks when the static
       pseudowire is enabled.
       Zebra PW manager will deregister for NHT callbacks when the static
       pseudowire is disabled.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Signed-off-by: Karen Schoener <karen@voltanet.io>
5 years agoMerge pull request #6295 from ton31337/feature/show_bgp_afi_safi_sntpfx
Lou Berger [Tue, 28 Apr 2020 15:34:13 +0000 (11:34 -0400)]
Merge pull request #6295 from ton31337/feature/show_bgp_afi_safi_sntpfx

bgpd: Show PfxSnt for `show bgp <afi> <safi>` command

5 years agoMerge pull request #6308 from donaldsharp/pim_ordering
David Lamparter [Tue, 28 Apr 2020 15:14:28 +0000 (17:14 +0200)]
Merge pull request #6308 from donaldsharp/pim_ordering

5 years agoRevert "vtysh: fix searching commands in parent nodes"
Donald Sharp [Tue, 28 Apr 2020 14:46:22 +0000 (10:46 -0400)]
Revert "vtysh: fix searching commands in parent nodes"

This reverts commit d741915ecdcf8930ccb3bd23eec1da2f0d000483.

This is because it breaks this behavior:

router ospf6
  <commands>
!
int enp39s0
  <more commands>
!

This is a very legal set of commands and completely destroys the
ability to do this.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #6306 from opensourcerouting/triple-wtf-20200428
Donald Sharp [Tue, 28 Apr 2020 12:00:28 +0000 (08:00 -0400)]
Merge pull request #6306 from opensourcerouting/triple-wtf-20200428

*: triple pack of one-liner WTF fixes

5 years agopimd: Add a needed space for formatting
Donald Sharp [Tue, 28 Apr 2020 11:59:18 +0000 (07:59 -0400)]
pimd: Add a needed space for formatting

Display a space in the output.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: don't split format string from zlog call
David Lamparter [Tue, 28 Apr 2020 09:09:26 +0000 (11:09 +0200)]
pimd: don't split format string from zlog call

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agotests: fix size confusion
David Lamparter [Thu, 23 Apr 2020 21:54:05 +0000 (23:54 +0200)]
tests: fix size confusion

The question here isn't "why does it break on PowerPC?", but rather "why
doesn't it break on x86_64 or ARM?"

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agobgpd: fix typo
David Lamparter [Tue, 28 Apr 2020 09:07:01 +0000 (11:07 +0200)]
bgpd: fix typo

o.O

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agoMerge pull request #6301 from pguibert6WIND/bfd_debug_show
Rafael Zalamena [Mon, 27 Apr 2020 18:12:07 +0000 (15:12 -0300)]
Merge pull request #6301 from pguibert6WIND/bfd_debug_show

bfdd: display debugging status of bfd

5 years agobgpd: turn off RAs when numbered peers are deleted
Don Slice [Tue, 21 Apr 2020 19:01:35 +0000 (19:01 +0000)]
bgpd: turn off RAs when numbered peers are deleted

Problem reported that in many circumstances, RAs created in the
process of bringing up numbered IPv6 peers with extended-nexthop
capability enabled (for ipv4 over ipv6) were not stopped on the
interface when those peers were deleted.  Found several circumstances
where this occurred and fix them in this patch.

Ticket: CM-26875
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agobfdd: display debugging status of bfd
Philippe Guibert [Mon, 27 Apr 2020 15:21:45 +0000 (17:21 +0200)]
bfdd: display debugging status of bfd

display debugging status of bfd.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agotools: fix frr-reload AF issue with ldpd
Emanuele Di Pascale [Mon, 27 Apr 2020 13:47:03 +0000 (15:47 +0200)]
tools: fix frr-reload AF issue with ldpd

when removing a whole address-family block from ldpd config
we were erroneously trying to also remove each of the interface
sub-sub-contexts that belonged to it; this would effectively
re-enable the AF we just removed. Work around this by ignoring
these sub-sub-contexts if we detect that we are already
removing the parent block.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
5 years agozebra: fix handling of failed route install via notification
Mark Stapp [Mon, 10 Feb 2020 18:12:58 +0000 (13:12 -0500)]
zebra: fix handling of failed route install via notification

An async route notification can indicate that installation
has failed, but the handling code wasn't dealing with that
possibility correctly.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #6298 from opensourcerouting/build-assorted-20200423
Donald Sharp [Mon, 27 Apr 2020 13:06:19 +0000 (09:06 -0400)]
Merge pull request #6298 from opensourcerouting/build-assorted-20200423

build: spring cleaning

5 years agolib: Delete the entire access-list only if there are no more entries
Donatas Abraitis [Mon, 27 Apr 2020 09:13:48 +0000 (12:13 +0300)]
lib: Delete the entire access-list only if there are no more entries

When you enter the access-list with the same sequence number but with a
different prefix AND access-list has only a single entry, then the entry
is deleted and the whole access-list is deleted.

That means that "replace entry" never be re-inserted.

With fix:
```
~# vtysh -c 'c' -c 'access-list 1 seq 10 permit 127.0.0.10/32'
~# vtysh -c 'sh run' | grep access-list
access-list 1 seq 10 permit 127.0.0.10/32
~# vtysh -c 'c' -c 'access-list 1 seq 10 permit 127.0.0.20/32'
~# vtysh -c 'sh run' | grep access-list
access-list 1 seq 10 permit 127.0.0.20/32
~# vtysh -c 'c' -c 'access-list 1 seq 11 permit 127.0.0.11/32'
~# vtysh -c 'sh run' | grep access-list
access-list 1 seq 10 permit 127.0.0.20/32
access-list 1 seq 11 permit 127.0.0.11/32
~# vtysh -c 'c' -c 'no access-list 1 seq 10 permit 127.0.0.20/32'
~# vtysh -c 'sh run' | grep access-list
access-list 1 seq 11 permit 127.0.0.11/32
~#
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agolib: Convert access_list_empty to bool
Donatas Abraitis [Mon, 27 Apr 2020 09:13:04 +0000 (12:13 +0300)]
lib: Convert access_list_empty to bool

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agobuild: silence idiotic libtool warnings
David Lamparter [Wed, 15 Apr 2020 14:03:42 +0000 (16:03 +0200)]
build: silence idiotic libtool warnings

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agobuild: move python 2.x to the very last preference
David Lamparter [Thu, 23 Apr 2020 18:41:04 +0000 (20:41 +0200)]
build: move python 2.x to the very last preference

Also try explicit 3.9 & 3.10.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agobfdd: fix frr-format false warning
David Lamparter [Thu, 23 Apr 2020 18:34:16 +0000 (20:34 +0200)]
bfdd: fix frr-format false warning

Dealing with PRIu64 is unfortunately a bit hacky in the frr-format
plugin, as in, it works correctly with snprintfrr, but breaks on plain
snprintf.  There's no good solution unfortunately :/.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agolib/zlog: fix printfrr format attribute
David Lamparter [Thu, 23 Apr 2020 18:17:18 +0000 (20:17 +0200)]
lib/zlog: fix printfrr format attribute

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years ago*: fix first header
David Lamparter [Thu, 23 Apr 2020 18:16:37 +0000 (20:16 +0200)]
*: fix first header

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agopython: add check-first-header tool
David Lamparter [Thu, 23 Apr 2020 18:14:58 +0000 (20:14 +0200)]
python: add check-first-header tool

The first #include statement in all FRR .c files should be either
zebra.h or config.h.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agobuild: make clippy Makefile rules nicer
David Lamparter [Wed, 15 Apr 2020 08:27:49 +0000 (10:27 +0200)]
build: make clippy Makefile rules nicer

These are easy to get subtly wrong, and doing so can cause
nondeterministic failures when racing in parallel builds.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agotools/symalyzer: fix copypasta
David Lamparter [Thu, 23 Apr 2020 18:01:23 +0000 (20:01 +0200)]
tools/symalyzer: fix copypasta

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agopython: move MakeVars class into separate module
David Lamparter [Thu, 23 Apr 2020 18:01:14 +0000 (20:01 +0200)]
python: move MakeVars class into separate module

... so I can reuse it.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agobuild: use VPATH for vtysh_scan
David Lamparter [Wed, 15 Apr 2020 08:45:08 +0000 (10:45 +0200)]
build: use VPATH for vtysh_scan

No need to put $(top_srcdir) everywhere.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agoMerge pull request #6249 from chiragshah6/yang_nb5
Rafael Zalamena [Fri, 24 Apr 2020 13:17:55 +0000 (10:17 -0300)]
Merge pull request #6249 from chiragshah6/yang_nb5

lib: yang wrapper for date-and-time

5 years agotests: Adopt some tests to PfxSnt counter
Donatas Abraitis [Thu, 23 Apr 2020 08:49:22 +0000 (11:49 +0300)]
tests: Adopt some tests to PfxSnt counter

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agobgpd: Show PfxSnt for `show bgp <afi> <safi>` command
Donatas Abraitis [Wed, 22 Apr 2020 20:39:13 +0000 (23:39 +0300)]
bgpd: Show PfxSnt for `show bgp <afi> <safi>` command

JSON output was already in, just printing in CLI as well.

```
root@exit1-debian-9:~# vtysh -c 'show bgp ipv4 summary'

IPv4 Unicast Summary:
BGP router identifier 10.10.10.1, local AS number 65001 vrf-id 0
BGP table version 100003
RIB entries 200005, using 37 MiB of memory
Peers 1, using 21 KiB of memory

... MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt
...      64       157        0    0    0 00:01:18            0   100003

Total number of neighbors 1
```

JSON:

```
root@exit1-debian-9:~# vtysh -c 'show bgp ipv4 summary json' \ |
> jq '.ipv4Unicast.peers."192.168.0.2".pfxSnt'
100003
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agoMerge pull request #6279 from opensourcerouting/nb-cb-args
Donald Sharp [Fri, 24 Apr 2020 12:09:16 +0000 (08:09 -0400)]
Merge pull request #6279 from opensourcerouting/nb-cb-args

*: change the signature of the northbound callbacks to be  more flexible

5 years agoMerge pull request #6282 from opensourcerouting/fix-isisd-sh-run
Donald Sharp [Fri, 24 Apr 2020 12:07:57 +0000 (08:07 -0400)]
Merge pull request #6282 from opensourcerouting/fix-isisd-sh-run

isisd: fix display of "isis bfd" in the running configuration

5 years agoMerge pull request #6292 from ton31337/fix/revert_6277
Donald Sharp [Fri, 24 Apr 2020 12:05:09 +0000 (08:05 -0400)]
Merge pull request #6292 from ton31337/fix/revert_6277

Revert "bgpd: Show PfxSnt for `show bgp <afi> <safi>` command"

5 years agoMerge pull request #6274 from mjstapp/fix_lde_blocking_sleep
Olivier Dugeon [Fri, 24 Apr 2020 07:34:27 +0000 (09:34 +0200)]
Merge pull request #6274 from mjstapp/fix_lde_blocking_sleep

ldpd: use a timer instead of sleeping in LM init

5 years agoRevert "tests: Adopt some tests to PfxSnt counter"
Donatas Abraitis [Fri, 24 Apr 2020 07:00:17 +0000 (10:00 +0300)]
Revert "tests: Adopt some tests to PfxSnt counter"

This reverts commit 6e0f90413ef43a154d84ff62bd04eb49366683a0.

5 years agoRevert "bgpd: Show PfxSnt for `show bgp <afi> <safi>` command"
Donatas Abraitis [Fri, 24 Apr 2020 07:00:13 +0000 (10:00 +0300)]
Revert "bgpd: Show PfxSnt for `show bgp <afi> <safi>` command"

This reverts commit 776e7cf5ce9cc0a55a48beb432faacf7ce7c97f9.

5 years agoMerge pull request #6277 from ton31337/feature/show_bgp_afi_safi_sndpfx
Sri Mohana Singamsetty [Fri, 24 Apr 2020 03:20:07 +0000 (20:20 -0700)]
Merge pull request #6277 from ton31337/feature/show_bgp_afi_safi_sndpfx

bgpd: Show PfxSnt for `show bgp <afi> <safi>` command

5 years agoMerge pull request #6262 from qlyoung/remove-sprintf
David Lamparter [Thu, 23 Apr 2020 18:27:26 +0000 (20:27 +0200)]
Merge pull request #6262 from qlyoung/remove-sprintf

5 years agoisisd: fix display of "isis bfd" in the running configuration
Renato Westphal [Thu, 23 Apr 2020 14:49:01 +0000 (11:49 -0300)]
isisd: fix display of "isis bfd" in the running configuration

Since this command is modeled using YANG, it's already displayed
as part of the call to nb_cli_show_dnode_cmds(). Calling the
'isis_circuit_config_write' hook was only making that command
to be displayed twice.

The aforementioned hook is still necessary for fabricd, which wasn't
converted to the new northbound model yet.

Fixes #6281.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoMerge pull request #6184 from kssoman/route
Stephen Worley [Thu, 23 Apr 2020 15:10:59 +0000 (11:10 -0400)]
Merge pull request #6184 from kssoman/route

bgpd: When static default route is present in RIB and advertised to p…

5 years agoldpd: use a timer instead of sleeping in LM init
Mark Stapp [Wed, 22 Apr 2020 15:39:50 +0000 (11:39 -0400)]
ldpd: use a timer instead of sleeping in LM init

Stop sleeping if synchronous label-manager zapi session
has trouble during init: retry using a timer instead. Move
initial label-block request to a point where the LM zapi
session is known to be running. Remove the use of the
daemon 'instance' - we're using the session_id to distinguish
the LM zapi session.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years ago*: change the signature of the northbound callbacks to be more flexible
Renato Westphal [Sat, 4 Apr 2020 16:38:51 +0000 (13:38 -0300)]
*: change the signature of the northbound callbacks to be more flexible

Having a fixed set of parameters for each northbound callback isn't a
good idea since it makes it difficult to add new parameters whenever
that becomes necessary, as several hundreds or thousands of existing
callbacks need to be updated accordingly.

To remediate this issue, this commit changes the signature of all
northbound callbacks to have a single parameter: a pointer to a
'nb_cb_x_args' structure (where x is different for each type
of callback). These structures encapsulate all real parameters
(both input and output) the callbacks need to have access to. And
adding a new parameter to a given callback is as simple as adding
a new field to the corresponding 'nb_cb_x_args' structure, without
needing to update any instance of that callback in any daemon.

This commit includes a .cocci semantic patch that can be used to
update old code to the new format automatically.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoMerge pull request #6278 from opensourcerouting/cpp-extern-blocks
Donald Sharp [Thu, 23 Apr 2020 12:01:00 +0000 (08:01 -0400)]
Merge pull request #6278 from opensourcerouting/cpp-extern-blocks

lib, zebra: add missing extern "C" {} blocks to new header files

5 years agotests: Adopt some tests to PfxSnt counter
Donatas Abraitis [Thu, 23 Apr 2020 08:49:22 +0000 (11:49 +0300)]
tests: Adopt some tests to PfxSnt counter

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agobgpd: Show PfxSnt for `show bgp <afi> <safi>` command
Donatas Abraitis [Wed, 22 Apr 2020 20:39:13 +0000 (23:39 +0300)]
bgpd: Show PfxSnt for `show bgp <afi> <safi>` command

JSON output was already in, just printing in CLI as well.

```
root@exit1-debian-9:~# vtysh -c 'show bgp ipv4 summary'

IPv4 Unicast Summary:
BGP router identifier 10.10.10.1, local AS number 65001 vrf-id 0
BGP table version 100003
RIB entries 200005, using 37 MiB of memory
Peers 1, using 21 KiB of memory

... MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt
...      64       157        0    0    0 00:01:18            0   100003

Total number of neighbors 1
```

JSON:

```
root@exit1-debian-9:~# vtysh -c 'show bgp ipv4 summary json' \ |
> jq '.ipv4Unicast.peers."192.168.0.2".pfxSnt'
100003
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agoMerge pull request #6025 from patrasar/rp-info-igmp-group-json-fix
Donatas Abraitis [Thu, 23 Apr 2020 08:05:06 +0000 (11:05 +0300)]
Merge pull request #6025 from patrasar/rp-info-igmp-group-json-fix

pimd: Modified rp-info json o/p

5 years agolib: create a wrapper function for all northbound callbacks
Renato Westphal [Wed, 22 Apr 2020 00:27:47 +0000 (21:27 -0300)]
lib: create a wrapper function for all northbound callbacks

The intention here is to keep the code more organized. These wrappers
should be used by the northbound clients only, and never directly
by any YANG backend code.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoMerge pull request #6275 from donaldsharp/fix_frr
Lou Berger [Thu, 23 Apr 2020 03:49:41 +0000 (23:49 -0400)]
Merge pull request #6275 from donaldsharp/fix_frr

yang: Convert to `FRRouting` for organization

5 years agolib, zebra: add missing extern "C" {} blocks to new header files
Renato Westphal [Mon, 20 Apr 2020 23:53:19 +0000 (20:53 -0300)]
lib, zebra: add missing extern "C" {} blocks to new header files

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobgpd: Configuring default-originate withdraws default route
Soman K S [Wed, 8 Apr 2020 09:34:10 +0000 (15:04 +0530)]
bgpd: Configuring default-originate withdraws default route

Issue:
Configuring default-originate when static default route is previously
advertised results in withdrawal of the route.

Fix :
Delete the adj-out entry for the previously advertised static
default route without sending explicit withdraw message.

Signed-off-by: kssoman <somanks@gmail.com>
5 years agoMerge pull request #6242 from pguibert6WIND/flowspec_nlri_too_big
Quentin Young [Wed, 22 Apr 2020 17:02:50 +0000 (13:02 -0400)]
Merge pull request #6242 from pguibert6WIND/flowspec_nlri_too_big

bgpd: handle fs nlri over 240 bytes

5 years agoMerge pull request #6272 from opensourcerouting/duplicated-fpm-doc
Quentin Young [Wed, 22 Apr 2020 17:01:47 +0000 (13:01 -0400)]
Merge pull request #6272 from opensourcerouting/duplicated-fpm-doc

doc: remove duplicated command documentation

5 years agoyang: Convert to `FRRouting` for organization
Donald Sharp [Wed, 22 Apr 2020 16:45:37 +0000 (12:45 -0400)]
yang: Convert to `FRRouting` for organization

We should be using `FRRouting` as our organization.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #6265 from patrasar/pim-yang
Quentin Young [Wed, 22 Apr 2020 16:43:02 +0000 (12:43 -0400)]
Merge pull request #6265 from patrasar/pim-yang

yang: Defining yang files for pim

5 years agoyang: Defining yang files for pim
Sarita Patra [Tue, 21 Apr 2020 11:55:18 +0000 (04:55 -0700)]
yang: Defining yang files for pim

Signed-off-by: Sarita Patra <saritap@vmware.com>
5 years agolib: yang wrapper for date-and-time
Chirag Shah [Thu, 9 Apr 2020 17:28:43 +0000 (10:28 -0700)]
lib: yang wrapper for date-and-time

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agoMerge pull request #5944 from donaldsharp/vrf_stoppage
Russ White [Wed, 22 Apr 2020 15:35:53 +0000 (11:35 -0400)]
Merge pull request #5944 from donaldsharp/vrf_stoppage

Vrf stoppage

5 years agopimd: Added a new field "rpAddress" in "show ip pim rp-info json
Sarita Patra [Tue, 14 Apr 2020 11:24:15 +0000 (04:24 -0700)]
pimd: Added a new field "rpAddress" in "show ip pim rp-info json

Fix: Added a new field "rpAddress" in "show ip pim rp-info json"
Before:
"40.0.0.2":[
    {
      "outboundInterface":"ens224",
      "group":"224.0.0.0\/4",
      "source":"Static"
    }
After:
"40.0.0.2":[
    {
      "rpAddress":"40.0.0.2",
      "outboundInterface":"ens224",
      "group":"224.0.0.0\/4",
      "source":"Static"
    }

Signed-off-by: Sarita Patra <saritap@vmware.com>
5 years agozebra: Prevent awful misconfiguration in vrf's
Donald Sharp [Mon, 9 Mar 2020 13:50:18 +0000 (09:50 -0400)]
zebra: Prevent awful misconfiguration in vrf's

Currently the linux kernel allows you to specify the same
table id -> multiple vrf's.  While I am arguing with
the kernel people about proper behavior here let's
just remove this as a possiblity from happening and
mark it a zebra stopable misconfiguration.

(Effectively we are preventing a crash down the line
as that all over FRR we assume it's a unique
mapping not a many to one).

Why fail hard?  Because we hope to get the person
who misconfigured it to actually notice immediately
not hours or days down the line when shit hits the fan.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Expose vrf lookup by table id out of rt_netlink.c
Donald Sharp [Mon, 9 Mar 2020 13:47:46 +0000 (09:47 -0400)]
zebra: Expose vrf lookup by table id out of rt_netlink.c

The function rt_netlink.c is using to lookup the vrf by
passed in table id.

I'm also going to pretend that this function is not
so awful to run when we have a large number of routes
incoming.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agodoc: improve FPM clear command doc
Rafael Zalamena [Wed, 22 Apr 2020 13:46:18 +0000 (10:46 -0300)]
doc: improve FPM clear command doc

Use the old description as it looks more complete than the current.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agodoc: remove duplicated command documentation
Rafael Zalamena [Wed, 22 Apr 2020 13:32:06 +0000 (10:32 -0300)]
doc: remove duplicated command documentation

Fixes a documentation warning during compilation.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agoMerge pull request #6269 from donaldsharp/coverity_likes_coverity
Donatas Abraitis [Wed, 22 Apr 2020 13:16:57 +0000 (16:16 +0300)]
Merge pull request #6269 from donaldsharp/coverity_likes_coverity

Coverity likes coverity

5 years agoospfd: Limit possible message read to our buffer size
Donald Sharp [Tue, 21 Apr 2020 12:09:58 +0000 (08:09 -0400)]
ospfd: Limit possible message read to our buffer size

It's possible(but unlikely) that a read of data from the
network will give us bogus data.  Don't automatically
just trust the data size from the network and limit
the read to the size of the buffer we have in play.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Cleanup dead code
Donald Sharp [Tue, 21 Apr 2020 11:50:27 +0000 (07:50 -0400)]
zebra: Cleanup dead code

There are a couple of switch statements in netlink_route_info_encode
in zebra_fpm_netlink.c that had logically dead code.  We have
a switch statement let's take actual advantage of it instead
of doing gyrations to what we want.

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