]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
2 years agobgpd: Deprecate some unused BGP stuff 12603/head
Donatas Abraitis [Fri, 6 Jan 2023 13:06:38 +0000 (15:06 +0200)]
bgpd: Deprecate some unused BGP stuff

* BGP optional parameter type (Authentication)
* BGP UPDATE message error subcode for AS loop

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #12635 from LabNConsulting/ziemba/topotests-lutil-wait-strict
Donald Sharp [Fri, 13 Jan 2023 21:22:00 +0000 (16:22 -0500)]
Merge pull request #12635 from LabNConsulting/ziemba/topotests-lutil-wait-strict

topotests/lib/lutil.py: luSetWaitType("strict"|"nostrict")

2 years agotopotests/lib/lutil.py: luSetWaitType("strict"|"nostrict") 12635/head
G. Paul Ziemba [Fri, 13 Jan 2023 06:27:57 +0000 (22:27 -0800)]
topotests/lib/lutil.py: luSetWaitType("strict"|"nostrict")

    This change alters the behavior of existing test code. The
    default mode (before any call to luSetWaitType()) is now
    "strict".

    The historical behavior of luCommand(op="wait) is to ignore
    failures to match the specified regexp in the specified time.
    In those cases, no result was logged and no error was signaled.

    This change introduces a new "strict" mode for luCommand(op="wait):
    in "strict" wait mode, each invocation of luCommand(op="wait)
    generates an explicit, logged failure result when it fails to match
    the specified regexp in the specified time. These failures signal
    an error for the test.

    Calling luSetWaitType("nostrict") restores the historical behavior.

    Calling luSetWaitType("strict") (re)enables the new strict behavior.

    Individual calls to luCommand() may also specify op="wait-nostrict"
    to override any default and use the historical behavior.

    Individual calls to luCommand() may also specify op="wait-strict"
    to override any default and use the new behavior.

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2 years agoMerge pull request #12637 from donaldsharp/revert_pr_11127
Jafar Al-Gharaibeh [Fri, 13 Jan 2023 17:20:28 +0000 (11:20 -0600)]
Merge pull request #12637 from donaldsharp/revert_pr_11127

Revert "Merge pull request #11127 from louis-6wind/bgp-leak"

2 years agoRevert "tests: Fix wrong interface name in SRv6 topotest" 12637/head
Donald Sharp [Fri, 13 Jan 2023 14:02:34 +0000 (09:02 -0500)]
Revert "tests: Fix wrong interface name in SRv6 topotest"

This reverts commit 647c38eab2d6a1d05f6f683185c58ecf3015a4dc.

2 years agoMerge pull request #12626 from opensourcerouting/fix/bgpd_neighbor_password_unnumbered
Donald Sharp [Fri, 13 Jan 2023 13:35:36 +0000 (08:35 -0500)]
Merge pull request #12626 from opensourcerouting/fix/bgpd_neighbor_password_unnumbered

bgpd: Warn user about mixed order of commands executed

2 years agoRevert "Merge pull request #11127 from louis-6wind/bgp-leak"
Donald Sharp [Wed, 11 Jan 2023 15:14:11 +0000 (10:14 -0500)]
Revert "Merge pull request #11127 from louis-6wind/bgp-leak"

This reverts commit 16aa1809e7c8caad37e8edd4e5aaac4f344bc7d3, reversing
changes made to f616e716089b16d9a678846282a6ac5c55e31a56.

2 years agoMerge pull request #12629 from opensourcerouting/fix/use_static_repo
Stephen Worley [Thu, 12 Jan 2023 19:27:57 +0000 (14:27 -0500)]
Merge pull request #12629 from opensourcerouting/fix/use_static_repo

github: Use static quay.io repository for docker images

2 years agoMerge pull request #12627 from donaldsharp/pim_igmp_vrf_micronet_failure
Christian Hopps [Thu, 12 Jan 2023 13:59:28 +0000 (08:59 -0500)]
Merge pull request #12627 from donaldsharp/pim_igmp_vrf_micronet_failure

tests: the pim_igmp_vrf topotest fails under high load

2 years agoMerge pull request #12595 from chiragshah6/fdev1
Donatas Abraitis [Thu, 12 Jan 2023 08:12:22 +0000 (10:12 +0200)]
Merge pull request #12595 from chiragshah6/fdev1

bgpd: show bgp vrfs per vrf level json support

2 years agodoc: add documentation for show bgp vrfs 12595/head
Chirag Shah [Fri, 6 Jan 2023 21:09:36 +0000 (13:09 -0800)]
doc: add documentation for show bgp vrfs

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2 years agobgpd: show bgp vrfs per vrf level json support
Sindhu Parvathi Gopinathan [Tue, 3 Jan 2023 09:50:44 +0000 (01:50 -0800)]
bgpd: show bgp vrfs per vrf level json support

json support extended for show [ip] bgp vrfs <vrf-name> json

Before:
```
tor-2# show ip bgp vrfs default json
% JSON option not yet supported for specific VRF
tor-2#
tor-2# show bgp vrfs sym_1 json
% JSON option not yet supported for specific VRF
tor-2#
```

After:
```
tor-1# show ip bgp vrfs default json
{
  "default":{
    "type":"DFLT",
    "vrfId":0,
    "routerId":"27.0.0.7",
    "numConfiguredPeers":2,
    "numEstablishedPeers":2,
    "l3vni":0,
    "rmac":"00:00:00:00:00:00",
    "interface":"unknown"
  }
}
tor-1#
tor-1# show bgp vrfs sym_1 json
{
  "sym_1":{
    "type":"VRF",
    "vrfId":21,
    "routerId":"27.0.0.81",
    "numConfiguredPeers":0,
    "numEstablishedPeers":0,
    "l3vni":8888,
    "rmac":"44:38:39:ff:ff:25",
    "interface":"vlan490_l3"
  }
}
tor-1#

tor-1# show bgp vrfs test json
{
}
tor-1#
```

Ticket:#3314672

Issue:3314672

Testing: UT done

Signed-off-by: Chirag Shah <chirag@nvidia.com>
Signed-off-by: Sindhu Parvathi Gopinathan <sgopinathan@nvidia.com>
2 years agoMerge pull request #12609 from mjstapp/fix_bfd_check_len
Rafael Zalamena [Wed, 11 Jan 2023 20:25:23 +0000 (17:25 -0300)]
Merge pull request #12609 from mjstapp/fix_bfd_check_len

bfdd: validate incoming control message length

2 years agogithub: Drop temporary docker-stable github action 12629/head
Donatas Abraitis [Wed, 11 Jan 2023 19:50:22 +0000 (21:50 +0200)]
github: Drop temporary docker-stable github action

Until we have a consensus how we ship stable/X.Y docker images.

For now we build images based on release tags, not based on HEAD of the branch.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agogithub: Use static quay.io repository for docker images
Donatas Abraitis [Wed, 11 Jan 2023 19:23:44 +0000 (21:23 +0200)]
github: Use static quay.io repository for docker images

Not dynamic from username, because tags do not allow using "+" character.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #12623 from anlancs/fix/zerbra-debug-cosmetic-changes
Donatas Abraitis [Wed, 11 Jan 2023 19:04:52 +0000 (21:04 +0200)]
Merge pull request #12623 from anlancs/fix/zerbra-debug-cosmetic-changes

zebra: cosmetic changes for debug

2 years agotests: Pim vrf's need 4.19 or better to run properly not 4.15 12627/head
Donald Sharp [Wed, 11 Jan 2023 17:27:24 +0000 (12:27 -0500)]
tests: Pim vrf's need 4.19 or better to run properly not 4.15

Tests are failing in micronet because linux kernel needs are 4.19
not 4.15

2023-01-11 17:15:06,657.657 INFO: topolog.r1: vtysh command => "show zebra"
2023-01-11 17:15:06,657.657 DEBUG: topolog.r1: LinuxNamespace(r1): cmd_status("['/bin/bash', '-c', 'vtysh  -c "show zebra" 2>/dev/null']", kwargs: {'encoding': 'utf-8', 'stdout': -1, 'stderr': -2, 'shell': False, 'stdin': None})
2023-01-11 17:15:06,729.729 INFO: topolog.r1: vtysh result:
OS                             Linux(4.15.0-193-generic)

Notice the missing pimreg11 device needed in vrf blue:

2023-01-11 17:15:06,731.731 DEBUG: topolog.r1: LinuxNamespace(r1): cmd_status("['/bin/bash', '-c', 'vtysh  -c "show int brief" 2>/dev/null']", kwargs: {'encoding': 'utf-8', 'stdout': -1, 'stderr': -2, 'shell': False, 'stdin': None})
2023-01-11 17:15:06,781.781 INFO: topolog.r1: vtysh result:
Interface       Status  VRF             Addresses
---------       ------  ---             ---------
blue            up      blue            192.168.0.1/32
r1-eth0         up      blue            192.168.100.1/24
r1-eth1         up      blue            192.168.101.1/24

Interface       Status  VRF             Addresses
---------       ------  ---             ---------
erspan0         down    default
gre0            down    default
gretap0         down    default
lo              up      default
pimreg          up      default

Interface       Status  VRF             Addresses
---------       ------  ---             ---------
r1-eth2         up      red             192.168.100.1/24
r1-eth3         up      red             192.168.101.1/24
red             up      red             192.168.0.1/32

While on a 5.4 machine we have this:

mininet310# show int brief
Interface       Status  VRF             Addresses
---------       ------  ---             ---------
blue            up      blue
dummy1          up      blue
dummy2          up      blue
pimreg11        up      blue

As such let's limit the test to a 4.19 kernel or above that our
documentations states we need for proper pim operation.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #12628 from donaldsharp/underlines_too_short_in_doc
Mark Stapp [Wed, 11 Jan 2023 18:23:45 +0000 (13:23 -0500)]
Merge pull request #12628 from donaldsharp/underlines_too_short_in_doc

doc: Ensure that the underline length is correct

2 years agodoc: Ensure that the underline length is correct 12628/head
Donald Sharp [Wed, 11 Jan 2023 15:43:39 +0000 (10:43 -0500)]
doc: Ensure that the underline length is correct

Builds are complaining about this issue.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Don't warning twice for neighbor_bfd_check_controlplane_failure 12626/head
Donatas Abraitis [Wed, 11 Jan 2023 13:58:10 +0000 (15:58 +0200)]
bgpd: Don't warning twice for neighbor_bfd_check_controlplane_failure

When the peer is not defined first.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Warn an operator, that the peer MUST be created before configuring rest
Donatas Abraitis [Wed, 11 Jan 2023 13:53:31 +0000 (15:53 +0200)]
bgpd: Warn an operator, that the peer MUST be created before configuring rest

For now, if the order was mixed, most of the commands are just silently
ignored. Let the operator notice that.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #12622 from taspelund/adj-rib-json
Donatas Abraitis [Wed, 11 Jan 2023 13:25:48 +0000 (15:25 +0200)]
Merge pull request #12622 from taspelund/adj-rib-json

bgpd: add "detail" for advertised/received-routes

2 years agoMerge pull request #12577 from louis-6wind/fix-bgp-evpn-all
Donatas Abraitis [Wed, 11 Jan 2023 12:20:16 +0000 (14:20 +0200)]
Merge pull request #12577 from louis-6wind/fix-bgp-evpn-all

bgpd: fix show bgp all with evpn

2 years agozebra: cosmetic changes for debug 12623/head
anlan_cs [Mon, 9 Jan 2023 07:24:33 +0000 (15:24 +0800)]
zebra: cosmetic changes for debug

Just remove redundant white spaces in debug information.

Before:
```
2023/01/11 05:04:48 ZEBRA: [W8V7C-6W4DS] init neigh ctx NEIGH_INSTALL: ifp vlan100, mac  9a:68:e9:73:74:88, ip 88.88.88.88
2023/01/11 05:04:48 ZEBRA: [NH6N7-54CD1] Tx RTM_NEWNEIGH family ipv4 IF vlan100(8) Neigh 88.88.88.88 MAC  9a:68:e9:73:74:88 flags 0x10 state 0x40 ext_flags 0x0
```

After:
```
2023/01/11 05:17:26 ZEBRA: [W8V7C-6W4DS] init neigh ctx NEIGH_INSTALL: ifp vlan100, mac 9a:68:e9:73:74:88, ip 88.88.88.88
2023/01/11 05:17:26 ZEBRA: [NH6N7-54CD1] Tx RTM_NEWNEIGH family ipv4 IF vlan100(8) Neigh 88.88.88.88 MAC 9a:68:e9:73:74:88 flags 0x10 state 0x40 ext_flags 0x0
```

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2 years agoMerge pull request #12578 from Pdoijode/evpn-mac-vni-det
Donatas Abraitis [Wed, 11 Jan 2023 10:06:37 +0000 (12:06 +0200)]
Merge pull request #12578 from Pdoijode/evpn-mac-vni-det

zebra: Evpn mac vni detail show command

2 years agoMerge pull request #12521 from patrasar/issue_11347_fix
Donatas Abraitis [Wed, 11 Jan 2023 10:05:19 +0000 (12:05 +0200)]
Merge pull request #12521 from patrasar/issue_11347_fix

pimd, pim6d: Handling SGRPT prune received

2 years agoMerge pull request #12590 from anlancs/fix/bgpd-remove-ec-log
Donatas Abraitis [Wed, 11 Jan 2023 10:04:04 +0000 (12:04 +0200)]
Merge pull request #12590 from anlancs/fix/bgpd-remove-ec-log

bgpd: remove one EC log

2 years agoMerge pull request #12602 from opensourcerouting/fix/drop_deprecated_BGP_ATTR_AS_PATH...
Mark Stapp [Tue, 10 Jan 2023 21:37:51 +0000 (16:37 -0500)]
Merge pull request #12602 from opensourcerouting/fix/drop_deprecated_BGP_ATTR_AS_PATHLIMIT

bgpd: Drop deprecated BGP_ATTR_AS_PATHLIMIT path attribute

2 years agoMerge pull request #12620 from donaldsharp/continue_reading
Mark Stapp [Tue, 10 Jan 2023 21:30:26 +0000 (16:30 -0500)]
Merge pull request #12620 from donaldsharp/continue_reading

zebra: Continue fpm_read when we decide a netlink message is not needed

2 years agodoc: add "detail" advertised/received routes 12622/head
Trey Aspelund [Tue, 10 Jan 2023 19:37:28 +0000 (19:37 +0000)]
doc: add "detail" advertised/received routes

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2 years agobgpd: add "detail" for advertised/received-routes
Trey Aspelund [Tue, 10 Jan 2023 18:06:43 +0000 (18:06 +0000)]
bgpd: add "detail" for advertised/received-routes

Introduce a "detail" keyword for per-neighbor/per-afi-safi
advertised-routes and received-routes show commands.
Includes json support.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2 years agoMerge pull request #12612 from opensourcerouting/fix/use_quay.io_for_github_actiobns
Quentin Young [Tue, 10 Jan 2023 16:30:00 +0000 (11:30 -0500)]
Merge pull request #12612 from opensourcerouting/fix/use_quay.io_for_github_actiobns

github: Use quay.io as docker registry for github action generated images

2 years agozebra: Continue fpm_read when we decide a netlink message is not needed 12620/head
Donald Sharp [Tue, 10 Jan 2023 13:36:50 +0000 (08:36 -0500)]
zebra: Continue fpm_read when we decide a netlink message is not needed

When FRR receives a netlink message that it decides to stop parsing
it returns a 0 ( instead of a -1 ).  Just make the dplane continue
reading other data instead of aborting the read.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobfdd: validate incoming control message length 12609/head
Mark Stapp [Mon, 9 Jan 2023 16:57:58 +0000 (11:57 -0500)]
bfdd: validate incoming control message length

Apply upper bound on incoming control messages, drop invalid
messages.

Signed-off-by: Mark Stapp <mjs@labn.net>
2 years agoMerge pull request #12567 from YutaroHayakawa/YutaroHayakawa/isl-dev
Donatas Abraitis [Tue, 10 Jan 2023 07:55:01 +0000 (09:55 +0200)]
Merge pull request #12567 from YutaroHayakawa/YutaroHayakawa/isl-dev

docker,alpine: Remove isl from dependencies

2 years agoMerge pull request #12614 from chiragshah6/zdev
Donatas Abraitis [Tue, 10 Jan 2023 07:53:17 +0000 (09:53 +0200)]
Merge pull request #12614 from chiragshah6/zdev

zebra: Add missing json attributes for show evpn

2 years agozebra: Add missing json attributes for show evpn 12614/head
Sindhu Parvathi Gopinathan [Sat, 7 Jan 2023 03:54:49 +0000 (19:54 -0800)]
zebra: Add missing json attributes for show evpn

Missing json attributes added for show evpn json

Before:
```
tor-1# show evpn json
{
  "advertiseGatewayMacip":"No",
  "numVnis":26,
  "numL2Vnis":21,
  "numL3Vnis":5,
  "isDuplicateAddrDetection":true,
  "maxMoves":5,
  "detectionTime":180,
  "detectionFreezeTime":0,
  "macHoldtime":1080,
  "neighHoldtime":1080,
  "startupDelay":180,
  "startupDelayTimer":"--:--:--",
  "uplinkConfigCount":0,
  "uplinkActiveCount":0
}
tor-1#
```

After:
```
tor-1# show evpn json
{
  "advertiseGatewayMacip":"No",
  "advertiseSviMacip":"No",
  "advertiseSviMac":"No",
  "numVnis":26,
  "numL2Vnis":21,
  "numL3Vnis":5,
  "isDuplicateAddrDetection":true,
  "maxMoves":5,
  "detectionTime":180,
  "detectionFreezeTime":0,
  "macHoldtime":1080,
  "neighHoldtime":1080,
  "startupDelay":180,
  "startupDelayTimer":"--:--:--",
  "uplinkConfigCount":0,
  "uplinkActiveCount":0
}
tor-1#
```

Ticket:#3323248

Issue:3323248

Testing: UT done

Signed-off-by: Sindhu Parvathi Gopinathan's <sgopinathan@nvidia.com>
2 years agogithub: Use quay.io as docker registry for github action generated images 12612/head
Donatas Abraitis [Mon, 9 Jan 2023 19:33:39 +0000 (21:33 +0200)]
github: Use quay.io as docker registry for github action generated images

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #12606 from opensourcerouting/fixes-20230106
Jafar Al-Gharaibeh [Mon, 9 Jan 2023 18:26:29 +0000 (12:26 -0600)]
Merge pull request #12606 from opensourcerouting/fixes-20230106

*: various build fixes

2 years agoMerge pull request #12573 from Pdoijode/bgp-nexthop-json-changes
Donatas Abraitis [Sat, 7 Jan 2023 19:01:06 +0000 (21:01 +0200)]
Merge pull request #12573 from Pdoijode/bgp-nexthop-json-changes

Bgp nexthop json changes

2 years agoMerge pull request #12586 from LabNConsulting/chopps/json-cli-note
Donatas Abraitis [Sat, 7 Jan 2023 18:56:26 +0000 (20:56 +0200)]
Merge pull request #12586 from LabNConsulting/chopps/json-cli-note

doc: add guidance for CLI cmds that output JSON

2 years agoMerge pull request #12605 from Jafaral/lsa2
Donatas Abraitis [Sat, 7 Jan 2023 18:43:39 +0000 (20:43 +0200)]
Merge pull request #12605 from Jafaral/lsa2

ospfd: report the router IP with opaque capability mismatch

2 years agobuild: add doc files missing from dist tarball 12606/head
David Lamparter [Fri, 6 Jan 2023 16:07:47 +0000 (17:07 +0100)]
build: add doc files missing from dist tarball

The override.css/js files for sphinx docs were not being included into
the tarball created by `make dist`.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agolib/clippy: fix symbol validity check
David Lamparter [Fri, 6 Jan 2023 16:05:25 +0000 (17:05 +0100)]
lib/clippy: fix symbol validity check

If symvalid is false, looking at symidx is bogus.

This fixes a build-time SEGV on mips64el.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agolib: disable xref ELF note on mips64el
David Lamparter [Fri, 6 Jan 2023 15:59:55 +0000 (16:59 +0100)]
lib: disable xref ELF note on mips64el

mips64el does not have a 64-bit PC-relative relocation, which is needed
to emit the ELF note for xrefs.  Disabling the ELF note means clippy
takes the fallback path using section headers, so everything does still
work (... unless you strip the section headers.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agozebra: do not load/store wider-than-ptr atomics
David Lamparter [Fri, 6 Jan 2023 15:55:38 +0000 (16:55 +0100)]
zebra: do not load/store wider-than-ptr atomics

Most 32-bit architectures cannot do atomic loads and stores of data
wider than their pointer size, i.e. 32 bit.  Funnily enough they
generally *can* do a CAS2, i.e., 64-bit compare-and-swap, but while a
CAS can emulate atomic add/bitops, loads and stores aren't available.

Replace with a mutex;  since this is 99% used from the zserv thread, the
mutex should take the local-to-thread fast path anyway.  And while one
atomic might be faster than a mutex lock/unlock, we're doing several
here, and at some point a mutex wins on speed anyway.

This fixes build on armel, mipsel, m68k, powerpc, and sh4.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agoospfd: report the router IP with Opaque capability mismatch 12605/head
Jafar Al-Gharaibeh [Fri, 6 Jan 2023 15:27:18 +0000 (09:27 -0600)]
ospfd: report the router IP with Opaque capability mismatch

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2 years agodocker,alpine: Remove isl from dependencies 12567/head
Yutaro Hayakawa [Fri, 6 Jan 2023 14:48:23 +0000 (23:48 +0900)]
docker,alpine: Remove isl from dependencies

Alpine upstream changed the name of the isl package to isl-dev. This
caused the build breakage. Since FRR doesn't use it, we chose to solve
this issue by removing it.

Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>
2 years agoMerge pull request #12568 from YutaroHayakawa/YutaroHayakawa/fpm-nexthop
Donald Sharp [Fri, 6 Jan 2023 13:22:31 +0000 (08:22 -0500)]
Merge pull request #12568 from YutaroHayakawa/YutaroHayakawa/fpm-nexthop

fpm: Send NH message to FPM even if the local kernel doesn't support it

2 years agoMerge pull request #12572 from ak503/lib
Donald Sharp [Fri, 6 Jan 2023 13:16:02 +0000 (08:16 -0500)]
Merge pull request #12572 from ak503/lib

lib: fix display cputime-warning and walltime-warning

2 years agoMerge pull request #12596 from opensourcerouting/fix/frrtrace_arguments
Donald Sharp [Fri, 6 Jan 2023 12:43:39 +0000 (07:43 -0500)]
Merge pull request #12596 from opensourcerouting/fix/frrtrace_arguments

bgpd: Fix the number of arguments for frrtrace()

2 years agobgpd: Drop deprecated BGP_ATTR_AS_PATHLIMIT path attribute 12602/head
Donatas Abraitis [Fri, 6 Jan 2023 12:40:49 +0000 (14:40 +0200)]
bgpd: Drop deprecated BGP_ATTR_AS_PATHLIMIT path attribute

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agodoc: add guidance for CLI cmds that output JSON 12586/head
Christian Hopps [Tue, 3 Jan 2023 12:22:28 +0000 (07:22 -0500)]
doc: add guidance for CLI cmds that output JSON

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agobgpd: Fix the number of arguments for frrtrace() 12596/head
Donatas Abraitis [Thu, 5 Jan 2023 07:19:43 +0000 (09:19 +0200)]
bgpd: Fix the number of arguments for frrtrace()

For bgp_path_info_add_with_caller().

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: AFI option to query nexthops based on AFI 12573/head
Pooja Jagadeesh Doijode [Thu, 5 Jan 2023 02:53:12 +0000 (18:53 -0800)]
bgpd: AFI option to query nexthops based on AFI

Added ipv4 and ipv6 option to existing "show bgp nexthop"
command to be able to query nexthops that belong to a
particular address-family.

Also fixed the warnings of MR 12171

Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@nvidia.com>
2 years agoMerge pull request #12458 from liron-ze/aggre-route-withdraw
Donatas Abraitis [Wed, 4 Jan 2023 20:50:16 +0000 (22:50 +0200)]
Merge pull request #12458 from liron-ze/aggre-route-withdraw

bgpd: Fix aggregated routes are withdrawn abnormally.

2 years agoMerge pull request #12571 from Shikugawa/ospfd-json
Donatas Abraitis [Wed, 4 Jan 2023 20:45:34 +0000 (22:45 +0200)]
Merge pull request #12571 from Shikugawa/ospfd-json

ospfd: show ospf database info using formatted json

2 years agoMerge pull request #12589 from mjstapp/fix_zeb_typos
Donatas Abraitis [Wed, 4 Jan 2023 20:38:55 +0000 (22:38 +0200)]
Merge pull request #12589 from mjstapp/fix_zeb_typos

zebra: fix a couple of typos

2 years agoMerge pull request #12581 from cscarpitta/fix/fix-wrong-interface-name-srv6l3vpn...
Rafael Zalamena [Wed, 4 Jan 2023 16:30:48 +0000 (13:30 -0300)]
Merge pull request #12581 from cscarpitta/fix/fix-wrong-interface-name-srv6l3vpn-topotest

tests: Fix wrong interface name in `bgp_srv6l3vpn_route_leak` topotest

2 years agobgpd: remove one EC log 12590/head
anlan_cs [Sun, 13 Nov 2022 04:52:09 +0000 (23:52 -0500)]
bgpd: remove one EC log

When creating one interface "vxlan66" ( ip link add vxlan66 type vxlan ... ),
which initially maintains down status, saw one unexpected EC log:

```
zebra[37906]: [ZAG0W-VSNSD] interface vxlan66 vrf default(0) index 35 becomes active.
zebra[37906]: [HPWGA-Y527W] IFLA_VXLAN_LINK missing from VXLAN IF message
...
zebra[37906]: [W6BZR-YZPAB] RTM_NEWLINK update for vxlan66(35) sl_type 0 master 0 flags 0x1002
zebra[37906]: [MR3ZF-ATDBY] Intf vxlan66(35) has gone DOWN
zebra[37906]: [T44X9-FFNVB] Intf vxlan66(35) L2-VNI 66 is DOWN
zebra[37906]: [KEGYY-K8XVV] Send EVPN_DEL 66 to bgp
zebra[37906]: [HPWGA-Y527W] IFLA_VXLAN_LINK missing from VXLAN IF message
bgpd[37911]: [TV0XP-3WR0A] Rx VNI del VRF default VNI 66 tenant-vrf default SVI ifindex 0
bgpd[37911]: [MDW89-YAXJG][EC 33554497] 0: VNI hash entry for VNI 66 not found at DEL
```

Since commit `6f908ded80eeba40a850e8d1f6246fb3ed31e648` support interfaces
from down to down, and bgpd doesn't know "VNI 66" at all. So, remove this
EC log.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2 years agozebra: Evpn mac vni detail show command 12578/head
Pooja Jagadeesh Doijode [Tue, 3 Jan 2023 23:17:58 +0000 (15:17 -0800)]
zebra: Evpn mac vni detail show command

New show command "show evpn mac vni xx detail [json]"
to display details of all the mac entries for the
requested VNI.

Output of show evpn mac vni xx detail json:
        {
          "numMacs":2,
          "macs":{
            "ca:be:63:7c:81:05":{
              "type":"local",
              "intf":"veth100",
              "ifindex":8,
              "uptime":"00:06:55",
              "localSequence":0,
              "remoteSequence":0,
              "detectionCount":0,
              "isDuplicate":false,
              "syncNeighCount":0,
              "neighbors":{
                "active":[
                  "fe80::c8be:63ff:fe7c:8105"
                ],
                "inactive":[
                ]
              }
            }
          }
        }

Also added remoteEs field in the JSON output of
"show evpn mac vni xx json".

Output of show evpn mac vni xx json:
"00:02:00:00:00:0d":{
  "type":"remote",
  "remoteEs":"03:44:38:39:ff:ff:02:00:00:02",
  "localSequence":0,
  "remoteSequence":0,
  "detectionCount":0,
  "isDuplicate":false
}

Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@nvidia.com>
2 years agozebra: fix a couple of typos 12589/head
Mark Stapp [Tue, 3 Jan 2023 15:46:01 +0000 (10:46 -0500)]
zebra: fix a couple of typos

Fix a couple of typos in vty prompt and output text.

Signed-off-by: Mark Stapp <mjs@labn.net>
2 years agoMerge pull request #12318 from gpnaveen/bgp_unique_rid
Donatas Abraitis [Tue, 3 Jan 2023 20:18:14 +0000 (22:18 +0200)]
Merge pull request #12318 from gpnaveen/bgp_unique_rid

tests: adding bgp unique router id automation.

2 years agoospfd: show ospf database info using formatted json 12571/head
Rei Shimizu [Wed, 28 Dec 2022 08:09:37 +0000 (08:09 +0000)]
ospfd: show ospf database info using formatted json

Signed-off-by: Rei Shimizu <rshimizu@apache.org>
2 years agoMerge pull request #12566 from Jafaral/lsa-op
Donatas Abraitis [Mon, 2 Jan 2023 21:12:24 +0000 (23:12 +0200)]
Merge pull request #12566 from Jafaral/lsa-op

ospfd: add advertising router IP to Opaque capability mismatch err msg

2 years agotests: Fix wrong interface name in SRv6 topotest 12581/head
Carmine Scarpitta [Sat, 31 Dec 2022 12:58:01 +0000 (13:58 +0100)]
tests: Fix wrong interface name in SRv6 topotest

Previously, routes leaked from one VRF to another VRF were associated
with the original nexthop interface.

Commit 14aabc01565a918c223b7811572fae0316810422 replaced the nexthop
interface with the index of incoming VRF interface.

Due to this change, the `bgp_srv6l3vpn_route_leak` topotest always fails
because it still expects the nexthop interface.

This commit fixes the expected interface name in the
`bgp_srv6l3vpn_route_leak` topotest.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2 years agobgpd: fix show bgp all with evpn 12577/head
Louis Scalbert [Thu, 29 Dec 2022 15:50:54 +0000 (16:50 +0100)]
bgpd: fix show bgp all with evpn

Fix crash on "show bgp all" when BGP EVPN is set.

> #0  raise (sig=11) at ../sysdeps/unix/sysv/linux/raise.c:50
> #1  0x00007fdfe03cf53c in core_handler (signo=11, siginfo=0x7ffdebbffe30, context=0x7ffdebbffd00) at lib/sigevent.c:261
> #2  <signal handler called>
> #3  0x00000000004d4fec in bgp_attr_get_community (attr=0x41) at bgpd/bgp_attr.h:553
> #4  0x00000000004eee84 in bgp_show_table (vty=0x1a790d0, bgp=0x19d0a00, safi=SAFI_EVPN, table=0x19f6010, type=bgp_show_type_normal, output_arg=0x0, rd=0x0, is_last=1, output_cum=0x0,
>     total_cum=0x0, json_header_depth=0x7ffdebc00bf8, show_flags=4, rpki_target_state=RPKI_NOT_BEING_USED) at bgpd/bgp_route.c:11329
> #5  0x00000000004f7765 in bgp_show (vty=0x1a790d0, bgp=0x19d0a00, afi=AFI_L2VPN, safi=SAFI_EVPN, type=bgp_show_type_normal, output_arg=0x0, show_flags=4,
>     rpki_target_state=RPKI_NOT_BEING_USED) at bgpd/bgp_route.c:11814
> #6  0x00000000004fb53b in show_ip_bgp_magic (self=0x6752b0 <show_ip_bgp_cmd>, vty=0x1a790d0, argc=3, argv=0x19cb050, viewvrfname=0x0, all=0x1395390 "all", aa_nn=0x0, community_list=0,
>     community_list_str=0x0, community_list_name=0x0, as_path_filter_name=0x0, prefix_list=0x0, accesslist_name=0x0, rmap_name=0x0, version=0, version_str=0x0, alias_name=0x0,
>     orr_group_name=0x0, detail_routes=0x0, uj=0x0, detail_json=0x0, wide=0x0) at bgpd/bgp_route.c:13040
> #7  0x00000000004fa322 in show_ip_bgp (self=0x6752b0 <show_ip_bgp_cmd>, vty=0x1a790d0, argc=3, argv=0x19cb050) at ./bgpd/bgp_route_clippy.c:519
> #8  0x00007fdfe033ccc8 in cmd_execute_command_real (vline=0x19c9300, filter=FILTER_RELAXED, vty=0x1a790d0, cmd=0x0, up_level=0) at lib/command.c:996
> #9  0x00007fdfe033c739 in cmd_execute_command (vline=0x19c9300, vty=0x1a790d0, cmd=0x0, vtysh=0) at lib/command.c:1056
> #10 0x00007fdfe033cdf5 in cmd_execute (vty=0x1a790d0, cmd=0x19c9eb0 "show bgp all", matched=0x0, vtysh=0) at lib/command.c:1223
> #11 0x00007fdfe03f65c6 in vty_command (vty=0x1a790d0, buf=0x19c9eb0 "show bgp all") at lib/vty.c:486
> #12 0x00007fdfe03f603b in vty_execute (vty=0x1a790d0) at lib/vty.c:1249
> #13 0x00007fdfe03f533b in vtysh_read (thread=0x7ffdebc03838) at lib/vty.c:2148
> #14 0x00007fdfe03e815d in thread_call (thread=0x7ffdebc03838) at lib/thread.c:2006
> #15 0x00007fdfe0379b54 in frr_run (master=0x1246880) at lib/libfrr.c:1198
> #16 0x000000000042b2a8 in main (argc=7, argv=0x7ffdebc03af8) at bgpd/bgp_main.c:520

Link: https://github.com/FRRouting/frr/issues/12576
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2 years agobgpd: Detail option for nexthop and import-check to display paths
Pooja Jagadeesh Doijode [Wed, 28 Dec 2022 22:13:32 +0000 (14:13 -0800)]
bgpd: Detail option for nexthop and import-check to display paths

1. Updated "show bgp vrf <vrf-name> nexthop detail"
   and "show bgp vrf <vrf-name> import-check-table
   detail" show commands to display paths associated with
   nexthop. "detail" option was previously unused.
2. Added 'ipv4' and 'ipv6' JSON object under top level JSON.
3. Removed the "nexthops" JSON object which was under the top
   level JSON object
4. Renamed "ifname" to "interfaceName"
5. Renamed "gates" JSON obejct to "nexthops"
6. Changed "flags" JSON array to JSON object and changed the
   flags from string to boolean
7. "lastUpdate" will display only epoch time for "detail" option

JSON output:
r4# show bgp vrf default nexthop detail json
{
  "ipv4":{
    "10.0.7.1":{
      "valid":true,
      "complete":true,
      "igpMetric":0,
      "pathCount":3,
      "peer":"10.0.7.1",
      "nexthops":[
        {
          "interfaceName":"r4-r2-eth0"
        }
      ],
      "lastUpdate":1672265350,
      "paths":[
        {
          "afi":"IPv4",
          "safi":"unicast",
          "prefix":"11.0.20.2/32",
          "vrf":"default",
          "flags":{
            "igpChanged":false,
            "damped":false,
            "history":false,
            "bestpath":true,
            "valid":true,
            "attrChanged":false,
            "deterministicMedCheck":false,
            "deterministicMedSelected":false,
            "stale":false,
            "removed":false,
            "counted":true,
            "multipath":false,
            "multipathChanged":false,
            "ribAttributeChanged":false,
            "nexthopSelf":false,
            "linkBandwidthChanged":false,
            "acceptOwn":false
          }
        }
      ]
    }
  }
}
}

Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@nvidia.com>
2 years agobgpd: add json option to show commands in bgp_nexthop
Pooja Jagadeesh Doijode [Tue, 27 Dec 2022 23:03:30 +0000 (15:03 -0800)]
bgpd: add json option to show commands in bgp_nexthop

