]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
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 #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 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 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>
3 years agoMerge pull request #7660 from rampxxxx/master
Donald Sharp [Thu, 3 Dec 2020 13:29:02 +0000 (08:29 -0500)]
Merge pull request #7660 from rampxxxx/master

doc: add building steps for openSUSE

3 years agodoc: add building steps for openSUSE
Javier Garcia [Thu, 3 Dec 2020 10:59:01 +0000 (11:59 +0100)]
doc: add building steps for openSUSE

Signed-off-by: Javier Garcia <rampxxxx@gmail.com>
3 years agoMerge pull request #7349 from opensourcerouting/bgp-delayopen
Donatas Abraitis [Thu, 3 Dec 2020 06:26:44 +0000 (08:26 +0200)]
Merge pull request #7349 from opensourcerouting/bgp-delayopen

bgpd: RFC 4271 optional session attribute DelayOpenTimer

3 years agoMerge pull request #7638 from donaldsharp/reduce_warn
Donatas Abraitis [Thu, 3 Dec 2020 06:17:59 +0000 (08:17 +0200)]
Merge pull request #7638 from donaldsharp/reduce_warn

zebra: Reduce warn -> debug

3 years agoMerge pull request #6950 from opensourcerouting/bfd-distributed-v3
Donald Sharp [Thu, 3 Dec 2020 01:50:47 +0000 (20:50 -0500)]
Merge pull request #6950 from opensourcerouting/bfd-distributed-v3

bfdd: distributed BFD

3 years agoMerge pull request #7590 from opensourcerouting/isisd-lfa
Donald Sharp [Thu, 3 Dec 2020 01:43:51 +0000 (20:43 -0500)]
Merge pull request #7590 from opensourcerouting/isisd-lfa

isisd: add support for classic LFA

3 years agoMerge pull request #7657 from mjstapp/fix_topo_asan_noise
Donald Sharp [Thu, 3 Dec 2020 01:07:53 +0000 (20:07 -0500)]
Merge pull request #7657 from mjstapp/fix_topo_asan_noise

tests: Cleanup topo asan noise

3 years agoMerge pull request #7625 from donaldsharp/pointtomultipoint
Russ White [Wed, 2 Dec 2020 18:07:28 +0000 (13:07 -0500)]
Merge pull request #7625 from donaldsharp/pointtomultipoint

Pointtomultipoint

3 years agoMerge pull request #7596 from gpnaveen/ospf_basic
Donald Sharp [Wed, 2 Dec 2020 17:35:43 +0000 (12:35 -0500)]
Merge pull request #7596 from gpnaveen/ospf_basic

tests : Adding 3 base ospf testcases.

3 years agoMerge pull request #7589 from pguibert6WIND/show_bgp_summary_desc
Donald Sharp [Wed, 2 Dec 2020 17:18:07 +0000 (12:18 -0500)]
Merge pull request #7589 from pguibert6WIND/show_bgp_summary_desc

Show bgp summary desc

3 years agoospfd: fix cosmetic show ip ospf when NSSA
ckishimo [Tue, 24 Nov 2020 14:53:22 +0000 (06:53 -0800)]
ospfd: fix cosmetic show ip ospf when NSSA

When executing the following command to change the NSSA translator role
from OSPF_NSSA_ROLE_ALWAYS to OSPF_NSSA_ROLE_NEVER
r2(config-router)# area 1 nssa translate-never

During the time the `ospf_abr_nssa_check_status()` function is not executed,
we are in a situation where the role is OSPF_NSSA_ROLE_NEVER (just configured)
but the NSSATranslatorState is still ENABLED

During this time the output of "show ip ospf" displays the following:

r2# show ip ospf
 Area ID: 0.0.0.1 (NSSA)
   Shortcutting mode: Default, S-bit consensus: no
   Number of interfaces in this area: Total: 1, Active: 1
   It is an NSSA configuration.
   Elected NSSA/ABR performs type-7/type-5 LSA translation.
   We are an ABR and    Number of fully adjacent neighbors in this area: 1 (**)

Basically the case TranslatorState=ENABLED && TranslatorRole=ROLE_NEVER is not
covered in `ospf_vty.c`