Commands with json option:
 - show bgp nexthop
 - show bgp import-check-table

Example output below, "nexthop" and "import-check-table" are only
different in the nexthop entries, the format is the same
```
leaf-A# show bgp nexthop 10.11.10.1 detail json
{
  "nexthops":{
    "10.11.10.1":{
      "valid":true,
      "complete":true,
      "igpMetric":0,
      "pathCount":1,
      "peer":"10.11.10.1",
      "gates":[
        {
          "ifname":"eth1"
        }
      ],
      "lastUpdate":{
        "epoch":1669161758,
        "string":"Wed Nov 23 00:02:38 2022\n"
      },
      "paths":[
        {
          "afi":"IPv4",
          "safi":"unicast",
          "prefix":"192.168.11.0/24",
          "vrf":"default",
          "flags":[
            "valid",
            "dmedSelected",
            "counted"
          ]
        }
      ]
    }
  }
}
leaf-A# show bgp nexthop json
{
  "nexthops":{
    "10.10.10.1":{
      "valid":true,
      "complete":true,
      "igpMetric":0,
      "pathCount":1,
      "peer":"10.10.10.1",
      "gates":[
        {
          "ifname":"eth0"
        }
      ],
      "lastUpdate":{
        "epoch":1669161758,
        "string":"Wed Nov 23 00:02:38 2022\n"
      }
    },
    "10.11.10.1":{
      "valid":true,
      "complete":true,
      "igpMetric":0,
      "pathCount":1,
      "peer":"10.11.10.1",
      "gates":[
        {
          "ifname":"eth1"
        }
      ],
      "lastUpdate":{
        "epoch":1669161758,
        "string":"Wed Nov 23 00:02:38 2022\n"
      }
    }
  }
}

```