This PR adds the case TranslatorState=ENABLED and TranslatorRole=ROLE_NEVER
which should only happen for a small period of time

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
3 years agoMerge pull request #7572 from idryzhov/ospf6-cleanup
Donald Sharp [Wed, 2 Dec 2020 16:10:48 +0000 (11:10 -0500)]
Merge pull request #7572 from idryzhov/ospf6-cleanup

ospf6 code cleanup

3 years agotests: quiet noisy error log about asan files
Mark Stapp [Wed, 2 Dec 2020 16:08:38 +0000 (11:08 -0500)]
tests: quiet noisy error log about asan files

Turn a noisy error log into a debug - it's just reporting
that we're _looking_ for asan output.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agotests: fix typo in asan variable names
Mark Stapp [Wed, 2 Dec 2020 16:08:03 +0000 (11:08 -0500)]
tests: fix typo in asan variable names

Use AddressSanitizer consistently

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #7648 from donaldsharp/store_curr_mtu
Russ White [Wed, 2 Dec 2020 15:25:42 +0000 (10:25 -0500)]
Merge pull request #7648 from donaldsharp/store_curr_mtu

ospfd: Set Curr_mtu to when we get the mtu

3 years agoMerge pull request #7612 from deastoe/ospf-vlink-auth-cfg
Donald Sharp [Wed, 2 Dec 2020 14:27:16 +0000 (09:27 -0500)]
Merge pull request #7612 from deastoe/ospf-vlink-auth-cfg

ospfd: vlink auth type not shown in running config

3 years agoMerge pull request #7615 from gromit1811/feature_topotest_module_noload
Donald Sharp [Wed, 2 Dec 2020 14:23:30 +0000 (09:23 -0500)]
Merge pull request #7615 from gromit1811/feature_topotest_module_noload

tests: Add TOPOTEST_NOLOAD to skip module loading question

3 years agoMerge pull request #7644 from mjstapp/dplane_cleaner
Donald Sharp [Wed, 2 Dec 2020 14:01:44 +0000 (09:01 -0500)]
Merge pull request #7644 from mjstapp/dplane_cleaner

zebra: add an api to process/clean the pending dplane queue

3 years agoMerge pull request #7646 from volta-networks/fix_show_route_summary
Donald Sharp [Wed, 2 Dec 2020 13:59:54 +0000 (08:59 -0500)]
Merge pull request #7646 from volta-networks/fix_show_route_summary

zebra: fix show ip route vrf X summary

3 years agotests: Wait for convergence first
Donald Sharp [Wed, 2 Dec 2020 12:26:33 +0000 (07:26 -0500)]
tests: Wait for convergence first

The test_bgp_multi_vrf_topo2.py script had a bunch
of places where it would change an interface status
or add delete routes that would affect bgp convergence
but it was never ensuring that convergence had happened
before the test verified the bgp rib.  I believe this
was leading to many intermittant ci failures in
testing for other PR's to be accepted.  Modify
the code to wait for bgp convergence if we just
made a change to the topology

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoospfd: Set Curr_mtu to when we get the mtu
Donald Sharp [Tue, 1 Dec 2020 20:37:03 +0000 (15:37 -0500)]
ospfd: Set Curr_mtu to when we get the mtu

Currently if you start ospfd, bring up neighbors and then issue
a tcpdump on a interface ospf is peering over, this causes the neighbor
relationship to be restarted:

root@spectrum301(mlx-4600c-01):mgmt:~# tcpdump -i vlan402
2020-11-13T21:25:38.059671+00:00 spectrum301 ospfd[29953]: AdjChg: Nbr 202.0.0.3(default) on vlan402:200.0.3.1: Full -> Deleted (KillNbr)
2020-11-13T21:25:38.065520+00:00 spectrum301 ospfd[29953]: ospfTrapNbrStateChange: trap sent: 200.0.3.2 now Deleted/DROther
2020-11-13T21:25:38.065922+00:00 spectrum301 ospfd[29953]: ospfTrapIfStateChange: trap sent: 200.0.3.1 now Down
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on vlan402, link-type EN10MB (Ethernet), capture size 262144 bytes
21:25:38.072330 IP 200.0.3.1 > igmp.mcast.net: igmp v3 report, 1 group record(s)
2020-11-13T21:25:38.080430+00:00 spectrum301 ospfd[29953]: ospfTrapIfStateChange: trap sent: 200.0.3.1 now Point-To-Point
2020-11-13T21:25:38.080654+00:00 spectrum301 ospfd[29953]: SPF Processing Time(usecs): 9734
2020-11-13T21:25:38.080829+00:00 spectrum301 ospfd[29953]:             SPF Time: 6422
2020-11-13T21:25:38.080991+00:00 spectrum301 ospfd[29953]:            InterArea: 1572
2020-11-13T21:25:38.081152+00:00 spectrum301 ospfd[29953]:                Prune: 67
2020-11-13T21:25:38.081329+00:00 spectrum301 ospfd[29953]:         RouteInstall: 1396
2020-11-13T21:25:38.081548+00:00 spectrum301 ospfd[29953]: Reason(s) for SPF: N, S, ABR, ASBR
21:25:38.092510 IP 200.0.3.1 > ospf-all.mcast.net: OSPFv2, Hello, length 44

This is happening because the curr_mtu is not being properly stored.  It was being set
on interface creation( but we have not actually read in the mtu part of the interface data, so
it is still 0 ).

Modify the code to store the curr_mtu at a point in interface creation *After* we have read
in interface data.

Ticket: CM-32276
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7647 from ton31337/feature/show_best_path_reason_in_show_bgp
Donald Sharp [Wed, 2 Dec 2020 11:52:30 +0000 (06:52 -0500)]
Merge pull request #7647 from ton31337/feature/show_best_path_reason_in_show_bgp

bgpd: Show best path reason in JSON output for `show bgp` command

3 years agoMerge pull request #7651 from idryzhov/ospf-init-instance
Donald Sharp [Wed, 2 Dec 2020 11:50:15 +0000 (06:50 -0500)]
Merge pull request #7651 from idryzhov/ospf-init-instance

ospf: fix instance initialization when using multi-instance mode

3 years agoospf: fix instance initialization when using multi-instance mode
Igor Ryzhov [Wed, 2 Dec 2020 00:36:10 +0000 (03:36 +0300)]
ospf: fix instance initialization when using multi-instance mode

OSPF instance initialization was moved from "router ospf" vty command to
ospf_get function some time ago but the same thing must be done in
ospf_get_instance function used when multi-instance mode is enabled.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #7645 from sworleys/NHG-IFP-Error2Log
Mark Stapp [Tue, 1 Dec 2020 22:17:59 +0000 (17:17 -0500)]
Merge pull request #7645 from sworleys/NHG-IFP-Error2Log

zebra: make a couple NHG errors debugs

3 years agoospfd: vlink auth type not shown in running config
Duncan Eastoe [Thu, 26 Nov 2020 17:34:09 +0000 (17:34 +0000)]
ospfd: vlink auth type not shown in running config

The following virtual-link configuration was not represented in the
running configuration:
  area <area> virtual-link <ip> authentication [null|message-digest]

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
3 years agoMerge pull request #7601 from patrasar/pim_fix
Donald Sharp [Tue, 1 Dec 2020 20:53:53 +0000 (15:53 -0500)]
Merge pull request #7601 from patrasar/pim_fix

Pim fix

3 years agobgpd: Show best path reason in JSON output for `show bgp` command
Donatas Abraitis [Tue, 1 Dec 2020 20:36:05 +0000 (22:36 +0200)]
bgpd: Show best path reason in JSON output for `show bgp` command