Signed-off-by: Yaroslav Fedoriachenko <yar.fed99@gmail.com>
2 years agolib: fix display cputime-warning and walltime-warning 12572/head
Dmitrii Turlupov [Wed, 28 Dec 2022 08:33:09 +0000 (11:33 +0300)]
lib: fix display cputime-warning and walltime-warning

Before patch:
```
# vtysh -c "c t" -c "service cputime-warning 1" -c "service walltime-warning 2"
# vtysh  -c "show run" | grep warn
service cputime-warning 1000
service walltime-warning 2000
```

After patch:
```
# vtysh -c "c t" -c "service cputime-warning 1" -c "service walltime-warning 2"
# vtysh  -c "show run" | grep warn
service cputime-warning 1
service walltime-warning 2
```

Signed-off-by: Dmitrii Turlupov <dturlupov@factor-ts.ru>
2 years agoMerge pull request #12562 from opensourcerouting/fix/add_frrtrace_points_for_peer_loc...
Russ White [Tue, 27 Dec 2022 20:07:57 +0000 (15:07 -0500)]
Merge pull request #12562 from opensourcerouting/fix/add_frrtrace_points_for_peer_lock_unlock

bgpd: A bit more tracepoints for lttng

2 years agoMerge pull request #12558 from donaldsharp/bgp_static_route_mem_leak
Russ White [Tue, 27 Dec 2022 20:07:17 +0000 (15:07 -0500)]
Merge pull request #12558 from donaldsharp/bgp_static_route_mem_leak

bgpd: static routes are leaked on shutdown

2 years agoMerge pull request #12515 from opensourcerouting/fix/show_ip_bgp_detail_weird_output
Russ White [Tue, 27 Dec 2022 20:05:55 +0000 (15:05 -0500)]
Merge pull request #12515 from opensourcerouting/fix/show_ip_bgp_detail_weird_output

bgpd: Show the real prefix for `show bgp detail`

2 years agoMerge pull request #11127 from louis-6wind/bgp-leak
Russ White [Tue, 27 Dec 2022 19:51:28 +0000 (14:51 -0500)]
Merge pull request #11127 from louis-6wind/bgp-leak

bgpd: multiple fixes for route leaking

2 years agofpm: Send NH message to FPM even if the local kernel doesn't support it 12568/head
Yutaro Hayakawa [Sun, 25 Dec 2022 05:52:57 +0000 (14:52 +0900)]
fpm: Send NH message to FPM even if the local kernel doesn't support it

netlink_route_multipath_msg_encode checks whether the local kernel
supports NextHop Netlink message and doesn't send the message if the
local kernel doesn't have support. This is also applied to the FPM since
kernel dataplane and FPM shares the same code. However, for the FPM,
it's not necessary to have this limit.

This commit adds extra check if netlink_route_multipath_msg_encode is
called from the FPM and bypass kernel support check if it is from the
FPM.

Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>
2 years agoospfd: add advertising router IP to Opaque capability mismatch error message 12566/head
Jafar Al-Gharaibeh [Sun, 25 Dec 2022 01:56:29 +0000 (19:56 -0600)]
ospfd: add advertising router IP to Opaque capability mismatch error message