exit1-debian-9# show ip bgp json
{
 "vrfId": 0,
 "vrfName": "default",
 "tableVersion": 2,
 "routerId": "192.168.255.1",
 "defaultLocPrf": 100,
 "localAS": 65000,
 "routes": { "172.16.255.254/32": [
  {
    "valid":true,
    "bestpath":true,
    "selectionReason":"First path received",
    "pathFrom":"external",
    "prefix":"172.16.255.254",
    "prefixLen":32,
    "network":"172.16.255.254\/32",
    "metric":0,
    "weight":0,
    "peerId":"192.168.255.2",
    "path":"65001",
    "origin":"incomplete",
    "nexthops":[
      {
        "ip":"192.168.255.2",
        "hostname":"exit1-debian-9",
        "afi":"ipv4",
        "used":true
      }
    ]
  }
],"192.168.255.0/24": [
  {
    "valid":true,
    "bestpath":true,
    "selectionReason":"First path received",
    "pathFrom":"external",
    "prefix":"192.168.255.0",
    "prefixLen":24,
    "network":"192.168.255.0\/24",
    "metric":0,
    "weight":0,
    "peerId":"192.168.255.2",
    "path":"65001",
    "origin":"incomplete",
    "nexthops":[
      {
        "ip":"192.168.255.2",
        "hostname":"exit1-debian-9",
        "afi":"ipv4",
        "used":true
      }
    ]
  }
] }  }

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #7617 from deastoe/dplane-fpm-lsp
Rafael Zalamena [Tue, 1 Dec 2020 19:01:09 +0000 (16:01 -0300)]
Merge pull request #7617 from deastoe/dplane-fpm-lsp

zebra: dplane FPM LSP support

3 years agozebra: remove unused EC_ZEBRA_IF_LOOKUP_FAILED
Stephen Worley [Tue, 1 Dec 2020 18:05:36 +0000 (13:05 -0500)]
zebra: remove unused EC_ZEBRA_IF_LOOKUP_FAILED

EC_ZEBRA_IF_LOOKUP_FAILED is no longer being used,
remove it.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
3 years agozebra: debug logs to detect incorrect mac deletions
Anuradha Karuppiah [Tue, 26 May 2020 13:49:56 +0000 (06:49 -0700)]
zebra: debug logs to detect incorrect mac deletions

A MAC entry cannot be deleted while a neigh is referencing it. It seems
there is some race condition where this may be happening. The log is
to help identify those cases.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: change the L2 NHG id format to co-exist with the L3NHG ids
Anuradha Karuppiah [Fri, 15 May 2020 00:00:10 +0000 (17:00 -0700)]
zebra: change the L2 NHG id format to co-exist with the L3NHG ids

It is now 4bits of type and 28bits of value -
1. type=0 is for L3 NHG
2. type=1 is for L2 NH
3. type=2 is for L2 NHG

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: allocate one nexthop id per-VTEP instead of one per-ES-VTEP
Anuradha Karuppiah [Wed, 27 May 2020 01:42:00 +0000 (18:42 -0700)]
zebra: allocate one nexthop id per-VTEP instead of one per-ES-VTEP

This is an optimization to reduce the number of L2 nexthops. A
l2 or fdb nexthop simply provides the dataplane with a nexthop ip-
torm-12:mgmt:~# ip nexthop
id 268435461 via 27.0.0.20 scope link fdb
id 268435463 via 27.0.0.20 scope link fdb
id 268435465 via 27.0.0.20 scope link fdb

So there is no need to allocate a nexthop per-ES/per-VTEP. There
can be 100+ ESs per-VTEP so this change cuts the scale down by a
factor of 100.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: support for slow-failover of local MACs on an ES
Anuradha Karuppiah [Sat, 9 May 2020 01:47:52 +0000 (18:47 -0700)]
zebra: support for slow-failover of local MACs on an ES

When a local ES flaps there are two modes in which the local
MACs are failed over -
1. Fast failover - A backup NHG (ES-peer group) is programmed in the
dataplane per-access port. When a local ES flaps the MAC entries
are left unaltered i.e. pointing to the down access port. And the
dataplane redirects traffic destined to the oper-down access port
via the backup NHG.
2. Slow failover - This mode needs to be turned on to allow dataplanes
not capable of re-directing traffic. In this mode local MAC entries
on a down local ES are re-programmed to point to the ES-peers'
NHG. And vice-versa i.e. when the ES comes up the MAC entries
are re-programmed with the access port as dest.

Fast failover is on by default. Slow failover can be enabled via the
following config -
evpn mh redirect-off

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: on local mac add from the dplane a re-install maybe need as static
Anuradha Karuppiah [Mon, 8 Jun 2020 02:33:48 +0000 (19:33 -0700)]
zebra: on local mac add from the dplane a re-install maybe need as static