Submitted-by Marc Boucher <marc@airvitesse.net>
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2 years agoMerge pull request #12560 from opensourcerouting/fix/allow_agentx_for_frr-reload
Jafar Al-Gharaibeh [Sun, 25 Dec 2022 01:48:21 +0000 (19:48 -0600)]
Merge pull request #12560 from opensourcerouting/fix/allow_agentx_for_frr-reload

tools: Ignore agentx command for frr-reload.py

2 years agoMerge pull request #12561 from opensourcerouting/feature/update_snmp_documentation
Jafar Al-Gharaibeh [Sun, 25 Dec 2022 01:45:48 +0000 (19:45 -0600)]
Merge pull request #12561 from opensourcerouting/feature/update_snmp_documentation

doc: Add an example of how to query SNMP for BGP

2 years agoMerge pull request #12564 from sysoleg/evpn-doc-fix
Mark Stapp [Fri, 23 Dec 2022 21:17:24 +0000 (16:17 -0500)]
Merge pull request #12564 from sysoleg/evpn-doc-fix

doc: Fix EVPN documentation minor error

2 years agodoc: Fix EVPN documentation minor error 12564/head
Oleg A. Arkhangelsky [Fri, 23 Dec 2022 17:39:11 +0000 (17:39 +0000)]
doc: Fix EVPN documentation minor error