As a part of extended MM handing a MAC can be updated from local
to remote while being referenced by SYNC neighs (this is really a
temporary/small window). During this window if the MAC transitions
back to local again we need to re-inforce the previous SYNC flags
(based on the sync-neigh count) as subsequent SYNC updates to the
MAC will be de-duped and ignored.

Ticket: CM-29636

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: set inactive bit when zebra re-installs the MAC on dplane del
Anuradha Karuppiah [Sun, 7 Jun 2020 14:53:00 +0000 (07:53 -0700)]
zebra: set inactive bit when zebra re-installs the MAC on dplane del

When a local mac is deleted by the dataplane zebra can re-install it
if the MAC is a SYNC MAC (learned from ES peers). The "local_inactive"
bit must be set as a part of the re-install to prevent zebra turning
around and advertising the MAC as locally active.

Also fixed up some debug logs in the slow-fail path to include the VNI.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: skip NDA_DST attr if NHG is present
Anuradha Karuppiah [Tue, 27 Oct 2020 17:50:46 +0000 (10:50 -0700)]
zebra: skip NDA_DST attr if NHG is present

NHG and DST (VTEP-IP) are mutually exclusive attributes. If DST is
present the kernel ignores NHG.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: free up the L2 NHG bitmap as a part of shutdown
Anuradha Karuppiah [Sat, 9 May 2020 02:18:01 +0000 (19:18 -0700)]
zebra: free up the L2 NHG bitmap as a part of shutdown

Fix for a shutdown time memory leak found during review.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: remove FDB entries before de-activating a L2-NHG
Anuradha Karuppiah [Fri, 8 May 2020 23:28:15 +0000 (16:28 -0700)]
zebra: remove FDB entries before de-activating a L2-NHG

NHG is activated i.e. programmed in the dataplane only if there
are active-VTEPs associated with it. When a NHG is de-activated
all the remote-mac entries associated with it need to be removed
before the NHG is removed.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agoMerge pull request #7641 from rampxxxx/fix_run_folder
Donald Sharp [Tue, 1 Dec 2020 17:40:40 +0000 (12:40 -0500)]
Merge pull request #7641 from rampxxxx/fix_run_folder

Fix run folder permissions

3 years agoMerge pull request #7483 from AnuradhaKaruppiah/evpn-mh-dad
Patrick Ruddy [Tue, 1 Dec 2020 17:37:32 +0000 (17:37 +0000)]
Merge pull request #7483 from AnuradhaKaruppiah/evpn-mh-dad

bgpd, zebra: Keep DAD disabled if EVPN MH is turned on

3 years agozebra: fix show ip route vrf X summary
Emanuele Di Pascale [Tue, 1 Dec 2020 17:24:46 +0000 (18:24 +0100)]
zebra: fix show ip route vrf X summary

The lookup for non default VRFs was always using a tableId; if not
provided, we were defaulting to RT_TABLE_MAIN. This is fine for the
default VRF but not for others. As a result, the command was silently
failing for non-default VRFs unless we also specified the correct tableId.

Fix this by only performing the lookup using the tableId if it is
provided; else use zebra_vrf_table.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
3 years agoMerge pull request #7632 from idryzhov/vtysh-memory-fixes
Donald Sharp [Tue, 1 Dec 2020 17:08:52 +0000 (12:08 -0500)]
Merge pull request #7632 from idryzhov/vtysh-memory-fixes

vtysh memory fixes

3 years agozebra: make a couple NHG errors debugs
Stephen Worley [Tue, 1 Dec 2020 17:04:30 +0000 (12:04 -0500)]
zebra: make a couple NHG errors debugs

A couple NHG messages we were logging as errors are a bit spammy
in usecases where you routinely add/remove interfaces (VM heavy
deployments). Its not really an error a user cares about and
more for a developer to know what went wrong after the fact so
it makes more sense for these to be under a debug rather than
an error since seeing them does not implicitly mean error during
those usecases.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
3 years agoMerge pull request #7642 from donaldsharp/remove_pimd_version
Mark Stapp [Tue, 1 Dec 2020 16:59:31 +0000 (11:59 -0500)]
Merge pull request #7642 from donaldsharp/remove_pimd_version

pimd: Remove pim_version.c it is never used

3 years agoMerge pull request #7640 from opensourcerouting/bfd-echo-minttl-check
Donald Sharp [Tue, 1 Dec 2020 14:31:57 +0000 (09:31 -0500)]
Merge pull request #7640 from opensourcerouting/bfd-echo-minttl-check

bfdd: session specific command type checks

3 years agopimd: mesh group not removed when configured for multiple groups
Sarita Patra [Wed, 25 Nov 2020 11:00:06 +0000 (03:00 -0800)]
pimd: mesh group not removed when configured for multiple groups

Issue:
Configure msdp mesh mg1 for 2 groups.
ip msdp mesh-group mg1 member 1.1.1.1
ip msdp mesh-group mg1 member 1.1.1.2

Remove mg1 for 1.1.1.1
no ip msdp mesh-group mg1 member 1.1.1.1

mg1 for 1.1.1.1 still present. This is fixed.

Signed-off-by: Sarita Patra <saritap@vmware.com>
3 years agopimd: rp not removed when configured for multiple groups
Sarita Patra [Wed, 25 Nov 2020 08:26:25 +0000 (00:26 -0800)]
pimd: rp not removed when configured for multiple groups

Issue:
Configure RP.
ip pim rp 20.0.0.1 239.1.1.1/32
ip pim rp 20.0.0.1 239.1.1.2/32

Remove RP.
no ip pim rp 20.0.0.1 239.1.1.1/32
Rp is not removed. This is fixed now.

Signed-off-by: Sarita Patra <saritap@vmware.com>
3 years agopimd: Remove pim_version.c it is never used
Donald Sharp [Tue, 1 Dec 2020 12:57:45 +0000 (07:57 -0500)]
pimd: Remove pim_version.c it is never used

The pim_version.[c|h] files are never used and we are getting
warnings about PIM_VERSION changing pointer sizes from
newer versions of the compiler.  I see no reason to keep this

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7404 from vishaldhingra/pim
Donald Sharp [Tue, 1 Dec 2020 12:48:54 +0000 (07:48 -0500)]
Merge pull request #7404 from vishaldhingra/pim

pimd: (*,G) Prune processing doesn't remove SGRpt ifchannel

3 years agoMerge pull request #7578 from mjstapp/fix_pim_subdir_am
Donald Sharp [Tue, 1 Dec 2020 12:41:33 +0000 (07:41 -0500)]
Merge pull request #7578 from mjstapp/fix_pim_subdir_am

pimd: fix build and compilation errors

3 years agotools: Fix run folder permissions
Javier Garcia [Tue, 1 Dec 2020 11:28:39 +0000 (12:28 +0100)]
tools: Fix run folder permissions

In the case of some linux distros the /var/run dir is mounted
with tmpfs so in every reboot it's removed.
Then the frrcommon.sh will recreate it without 'x' perm
So no pid file cannot be created in /var/run/frr

Signed-off-by: Javier Garcia <rampxxxx@gmail.com>
3 years agobfdd: session specific command type checks
Rafael Zalamena [Tue, 1 Dec 2020 11:01:37 +0000 (08:01 -0300)]
bfdd: session specific command type checks

Replace the unclear error message:

```
% Failed to edit configuration.

YANG error(s):
 Schema node not found.
 YANG path: /frr-bfdd:bfdd/bfd/sessions/single-hop[dest-addr='192.168.253.6'][interface=''][vrf='default']/minimum-ttl
```

With:

```
frr(config-bfd-peer)# minimum-ttl 250
% Minimum TTL is only available for multi hop sessions.

! or

frr(config-bfd-peer)# echo
% Echo mode is only available for single hop sessions.
frr(config-bfd-peer)# echo-interval 300
% Echo mode is only available for single hop sessions.
```

Reported-by: Trae Santiago
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agodoc: add description of the new memory macro
Igor Ryzhov [Tue, 1 Dec 2020 08:39:40 +0000 (11:39 +0300)]
doc: add description of the new memory macro

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #7630 from donaldsharp/snmp_clarity
Donatas Abraitis [Tue, 1 Dec 2020 08:32:06 +0000 (10:32 +0200)]
Merge pull request #7630 from donaldsharp/snmp_clarity

doc: Explicitly call out need to add snmp module