Signed-off-by: Oleg A. Arkhangelsky <sysoleg@yandex.ru>
2 years agoMerge pull request #12551 from proelbtn/fix-install-srv6-local-routes
Donatas Abraitis [Fri, 23 Dec 2022 12:51:46 +0000 (14:51 +0200)]
Merge pull request #12551 from proelbtn/fix-install-srv6-local-routes

bgpd: Fix announce SRv6 locally-generated routes to Zebra

2 years agobgpd: Add lttng tracepoints for bgp_path_info_add/free 12562/head
Donatas Abraitis [Thu, 22 Dec 2022 21:58:24 +0000 (23:58 +0200)]
bgpd: Add lttng tracepoints for bgp_path_info_add/free

```
[00:05:25.690812414] (+0.000004699) donatas-pc frr_bgp:bgp_path_info_add: { cpu_id = 4 }, { caller = "bgp_update", prefix = "10.0.0.6/32", peer = "10.0.0.3", dest_lock = 2, peer_lock = 8 }
[00:05:25.690816732] (+0.000004318) donatas-pc frr_bgp:bgp_path_info_add: { cpu_id = 4 }, { caller = "bgp_update", prefix = "10.0.0.71/32", peer = "10.0.0.3", dest_lock = 2, peer_lock = 9 }
[00:05:25.690821251] (+0.000004519) donatas-pc frr_bgp:bgp_path_info_add: { cpu_id = 4 }, { caller = "bgp_update", prefix = "10.0.0.72/32", peer = "10.0.0.3", dest_lock = 2, peer_lock = 10 }
[00:05:25.690826050] (+0.000004799) donatas-pc frr_bgp:bgp_path_info_add: { cpu_id = 4 }, { caller = "bgp_update", prefix = "192.168.13.0/24", peer = "10.0.0.3", dest_lock = 1, peer_lock = 11 }
[00:05:25.690830438] (+0.000004388) donatas-pc frr_bgp:bgp_path_info_add: { cpu_id = 4 }, { caller = "bgp_update", prefix = "192.168.24.0/24", peer = "10.0.0.3", dest_lock = 2, peer_lock = 12 }
[00:05:25.690834666] (+0.000004228) donatas-pc frr_bgp:bgp_path_info_add: { cpu_id = 4 }, { caller = "bgp_update", prefix = "192.168.35.0/24", peer = "10.0.0.3", dest_lock = 2, peer_lock = 13 }
[00:05:25.690839145] (+0.000004479) donatas-pc frr_bgp:bgp_path_info_add: { cpu_id = 4 }, { caller = "bgp_update", prefix = "192.168.67.0/24", peer = "10.0.0.3", dest_lock = 2, peer_lock = 14 }
[00:05:26.361779328] (+0.670940183) donatas-pc frr_bgp:bgp_path_info_free: { cpu_id = 7 }, { caller = "bgp_path_info_unlock", prefix = "10.0.0.2/32", peer = "10.0.0.2", dest_lock = 3, peer_lock = 13 }
[00:05:26.361790669] (+0.000011341) donatas-pc frr_bgp:bgp_path_info_free: { cpu_id = 7 }, { caller = "bgp_path_info_unlock", prefix = "10.0.0.3/32", peer = "10.0.0.3", dest_lock = 3, peer_lock = 13 }
[00:05:26.361792282] (+0.000001613) donatas-pc frr_bgp:bgp_path_info_free: { cpu_id = 7 }, { caller = "bgp_path_info_unlock", prefix = "10.0.0.4/32", peer = "10.0.0.3", dest_lock = 5, peer_lock = 12 }
[00:05:26.361912420] (+0.000120138) donatas-pc frr_bgp:bgp_path_info_free: { cpu_id = 7 }, { caller = "bgp_path_info_unlock", prefix = "10.0.0.4/32", peer = "10.0.0.2", dest_lock = 4, peer_lock = 12 }
[00:05:26.361914153] (+0.000001733) donatas-pc frr_bgp:bgp_path_info_free: { cpu_id = 7 }, { caller = "bgp_path_info_unlock", prefix = "10.0.0.5/32", peer = "10.0.0.3", dest_lock = 5, peer_lock = 11 }
[00:05:26.361915425] (+0.000001272) donatas-pc frr_bgp:bgp_path_info_free: { cpu_id = 7 }, { caller = "bgp_path_info_unlock", prefix = "10.0.0.5/32", peer = "10.0.0.2", dest_lock = 4, peer_lock = 11 }
[00:05:26.361916878] (+0.000001453) donatas-pc frr_bgp:bgp_path_info_free: { cpu_id = 7 }, { caller = "bgp_path_info_unlock", prefix = "10.0.0.6/32", peer = "10.0.0.3", dest_lock = 5, peer_lock = 10 }
[00:05:26.361920645] (+0.000003767) donatas-pc frr_bgp:bgp_path_info_free: { cpu_id = 7 }, { caller = "bgp_path_info_unlock", prefix = "10.0.0.6/32", peer = "10.0.0.2", dest_lock = 4, peer_lock = 10 }
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Add lttng tracepoints for peer_lock/peer_unlock
Donatas Abraitis [Thu, 22 Dec 2022 21:07:58 +0000 (23:07 +0200)]
bgpd: Add lttng tracepoints for peer_lock/peer_unlock

```
[23:00:31.231255114] (+0.091943221) donatas-pc frr_bgp:bgp_peer_lock: { cpu_id = 18 }, { caller = "bgp_path_info_add", peer = "10.0.0.3", count = 3 }
[23:00:31.231278048] (+0.000022934) donatas-pc frr_bgp:bgp_peer_lock: { cpu_id = 18 }, { caller = "bgp_path_info_add", peer = "10.0.0.3", count = 4 }
[23:00:31.231280853] (+0.000002805) donatas-pc frr_bgp:bgp_peer_lock: { cpu_id = 18 }, { caller = "bgp_path_info_add", peer = "10.0.0.3", count = 5 }
[23:00:31.231285742] (+0.000004889) donatas-pc frr_bgp:bgp_peer_lock: { cpu_id = 18 }, { caller = "bgp_path_info_add", peer = "10.0.0.3", count = 6 }
[23:00:31.231287526] (+0.000001784) donatas-pc frr_bgp:bgp_peer_lock: { cpu_id = 18 }, { caller = "bgp_path_info_add", peer = "10.0.0.3", count = 7 }
[23:00:31.231291694] (+0.000004168) donatas-pc frr_bgp:bgp_peer_lock: { cpu_id = 18 }, { caller = "bgp_path_info_add", peer = "10.0.0.3", count = 8 }
[23:00:31.231295751] (+0.000004057) donatas-pc frr_bgp:bgp_peer_lock: { cpu_id = 18 }, { caller = "bgp_path_info_add", peer = "10.0.0.3", count = 9 }
[23:00:31.231299599] (+0.000003848) donatas-pc frr_bgp:bgp_peer_lock: { cpu_id = 18 }, { caller = "bgp_path_info_add", peer = "10.0.0.3", count = 10 }
[23:00:31.231304137] (+0.000004538) donatas-pc frr_bgp:bgp_peer_lock: { cpu_id = 18 }, { caller = "bgp_path_info_add", peer = "10.0.0.3", count = 11 }
[23:00:31.231308255] (+0.000004118) donatas-pc frr_bgp:bgp_peer_lock: { cpu_id = 18 }, { caller = "bgp_path_info_add", peer = "10.0.0.3", count = 12 }
[23:00:31.231312182] (+0.000003927) donatas-pc frr_bgp:bgp_peer_lock: { cpu_id = 18 }, { caller = "bgp_path_info_add", peer = "10.0.0.3", count = 13 }
[23:00:31.231316300] (+0.000004118) donatas-pc frr_bgp:bgp_peer_lock: { cpu_id = 18 }, { caller = "bgp_path_info_add", peer = "10.0.0.3", count = 14 }
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #12555 from anlancs/fix/bgp-debug-info
Donatas Abraitis [Thu, 22 Dec 2022 19:24:32 +0000 (21:24 +0200)]
Merge pull request #12555 from anlancs/fix/bgp-debug-info

bgpd: fix one wrong debug log for evpn

2 years agodoc: Add an example of how to query SNMP for BGP 12561/head
Donatas Abraitis [Thu, 22 Dec 2022 16:25:50 +0000 (18:25 +0200)]
doc: Add an example of how to query SNMP for BGP

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agotools: Ignore agentx command for frr-reload.py 12560/head
Donatas Abraitis [Thu, 22 Dec 2022 15:55:40 +0000 (17:55 +0200)]
tools: Ignore agentx command for frr-reload.py

agentx can't be disabled once enabled, so we should ignore it for frr-reload.py.

```
$ /usr/lib/frr/frr-reload.py --reload /etc/frr/bgpd.conf --bindir /usr/local/bin
"no agentx" we failed to remove this command
SNMP AgentX support cannot be disabled once enabled
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: bgp_connected_add memory was being leaked in some cases 12558/head
Donald Sharp [Thu, 22 Dec 2022 00:26:58 +0000 (19:26 -0500)]
bgpd: bgp_connected_add memory was being leaked in some cases

On shutdown, bgp calls an unlock for the bnc connected table,
via the bgp_connected_cleanup function.  This function is
only ever called on shutdown, so we know that bgp is going
away.  The refcount for the connected data can be more than
1.  Let's not worry about the refcount on shutdown and
just delete the nodes instead of leaving them around.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: rfapi properly free a couple lists
Donald Sharp [Wed, 21 Dec 2022 20:22:24 +0000 (15:22 -0500)]
bgpd: rfapi properly free a couple lists

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #12557 from donaldsharp/getenv_two_times
Rafael Zalamena [Wed, 21 Dec 2022 19:13:23 +0000 (16:13 -0300)]
Merge pull request #12557 from donaldsharp/getenv_two_times

vtysh: Remove double retrieve of env VTYSH_HISTFILE

2 years agobgpd: static routes are leaked on shutdown
Donald Sharp [Wed, 21 Dec 2022 17:11:56 +0000 (12:11 -0500)]
bgpd: static routes are leaked on shutdown

Shutdown of bgp results in both the bgp_path_info,
bgp_dest and bgp_table's not being freed because
the bgp_path_info remains locked.

Effectively static routes are scheduled for deletion but bgp_process
skips the work because the work queue sees that the bgp router
is marked for deletion.  Effectively not doing any work and leaving
data on the floor.

Modify the code when attempting to put into the work queue to
notice and not do so but just unlock the path info.

This is effectively the same as what goes on for normal peering
as that it checks for shutdown and just calls bgp_path_info_free
too.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #12540 from manojvn/489527
Donald Sharp [Wed, 21 Dec 2022 13:20:31 +0000 (08:20 -0500)]
Merge pull request #12540 from manojvn/489527

ospf6d: Fixing memory leak in ospf6_summary_add_aggr_route_and_blackh…

2 years agoMerge pull request #12553 from opensourcerouting/fix-sa-warnings
Donald Sharp [Wed, 21 Dec 2022 13:09:02 +0000 (08:09 -0500)]
Merge pull request #12553 from opensourcerouting/fix-sa-warnings

bgpd: fix static analyzer warning

2 years agovtysh: Remove double retrieve of env VTYSH_HISTFILE 12557/head
Donald Sharp [Wed, 21 Dec 2022 13:04:34 +0000 (08:04 -0500)]
vtysh: Remove double retrieve of env VTYSH_HISTFILE

The code is double checking the VTYSH_HISTFILE env variable,
additionally clang-15 when running SA over it doesn't fully
understand the code pattern.  Reduce the double check to
one check to reduce program run-time (ha!) and make SA happy.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: fix one wrong debug log for evpn 12555/head
anlan_cs [Sun, 18 Dec 2022 12:36:41 +0000 (20:36 +0800)]
bgpd: fix one wrong debug log for evpn

Take it into consideration for one debug log:
EVPN MAC-IP routes with a L3 NHG id, has no nexthops.

Not "delete", but "add".

Before:
```
Tx route delete VRF 21 192.168.30.253/32 metric 0 tag 0 count 0 nhg 72580649
```

After:
```
Tx route add VRF 21 192.168.30.253/32 metric 0 tag 0 count 0 nhg 72580649
```

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2 years agoMerge pull request #12552 from Jafaral/rel-notes
Donald Sharp [Tue, 20 Dec 2022 20:49:15 +0000 (15:49 -0500)]
Merge pull request #12552 from Jafaral/rel-notes

Release housekeeping

2 years agobgpd: fix static analyzer warnings 12553/head
Rafael Zalamena [Tue, 20 Dec 2022 18:44:02 +0000 (15:44 -0300)]
bgpd: fix static analyzer warnings

Use `DEFPY` to provide the `struct prefix` required by the debug
insertion functions. While here exchange `int` with `bool` where
appropriated.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2 years agoMerge pull request #12518 from patrasar/pim_minor_issue
Donatas Abraitis [Tue, 20 Dec 2022 16:21:07 +0000 (18:21 +0200)]
Merge pull request #12518 from patrasar/pim_minor_issue

pimd: Fix (S,G) debug issue

2 years agoMerge pull request #12539 from donaldsharp/bgp_debug_prefix_mem_leak
Russ White [Tue, 20 Dec 2022 16:20:19 +0000 (11:20 -0500)]
Merge pull request #12539 from donaldsharp/bgp_debug_prefix_mem_leak

bgpd: When allocating prefix, free it when we are already tracking it

2 years agoMerge pull request #12531 from opensourcerouting/feature/snmp_tests
Russ White [Tue, 20 Dec 2022 16:19:10 +0000 (11:19 -0500)]
Merge pull request #12531 from opensourcerouting/feature/snmp_tests

bgpd: SNMP IPv6 tests and some fixes

2 years agoMerge pull request #12543 from donaldsharp/ospf_json_mem_leak
Russ White [Tue, 20 Dec 2022 16:15:28 +0000 (11:15 -0500)]
Merge pull request #12543 from donaldsharp/ospf_json_mem_leak

ospfd: Fix some json mem leaks and some issues