3 years agobgpd: add peer description for each afi/safi line in show summary
Philippe Guibert [Mon, 23 Nov 2020 14:29:40 +0000 (14:29 +0000)]
bgpd: add peer description for each afi/safi line in show summary

For each afi/safi of 'show bgp summary', display the peer description
each time needed. This information is useful, for instance in the case
of a device connected with multiple peers.
The topotest all_protocol_startup is changed accordingly.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agozebra: Reduce warn -> debug
Donald Sharp [Tue, 1 Dec 2020 00:37:53 +0000 (19:37 -0500)]
zebra: Reduce warn -> debug

During times of network trauma and when we are at large network scale
the process_remote_macip_add function can issue a zlog_warn for
a common occurrence.  Modify the code to be a debug statement.
This behavior is the same now as the process_remote_macip_del function

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: add an api to process/clean the pending dplane queue
Mark Stapp [Mon, 30 Nov 2020 21:42:18 +0000 (16:42 -0500)]
zebra: add an api to process/clean the pending dplane queue

Add an api that allows a caller in the zebra main pthread to
process the queue of pending dplane updates. The caller supplies
a function to call to test each pending context. Selected
contexts are dequeued, and freed without being processed.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #7631 from mjstapp/fix_pw_ctx_leak
Donald Sharp [Mon, 30 Nov 2020 18:48:38 +0000 (13:48 -0500)]
Merge pull request #7631 from mjstapp/fix_pw_ctx_leak

zebra: free dplane ctx after pw update

3 years agovtysh: fix incorrect memory statistics
Igor Ryzhov [Mon, 30 Nov 2020 15:50:51 +0000 (18:50 +0300)]
vtysh: fix incorrect memory statistics

As code comment states, 1 count of MTYPE_COMPLETION is leaked for each
autocompleted token. Let's manually decrement the counter before passing
the pointer to readline.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agovtysh: fix memory leak
Igor Ryzhov [Mon, 30 Nov 2020 15:44:10 +0000 (18:44 +0300)]
vtysh: fix memory leak

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agozebra: free dplane ctx after pw update
Mark Stapp [Mon, 30 Nov 2020 15:02:40 +0000 (10:02 -0500)]
zebra: free dplane ctx after pw update

Free the dplane contexts used for pseudowire updates; we were
leaking these.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoospf6: move serv_close to ospf6_delete
Igor Ryzhov [Fri, 20 Nov 2020 03:06:51 +0000 (06:06 +0300)]
ospf6: move serv_close to ospf6_delete

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospf6: fix crash on shutdown
Igor Ryzhov [Fri, 20 Nov 2020 03:00:31 +0000 (06:00 +0300)]
ospf6: fix crash on shutdown

The crash is sometimes reproduced by all_protocol_startup topotest.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospf6: get instance from lsdb data
Igor Ryzhov [Fri, 20 Nov 2020 03:01:55 +0000 (06:01 +0300)]
ospf6: get instance from lsdb data

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospf6: get instance from route table scope
Igor Ryzhov [Fri, 20 Nov 2020 01:13:52 +0000 (04:13 +0300)]
ospf6: get instance from route table scope

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agodoc: Explicitly call out need to add snmp module
Donald Sharp [Mon, 30 Nov 2020 13:39:29 +0000 (08:39 -0500)]
doc: Explicitly call out need to add snmp module

The documentation implied how snmp works.  Explicitly call
it out a bit more for future users.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7621 from idryzhov/fix-cisco-access-list
Rafael Zalamena [Mon, 30 Nov 2020 12:16:33 +0000 (09:16 -0300)]
Merge pull request #7621 from idryzhov/fix-cisco-access-list

yang: fix cisco access list source value

3 years agozebra: dplane FPM LSP table walk
Duncan Eastoe [Fri, 27 Nov 2020 16:12:22 +0000 (16:12 +0000)]
zebra: dplane FPM LSP table walk

Add routines to walk the LSP table and generate FPM updates for all
entries. A walk of the LSP table is triggered when (re-)connecting
to an FPM.

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
3 years agoMerge pull request #7620 from ckishimo/cosmetic2
Rafael Zalamena [Mon, 30 Nov 2020 11:53:33 +0000 (08:53 -0300)]
Merge pull request #7620 from ckishimo/cosmetic2

ospfd: fix a couple of typos