]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
3 months agoMerge pull request #17841 from Jafaral/pim-bsr-rp
Donald Sharp [Tue, 14 Jan 2025 17:39:52 +0000 (12:39 -0500)]
Merge pull request #17841 from Jafaral/pim-bsr-rp

pimd: fix BSR RPs timing out

3 months agoMerge pull request #17800 from opensourcerouting/fix/import_between_vrf_respect_allow...
Russ White [Tue, 14 Jan 2025 15:19:26 +0000 (10:19 -0500)]
Merge pull request #17800 from opensourcerouting/fix/import_between_vrf_respect_allowas_in

bgpd: Respect allowas-in value from the source VRF's peer

3 months agoMerge pull request #17803 from anlancs/ospfd/fix-redundant-timers
Russ White [Tue, 14 Jan 2025 15:17:20 +0000 (10:17 -0500)]
Merge pull request #17803 from anlancs/ospfd/fix-redundant-timers

ospfd: avoid the redundant timers

3 months agoMerge pull request #17806 from opensourcerouting/fix/lua5.4_support
Russ White [Tue, 14 Jan 2025 15:09:04 +0000 (10:09 -0500)]
Merge pull request #17806 from opensourcerouting/fix/lua5.4_support

Lua 5.4 support

3 months agoMerge pull request #17837 from enkechen-panw/aggr-fix4
Russ White [Tue, 14 Jan 2025 15:05:06 +0000 (10:05 -0500)]
Merge pull request #17837 from enkechen-panw/aggr-fix4

bgpd: fix churn of aggregate routes from duplicate config

3 months agoMerge pull request #17842 from enkechen-panw/aggr-safi
Donald Sharp [Tue, 14 Jan 2025 14:37:39 +0000 (09:37 -0500)]
Merge pull request #17842 from enkechen-panw/aggr-safi

bgpd: remove unused safi in bgp_aggregate structure

3 months agoMerge pull request #17846 from Jafaral/fix-latex-warn
Donald Sharp [Tue, 14 Jan 2025 14:37:09 +0000 (09:37 -0500)]
Merge pull request #17846 from Jafaral/fix-latex-warn

doc: fix LaTex warnings, add documentation to build docs

3 months agoMerge pull request #17639 from pguibert6WIND/bmp_import_vrf_view
Russ White [Tue, 14 Jan 2025 13:38:37 +0000 (08:38 -0500)]
Merge pull request #17639 from pguibert6WIND/bmp_import_vrf_view

Ability to import BMP information from a separate BGP instance

3 months agoMerge pull request #17840 from Jafaral/pim-acl-test
Donatas Abraitis [Tue, 14 Jan 2025 07:08:41 +0000 (09:08 +0200)]
Merge pull request #17840 from Jafaral/pim-acl-test

tests: remove unnecessary wildcard fields from pim acl test

3 months agoMerge pull request #17847 from chiragshah6/freloadfix
Donatas Abraitis [Tue, 14 Jan 2025 07:07:14 +0000 (09:07 +0200)]
Merge pull request #17847 from chiragshah6/freloadfix

tools: fix frr-reload for nbr deletion of no form cmds

3 months agotools: fix frr-reload for nbr deletion of no form cmds 17847/head
Chirag Shah [Mon, 13 Jan 2025 02:31:02 +0000 (18:31 -0800)]
tools: fix frr-reload for nbr deletion of no form cmds

When a bgp neighbor removed from associated to peer-group,
the neighbor is fully deleted, subsequent deletion of any
configuration related to the neighbor leads to failure
in frr-reload.
Handle any 'no neighbor ...' part of lines_to_del list

Testing:
Below first line would delete the neighbor swp1.10,
the existing code before the change handles to remove
config starts with 'neighbor swp1.10 ...' but not
'no neighbor swp1.10 ...'.

(Pdb) (lines_to_del)
 (('router bgp 100',), 'neighbor swp1.10 interface peer-group dpeergrp_2'),
 (('router bgp 100',), 'neighbor swp1.10 advertisement-interval 1'),
 (('router bgp 100',), 'neighbor swp1.10 timers 3 9'),
 (('router bgp 100',), 'neighbor swp1.10 timers connect 1'),
 (('router bgp 100',), 'no neighbor swp1.10 capability dynamic'),

Before fix:

(Pdb) (lines_to_del)
[(('router bgp 100',), 'neighbor swp1.10 interface peer-group dpeergrp_2'),
 (('router bgp 100',), 'no neighbor swp1.10 capability dynamic')]

frr-reload log:
2025-01-13 05:13:11,172  INFO: Executed "router bgp 100  no neighbor swp1.10 interface peer-group dpeergrp_2 exit"
2025-01-13 05:13:11,227 ERROR: Failed to execute router bgp 100  neighbor swp1.10 capability dynamic exit
2025-01-13 05:13:11,228 ERROR: "router bgp 100 --  neighbor swp1.10 capability dynamic -- exit" we failed to remove this command

After fix:

(Pdb)(lines_to_del)
 [(('router bgp 100',), 'neighbor swp1.10 interface peer-group dpeergrp_2')]

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 months agoMerge pull request #17843 from LabNConsulting/chopps/new-docker-and-doc
Jafar Al-Gharaibeh [Mon, 13 Jan 2025 19:16:49 +0000 (13:16 -0600)]
Merge pull request #17843 from LabNConsulting/chopps/new-docker-and-doc

Add Ubuntu 24.04 docker image and developer build doc

3 months agoMerge pull request #17839 from raja-rajasekar/rajasekarr/optimize_nh_compare
Mark Stapp [Mon, 13 Jan 2025 18:47:12 +0000 (13:47 -0500)]
Merge pull request #17839 from raja-rajasekar/rajasekarr/optimize_nh_compare

zebra: Optimize invoking nhg compare func

3 months agoMerge pull request #17844 from LabNConsulting/chopps/munet-0-15-3
Donald Sharp [Mon, 13 Jan 2025 17:07:33 +0000 (12:07 -0500)]
Merge pull request #17844 from LabNConsulting/chopps/munet-0-15-3

tests: update munet to 0.15.3

3 months agodoc: building html/pdf user and developer documentation 17846/head
Jafar Al-Gharaibeh [Mon, 13 Jan 2025 07:38:32 +0000 (01:38 -0600)]
doc: building html/pdf user and developer documentation

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
3 months agodoc: fix LaTex warning when building pdf docs
Jafar Al-Gharaibeh [Mon, 13 Jan 2025 05:00:09 +0000 (23:00 -0600)]
doc: fix LaTex warning when building pdf docs

LaTex doesn't like the Unicon character `≥` which should be represented
by the special sequnce `$\leq$`. Since this is buried all in Sphinx, and
we also have a scrip that look for the character, the easiest fix is to
just use `>=` instead which works without warnings, and without asking to
ignore every warning about the use of every instance of the special char.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
3 months agopimd: explicitly ensure the RP src is BSR 17841/head
Jafar Al-Gharaibeh [Sat, 11 Jan 2025 20:40:28 +0000 (14:40 -0600)]
pimd: explicitly ensure the RP src is BSR

With the recent suppoort of multiple sources of RPs, we can assume non static RPs
are BSR RPs. Just make the check explicit for BSR.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
3 months agopimd: fix BSR RPs timing out
Jafar Al-Gharaibeh [Sat, 11 Jan 2025 20:36:45 +0000 (14:36 -0600)]
pimd: fix BSR RPs timing out

On the BSR node itself, RPs shouldn't timeout, becase we know
the node is the BSR, and it is active!

fixes:#17587

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
3 months agolib: Adopt Lua stuff for Lua 5.4 17806/head
Donatas Abraitis [Thu, 9 Jan 2025 07:48:27 +0000 (09:48 +0200)]
lib: Adopt Lua stuff for Lua 5.4

lua_pcall() returns LUA_ERRGCMM in 5.3 which is already deprecated.

The constant LUA_ERRGCMM was removed.
Errors in finalizers are never propagated; instead, they generate a warning.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 months agoconfigure: Adopt for Lua 5.4
Donatas Abraitis [Thu, 9 Jan 2025 07:25:11 +0000 (09:25 +0200)]
configure: Adopt for Lua 5.4

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 months agom4: Update ax_lua to support Lua 5.4
Donatas Abraitis [Wed, 8 Jan 2025 21:50:07 +0000 (23:50 +0200)]
m4: Update ax_lua to support Lua 5.4

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 months agotests: update munet to 0.15.4 17844/head
Christian Hopps [Sun, 12 Jan 2025 09:42:33 +0000 (09:42 +0000)]
tests: update munet to 0.15.4

- add readline and waitline functions for use with popen objects
- other non-topotest (munet native) run changes
  - vm/qemu support booting cloud images (rocky, ubuntu, debian)
  - native topology init commands

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agodocker: add ubuntu24-ci docker image support 17843/head
Christian Hopps [Sun, 12 Jan 2025 02:30:08 +0000 (02:30 +0000)]
docker: add ubuntu24-ci docker image support

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agodoc: add building for ubuntu 24.04, and refactor
Christian Hopps [Sun, 12 Jan 2025 02:27:10 +0000 (02:27 +0000)]
doc: add building for ubuntu 24.04, and refactor

- All 3 ubutu 2x (20.04, 22.04 and 24.04) have the same instructions
so put them in one include file.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agobgpd: remove unused safi in bgp_aggregate structure 17842/head
Enke Chen [Sat, 11 Jan 2025 22:14:10 +0000 (14:14 -0800)]
bgpd: remove unused safi in bgp_aggregate structure

Remove the unused safi field in bgp_aggregate structure.

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
3 months agobgpd: fix churn of aggregate routes from duplicate config 17837/head
Enke Chen [Sat, 11 Jan 2025 22:01:36 +0000 (14:01 -0800)]
bgpd: fix churn of aggregate routes from duplicate config

Currently when an aggregate-address is configured, the existing
entry is always removed regardless whether any change is involved.
This would create unnecessary churn of the aggregate route when
the same config is applied for the aggregate address.

The fix is to check for duplicate aggregate-address config.

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
3 months agotests: remove unnecessary wildcard fields from pim acl test 17840/head
Jafar Al-Gharaibeh [Fri, 10 Jan 2025 23:32:30 +0000 (17:32 -0600)]
tests: remove unnecessary wildcard fields from pim acl test

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
3 months agozebra: Optimize invoking nhg compare func 17839/head
Rajasekar Raja [Fri, 10 Jan 2025 21:39:12 +0000 (13:39 -0800)]
zebra: Optimize invoking nhg compare func

In some cases, the old_re nhe and the newnhe is same and there is no
point in comparing them both since they are the same. Skip comparing in
such cases.

Ex:
2025/01/09 23:49:27.489020 ZEBRA: [W4Z4R-NTSMD] zebra_nhg_rib_find_nhe: => nhe 0x555f611d30c0 (44[38/39/45])
2025/01/09 23:49:27.489021 ZEBRA: [ZH3FQ-TE9NV] zebra_nhg_rib_compare_old_nhe: 0.0.0.0/0 new id: 44 old id: 44
2025/01/09 23:49:27.489021 ZEBRA: [YB8HE-Z86GN] zebra_nhg_rib_compare_old_nhe: 0.0.0.0/0 NEW 0x555f611d30c0 (44[38/39/45])
2025/01/09 23:49:27.489023 ZEBRA: [ZSB1Z-XM2V3] 0.0.0.0/0: NH 20.1.1.9[0] vrf default(0) wgt 1, with flags
2025/01/09 23:49:27.489024 ZEBRA: [ZSB1Z-XM2V3] 0.0.0.0/0: NH 30.1.2.9[0] vrf default(0) wgt 1, with flags
2025/01/09 23:49:27.489025 ZEBRA: [ZSB1Z-XM2V3] 0.0.0.0/0: NH 20.1.1.2[4] vrf default(0) wgt 1, with flags ACTIVE
2025/01/09 23:49:27.489026 ZEBRA: [ZM3BX-HPETZ] zebra_nhg_rib_compare_old_nhe: 0.0.0.0/0 OLD 0x555f611d30c0 (44[38/39/45])
2025/01/09 23:49:27.489027 ZEBRA: [ZSB1Z-XM2V3] 0.0.0.0/0: NH 20.1.1.9[0] vrf default(0) wgt 1, with flags
2025/01/09 23:49:27.489028 ZEBRA: [ZSB1Z-XM2V3] 0.0.0.0/0: NH 30.1.2.9[0] vrf default(0) wgt 1, with flags
2025/01/09 23:49:27.489028 ZEBRA: [ZSB1Z-XM2V3] 0.0.0.0/0: NH 20.1.1.2[4] vrf default(0) wgt 1, with flags ACTIVE

Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
3 months agoMerge pull request #17829 from Jafaral/static-metric
Donald Sharp [Fri, 10 Jan 2025 15:12:39 +0000 (10:12 -0500)]
Merge pull request #17829 from Jafaral/static-metric

tests: avoid nondeterministic route

3 months agoMerge pull request #17813 from enkechen-panw/aigp-fix6
Donatas Abraitis [Fri, 10 Jan 2025 14:26:34 +0000 (16:26 +0200)]
Merge pull request #17813 from enkechen-panw/aigp-fix6

bgpd: use igpmetric in bgp_aigp_metric_total()

3 months agoMerge pull request #17830 from opensourcerouting/fix/timers_bgp_default
Donald Sharp [Fri, 10 Jan 2025 14:24:00 +0000 (09:24 -0500)]
Merge pull request #17830 from opensourcerouting/fix/timers_bgp_default

bgpd: Fix showing default `timers bgp x y`

3 months agoMerge pull request #17811 from enkechen-panw/aggr-fix3
Donatas Abraitis [Fri, 10 Jan 2025 07:47:21 +0000 (09:47 +0200)]
Merge pull request #17811 from enkechen-panw/aggr-fix3

bgpd: fix memory leak in bgp_aggregate_install()

3 months agoMerge pull request #17831 from Jafaral/ospf6-nodebug
Donatas Abraitis [Fri, 10 Jan 2025 07:45:20 +0000 (09:45 +0200)]
Merge pull request #17831 from Jafaral/ospf6-nodebug

ospf6d: guard a couple of debugs

3 months agoospfd: avoid the redundant timers 17803/head
anlan_cs [Thu, 9 Jan 2025 08:36:12 +0000 (16:36 +0800)]
ospfd: avoid the redundant timers

Since the timer thread for ```OSPF_ROUTE_AGGR_DEL``` has been created,
the subsequent "no summary-address" commands shouldn't trigger redundant timers.

Signed-off-by: anlan_cs <anlan_cs@126.com>
3 months agoospf6d: guard a couple of debugs 17831/head
Jafar Al-Gharaibeh [Thu, 9 Jan 2025 23:26:10 +0000 (17:26 -0600)]
ospf6d: guard a couple of debugs

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
3 months agobgpd: fix memory leak in bgp_aggregate_install() 17811/head
Enke Chen [Thu, 9 Jan 2025 22:48:35 +0000 (14:48 -0800)]
bgpd: fix memory leak in bgp_aggregate_install()

Potential memory leak with as-set and matching-MED-only config.

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
3 months agobgpd: Fix showing default `timers bgp x y` 17830/head
Donatas Abraitis [Thu, 9 Jan 2025 21:56:31 +0000 (23:56 +0200)]
bgpd: Fix showing default `timers bgp x y`

Fixes: ef4a9215b912c885498715614ee01b43dc861c1a ("bgpd: Reuse defined constants for BGP timers")
Fixes: ab3535fbcf37b59ec02332fa021142c5b7d6dd3e ("bgpd: Implement connect retry backoff")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 months agotests: avoid nondeterministic route 17829/head
Jafar Al-Gharaibeh [Thu, 9 Jan 2025 21:41:41 +0000 (15:41 -0600)]
tests: avoid nondeterministic route

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
3 months agoMerge pull request #17805 from donaldsharp/2_test_fixes
Jafar Al-Gharaibeh [Thu, 9 Jan 2025 21:40:08 +0000 (15:40 -0600)]
Merge pull request #17805 from donaldsharp/2_test_fixes

2 test fixes

3 months agoMerge pull request #17809 from donaldsharp/nhg_fix
Jafar Al-Gharaibeh [Thu, 9 Jan 2025 21:38:54 +0000 (15:38 -0600)]
Merge pull request #17809 from donaldsharp/nhg_fix

zebra: Fix leaked nhe

3 months agoMerge pull request #17801 from enkechen-panw/aggr-fix2
Donatas Abraitis [Thu, 9 Jan 2025 21:02:26 +0000 (23:02 +0200)]
Merge pull request #17801 from enkechen-panw/aggr-fix2

bgpd: apply route-map for aggregate before attribute comparison

3 months agoMerge pull request #17807 from louis-6wind/fix-bgp-orf-crash
Donatas Abraitis [Thu, 9 Jan 2025 20:57:51 +0000 (22:57 +0200)]
Merge pull request #17807 from louis-6wind/fix-bgp-orf-crash

bgpd: fix crash in displaying json orf prefix-list

3 months agoMerge pull request #17808 from louis-6wind/rem-if-dead
Donatas Abraitis [Thu, 9 Jan 2025 20:54:43 +0000 (22:54 +0200)]
Merge pull request #17808 from louis-6wind/rem-if-dead

lib: remove interface dead code

3 months agobgpd: use igpmetric in bgp_aigp_metric_total() 17813/head
Enke Chen [Thu, 9 Jan 2025 20:02:02 +0000 (12:02 -0800)]
bgpd: use igpmetric in bgp_aigp_metric_total()

Use igpmetric from bgp_path_info in bgp_igp_metric_total() to be
consistent with all other cases, e.g., as in bgp_path_info_cmp().

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
3 months agotests: bgp_srv6l3vpn_to_bgp_vrf3 needs more time 17805/head
Donald Sharp [Wed, 8 Jan 2025 14:42:49 +0000 (09:42 -0500)]
tests: bgp_srv6l3vpn_to_bgp_vrf3 needs more time

The test starts with checking for rib insertion
of routes that may take some time after system
startup to come up.  Under heavy load this may
cause this test to just fail.  Give it more time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 months agolib: remove interface dead code 17808/head
Louis Scalbert [Thu, 9 Jan 2025 17:36:49 +0000 (18:36 +0100)]
lib: remove interface dead code

Remove interface dead code.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
3 months agobgpd: fix crash in displaying json orf prefix-list 17807/head
Louis Scalbert [Thu, 9 Jan 2025 17:28:53 +0000 (18:28 +0100)]
bgpd: fix crash in displaying json orf prefix-list

bgpd crashes when there is several entries in the prefix-list. No
backtrace is provided because the issue was catched from a code review.

Fixes: 856ca177c4 ("Added json formating support to show-...-neighbors-... bgp commands.")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
3 months agobgpd: fix bgp orf prefix-list json prefix
Louis Scalbert [Thu, 9 Jan 2025 17:24:39 +0000 (18:24 +0100)]
bgpd: fix bgp orf prefix-list json prefix

0x<address>FX was displayed instead of the prefix.

Fixes: b219dda129 ("lib: Convert usage of strings to %pFX and %pRN")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
3 months agozebra: Fix leaked nhe 17809/head
Donald Sharp [Thu, 9 Jan 2025 17:34:50 +0000 (12:34 -0500)]
zebra: Fix leaked nhe

During route processing in zebra, Zebra will create a nexthop
group that matches the nexthops passed down from the routing
protocol.  Then Zebra will look to see if it can re-use a
nhe from a previous version of the route entry( say a interface
goes down ).  If Zebra decides to re-use an nhe it was just dropping
the route entry created.  Which led to nexthop group's that had
a refcount of 0 and in some cases these nexthop groups were installed
into the kernel.

Add a bit of code to see if the returned entry is not being used
and it has no reference count and if so, properly dispose of it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 months agotests: bgp_srv6_sid_reachability should give more time
Donald Sharp [Wed, 8 Jan 2025 14:41:21 +0000 (09:41 -0500)]
tests: bgp_srv6_sid_reachability should give more time

The test starts right in on check_pings with a 10 second
time out.  Any type of delay on startup is going to cause
problems.  Give the first check_ping significant time
for the test to be fully brought up.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 months agoMerge pull request #17798 from mjstapp/fix_remove_clear_thread
Jafar Al-Gharaibeh [Thu, 9 Jan 2025 15:01:33 +0000 (09:01 -0600)]
Merge pull request #17798 from mjstapp/fix_remove_clear_thread

libs: remove deprecated 'clear thread' cli

3 months agobgpd: apply route-map for aggregate before attribute comparison 17801/head
Enke Chen [Thu, 9 Jan 2025 01:34:29 +0000 (17:34 -0800)]
bgpd: apply route-map for aggregate before attribute comparison

Currently when re-evaluating an aggregate route, the full attribute of
the aggregate route is not compared with the existing one in the BGP
table. That can result in unnecessary churns (un-install and then
install) of the aggregate route when a more specific route is added or
deleted, or when the route-map for the aggregate changes. The churn
would impact route installation and route advertisement.

The fix is to apply the route-map for the aggregate first and then
compare the attribute.

Here is an example of the churn:

debug bgp aggregate prefix 5.5.5.0/24
!
route-map set-comm permit 10
 set community 65004:200
!
router bgp 65001
 address-family ipv4 unicast
  redistribute static
  aggregate-address 5.5.5.0/24 route-map set-comm
!

Step 1:
  ip route 5.5.5.1/32 Null0

Jan  8 10:28:49 enke-vm1 bgpd[285786]: [J7PXJ-A7YA2] bgp_aggregate_install: aggregate 5.5.5.0/24, count 1
Jan  8 10:28:49 enke-vm1 bgpd[285786]: [Y444T-HEVNG]   aggregate 5.5.5.0/24: installed

Step 2:
  ip route 5.5.5.2/32 Null0

Jan  8 10:29:03 enke-vm1 bgpd[285786]: [J7PXJ-A7YA2] bgp_aggregate_install: aggregate 5.5.5.0/24, count 2
Jan  8 10:29:03 enke-vm1 bgpd[285786]: [S2EH5-EQSX6]   aggregate 5.5.5.0/24: existing, removed
Jan  8 10:29:03 enke-vm1 bgpd[285786]: [Y444T-HEVNG]   aggregate 5.5.5.0/24: installed
---

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
3 months agotests: Check if allowas-in works when importing between local VRFs 17800/head
Donatas Abraitis [Wed, 8 Jan 2025 17:22:27 +0000 (19:22 +0200)]
tests: Check if allowas-in works when importing between local VRFs

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 months agobgpd: Respect allowas-in value from the source VRF's peer
Donatas Abraitis [Wed, 8 Jan 2025 17:03:55 +0000 (19:03 +0200)]
bgpd: Respect allowas-in value from the source VRF's peer

If the peer which has allowas-in enabled and then reimports the routes to another
local VRF, respect that value.

This was working with < 10.2 releases.

Fixes: d4426b62d221f4e15810dbe578de05df8991c991 ("bgpd: copy source vrf ASN to leaked route and block loops")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 months agoRevert "bgpd: Reinstall aggregated routes if using route-maps and it was changed"
Enke Chen [Wed, 8 Jan 2025 17:12:56 +0000 (09:12 -0800)]
Revert "bgpd: Reinstall aggregated routes if using route-maps and it was changed"

This reverts commit ee1986f1b5ae6b94b446b12e1b77cc30d8f5f46d.

The fix is incomplete, and is no longer needed with the fix that applies
the route-map for an aggregate and then compares the attribute.

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
3 months agoMerge pull request #17795 from gromit1811/bugfix_priv_syscaps_alloc
Donald Sharp [Wed, 8 Jan 2025 15:20:11 +0000 (10:20 -0500)]
Merge pull request #17795 from gromit1811/bugfix_priv_syscaps_alloc

lib: Fix privs syscaps (pset_t) allocation

3 months agolibs: remove deprecated 'clear thread' cli 17798/head
Mark Stapp [Wed, 8 Jan 2025 15:17:51 +0000 (10:17 -0500)]
libs: remove deprecated 'clear thread' cli

Remove a deprecated 'clear thread cpu' command.

Signed-off-by: Mark Stapp <mjs@cisco.com>
3 months agoMerge pull request #17778 from enkechen-panw/aggr-fix
Donald Sharp [Wed, 8 Jan 2025 13:57:54 +0000 (08:57 -0500)]
Merge pull request #17778 from enkechen-panw/aggr-fix

bgpd: add a debug command for route aggregation

3 months agolib: Fix privs syscaps (pset_t) allocation 17795/head
Martin Buck [Wed, 8 Jan 2025 09:38:56 +0000 (10:38 +0100)]
lib: Fix privs syscaps (pset_t) allocation

Don't over-allocate syscaps in zcaps2sys(): This is just a single struct
(pset_t) with a count and a pointer to an array of capabilities, not an
array. So only allocate a single pset_t, not num copies of it.

The allocation size of syscaps->caps then needs to be based on the number of
Linux capabilities (count), but that is already handled properly a few lines
below.

Note that this fix is mostly cosmetic and for correctness. There was no
potential for memory corruption, because num is guaranteed to be nonzero. So
at least the one required pset_t was always allocated (but potentially much
more).

Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
3 months agobgpd: add debugging command for route aggregation 17778/head
Enke Chen [Wed, 8 Jan 2025 06:52:41 +0000 (22:52 -0800)]
bgpd: add debugging command for route aggregation

Add a new debugging command:

  debug bgp aggregate [prefix <A.B.C.D/M|X:X::X:X/M>]

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
3 months agoMerge pull request #17707 from gromit1811/pr16811_rebased
Russ White [Tue, 7 Jan 2025 21:14:15 +0000 (16:14 -0500)]
Merge pull request #17707 from gromit1811/pr16811_rebased

tests: cleanup ospf6 ecmp inter area

3 months agoMerge pull request #17772 from LabNConsulting/chopps/fix-oper-walk
Donald Sharp [Tue, 7 Jan 2025 18:52:37 +0000 (13:52 -0500)]
Merge pull request #17772 from LabNConsulting/chopps/fix-oper-walk

improve error handling of operational state walk callback

3 months agoMerge pull request #17781 from LabNConsulting/chopps/fix-keyless-list-query
Donald Sharp [Tue, 7 Jan 2025 18:17:37 +0000 (13:17 -0500)]
Merge pull request #17781 from LabNConsulting/chopps/fix-keyless-list-query

fix xpath query on keyless list with positional predicate

3 months agoMerge pull request #17782 from LabNConsulting/chopps/new-notify-msg-fmt
Donald Sharp [Tue, 7 Jan 2025 18:15:40 +0000 (13:15 -0500)]
Merge pull request #17782 from LabNConsulting/chopps/new-notify-msg-fmt

New YANG notify msg fmt

3 months agoMerge pull request #17783 from LabNConsulting/chopps/new-oper-get-callback
Donald Sharp [Tue, 7 Jan 2025 18:11:26 +0000 (13:11 -0500)]
Merge pull request #17783 from LabNConsulting/chopps/new-oper-get-callback

Add new oper state get callback

3 months agoMerge pull request #17725 from opensourcerouting/fix/full_no_form_for_area-password
Russ White [Tue, 7 Jan 2025 14:41:39 +0000 (09:41 -0500)]
Merge pull request #17725 from opensourcerouting/fix/full_no_form_for_area-password

isisd: Allow full `no` form for `domain-password` and `area-password`

3 months agoMerge pull request #17723 from opensourcerouting/fix/bgpd_metric_worse
Russ White [Tue, 7 Jan 2025 14:41:08 +0000 (09:41 -0500)]
Merge pull request #17723 from opensourcerouting/fix/bgpd_metric_worse

bgpd: Respect `bgp bestpath missing-as-worst` for `table-map` as well

3 months agoMerge pull request #17700 from Andrew-Dickinson/fix-socket-gc
Russ White [Tue, 7 Jan 2025 14:38:05 +0000 (09:38 -0500)]
Merge pull request #17700 from Andrew-Dickinson/fix-socket-gc

ospfclient: fix crash due to streamwriter garbage collect

3 months agodoc: add bmp import-vrf-view on the bmp user guide 17639/head
Philippe Guibert [Wed, 11 Dec 2024 20:12:07 +0000 (21:12 +0100)]
doc: add bmp import-vrf-view on the bmp user guide

Add the bmp import-vrf-view command on the bmp user guide.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agotopotests: bmp, test syncro for pre/post-policy of imported bgps
Philippe Guibert [Tue, 12 Nov 2024 08:41:46 +0000 (09:41 +0100)]
topotests: bmp, test syncro for pre/post-policy of imported bgps

Add a test that controls that the configuration of an imported
BGP instance triggers a re-syncronisation.
Ensure that changing an attribute like route distinguisher
triggers also a re-syncronisation.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd: bmp, handle imported bgp instances in bmp end of rib
Philippe Guibert [Tue, 3 Dec 2024 08:05:45 +0000 (09:05 +0100)]
bgpd: bmp, handle imported bgp instances in bmp end of rib

Modify the bmp_eor() function to send end of rib messages for each peer
of the current BGP instance.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd: add sync for monitored afi/safi of imported bgps
Philippe Guibert [Mon, 11 Nov 2024 21:24:57 +0000 (22:24 +0100)]
bgpd: add sync for monitored afi/safi of imported bgps

If an imported BGP is configured after BGP updates have been
received, then BMP will not detect those updates in the
monitor messages.

Syncronisation is also needed for separate instances.
For each imported bgp instance, syncronisation is re-done
for monitored afi/safis for ALL available instances.
- upon configuring an afi/safi (as previously)
- when configuring an imported view

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd: rework bmp end of rib processing
Philippe Guibert [Mon, 16 Dec 2024 11:12:53 +0000 (12:12 +0100)]
bgpd: rework bmp end of rib processing

Move the end of rib processing code of a given BGP instance in a
separate function. This code prepares the next commit, it avoids
having the following warning:
> WARNING: Too many leading tabs - consider code refactoring

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd: fix access to invalid memory zone
Philippe Guibert [Thu, 19 Dec 2024 13:23:40 +0000 (14:23 +0100)]
bgpd: fix access to invalid memory zone

> ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f73891cb146 bp 0x7ffca86584c0 sp 0x7ffca8658490 T0)
> ==837617==The signal is caused by a READ memory access.
> ==837617==Hint: address points to the zero page.
>     #0 0x7f73891cb146 in bmp_targets_const_next bgpd/bgp_bmp.c:149
>     #1 0x7f73891cb1a5 in bmp_targets_next bgpd/bgp_bmp.c:149
>     #2 0x7f73891e875a in _bmp_vrf_state_changed_internal bgpd/bgp_bmp.c:3520
>     #3 0x7f73891e8922 in bmp_vrf_itf_state_changed bgpd/bgp_bmp.c:3566
>     #4 0x55e511af8d1b in hook_call_bgp_vrf_status_changed bgpd/bgp_zebra.c:64
>     #5 0x55e511afa304 in bgp_ifp_up bgpd/bgp_zebra.c:234
>     #6 0x7f738981c193 in hook_call_if_up lib/if.c:57
>     #7 0x7f738981d09a in if_up_via_zapi lib/if.c:203
>     #8 0x7f73899d6f54 in zclient_interface_up lib/zclient.c:2671
>     #9 0x7f73899e3e5a in zclient_read lib/zclient.c:4624
>     #10 0x7f738998078d in event_call lib/event.c:1996
>     #11 0x7f7389848933 in frr_run lib/libfrr.c:1232
>     #12 0x55e5117f7ae1 in main bgpd/bgp_main.c:557
>     #13 0x7f7389229d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
>     #14 0x7f7389229e3f in __libc_start_main_impl ../csu/libc-start.c:392
>     #15 0x55e5117f4234 in _start (/usr/lib/frr/bgpd+0x2ec234)

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd, topotests: bmp imported bgp, send peer up events when config param changed
Philippe Guibert [Mon, 2 Dec 2024 14:23:56 +0000 (15:23 +0100)]
bgpd, topotests: bmp imported bgp, send peer up events when config param changed

When a BGP instance is created or becomes valid, and when a parameter
is updated (router-id, route distinguisher), the peer up messages other
than loc rib peer up messages, are sent. Add a test that controls if
peer down and peer up messages are sent accordingly with correct route
distinguisher values.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd, topotests: bmp, send peer down when unconfiguring imported vrf
Philippe Guibert [Tue, 12 Nov 2024 07:46:24 +0000 (08:46 +0100)]
bgpd, topotests: bmp, send peer down when unconfiguring imported vrf

When unconfiguring an imported BGP instance, a peer down
should be sent to notify BMP collector that the BGP instance
is leaving.

Add a test that controls the presence of the peer down loc-rib
message.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd, topotests: bmp imported bgp, add loc-rib peer up support when vrf flaps
Philippe Guibert [Thu, 19 Dec 2024 08:19:12 +0000 (09:19 +0100)]
bgpd, topotests: bmp imported bgp, add loc-rib peer up support when vrf flaps

Add the emission of a loc-rib peer up event for an imported bgp instance
when vrf state changes. Add a test to control in the BMP collector
that the peer up message is the one from that BGP instance.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd, topotests: bmp imported bgp, add loc-rib peer up support when router-id changes
Philippe Guibert [Thu, 19 Dec 2024 07:58:02 +0000 (08:58 +0100)]
bgpd, topotests: bmp imported bgp, add loc-rib peer up support when router-id changes

Add the emission of a loc-rib peer up event for an imported bgp instance
at route-id reconfiguration. Add a test to control in the BMP collector
that the peer up message is the one from that BGP instance.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd, topotests: bmp, add loc-rib peer up event for imported bgp
Philippe Guibert [Thu, 19 Dec 2024 07:36:12 +0000 (08:36 +0100)]
bgpd, topotests: bmp, add loc-rib peer up event for imported bgp

Add the emission of a loc-rib peer up event for an imported bgp instance
at import-vrf configuration. Add a test to control in the BMP collector
that the peer up message is the one from that BGP instance.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd: modify bmp_bgp_update_vrf_status() API
Philippe Guibert [Thu, 7 Nov 2024 09:30:03 +0000 (10:30 +0100)]
bgpd: modify bmp_bgp_update_vrf_status() API

The bgpbmp parameter is not used. Instead the bgp pointer, and
the vrf state are used.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd: bmp, fix memory leak in peer messages
Philippe Guibert [Tue, 17 Dec 2024 17:13:59 +0000 (18:13 +0100)]
bgpd: bmp, fix memory leak in peer messages

The following memory leak is observed when running bgp_bmp test.

> ==614841==ERROR: LeakSanitizer: detected memory leaks
>
> Direct leak of 81 byte(s) in 1 object(s) allocated from:
>     #0 0x7f0e9f2b4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
>     #1 0x7f0e9ec771f8 in qmalloc lib/memory.c:101
>     #2 0x7f0e9e5a2f89 in bmp_bgp_peer_vrf bgpd/bgp_bmp.c:2211
>     #3 0x7f0e9e5a31a8 in bmp_bgp_update_vrf_status bgpd/bgp_bmp.c:2247
>     #4 0x7f0e9e5b0325 in bmp_bgp_attribute_updated_instance bgpd/bgp_bmp.c:3476
>     #5 0x7f0e9e5b0661 in bmp_bgp_attribute_updated bgpd/bgp_bmp.c:3526
>     #6 0x7f0e9e5b08ae in bmp_routerid_update bgpd/bgp_bmp.c:3547
>     #7 0x55cdc4bcbd88 in hook_call_bgp_routerid_update bgpd/bgpd.c:89
>     #8 0x55cdc4bccf0b in bgp_router_id_set bgpd/bgpd.c:305
>     #9 0x55cdc4bcd87d in bgp_router_id_zebra_bump bgpd/bgpd.c:393
>     #10 0x55cdc4ba87d5 in bgp_router_id_update bgpd/bgp_zebra.c:99
>     #11 0x7f0e9ede3f0b in zclient_read lib/zclient.c:4626
>     #12 0x7f0e9ed8074d in event_call lib/event.c:1996
>     #13 0x7f0e9ec48933 in frr_run lib/libfrr.c:1232
>     #14 0x55cdc48a9a27 in main bgpd/bgp_main.c:555
>     #15 0x7f0e9e629d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
>
> Direct leak of 81 byte(s) in 1 object(s) allocated from:
>     #0 0x7f0e9f2b4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
>     #1 0x7f0e9ec771f8 in qmalloc lib/memory.c:101
>     #2 0x7f0e9e5a2ed8 in bmp_bgp_peer_vrf bgpd/bgp_bmp.c:2207
>     #3 0x7f0e9e5a31a8 in bmp_bgp_update_vrf_status bgpd/bgp_bmp.c:2247
>     #4 0x7f0e9e5b0325 in bmp_bgp_attribute_updated_instance bgpd/bgp_bmp.c:3476
>     #5 0x7f0e9e5b0661 in bmp_bgp_attribute_updated bgpd/bgp_bmp.c:3526
>     #6 0x7f0e9e5b08ae in bmp_routerid_update bgpd/bgp_bmp.c:3547
>     #7 0x55cdc4bcbd88 in hook_call_bgp_routerid_update bgpd/bgpd.c:89
>     #8 0x55cdc4bccf0b in bgp_router_id_set bgpd/bgpd.c:305
>     #9 0x55cdc4bcd87d in bgp_router_id_zebra_bump bgpd/bgpd.c:393
>     #10 0x55cdc4ba87d5 in bgp_router_id_update bgpd/bgp_zebra.c:99
>     #11 0x7f0e9ede3f0b in zclient_read lib/zclient.c:4626
>     #12 0x7f0e9ed8074d in event_call lib/event.c:1996
>     #13 0x7f0e9ec48933 in frr_run lib/libfrr.c:1232
>     #14 0x55cdc48a9a27 in main bgpd/bgp_main.c:555
>     #15 0x7f0e9e629d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
>
> Direct leak of 64 byte(s) in 1 object(s) allocated from:
>     #0 0x7f0e9f2b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
>     #1 0x7f0e9ec77235 in qcalloc lib/memory.c:106
>     #2 0x7f0e9e5a498d in bmp_imported_bgp_get bgpd/bgp_bmp.c:2441
>     #3 0x7f0e9e5acbed in bmp_import_vrf_magic bgpd/bgp_bmp.c:2855
>     #4 0x7f0e9e5a7f97 in bmp_import_vrf bgpd/bgp_bmp_clippy.c:147
>     #5 0x7f0e9ebb1178 in cmd_execute_command_real lib/command.c:1003
>     #6 0x7f0e9ebb1505 in cmd_execute_command lib/command.c:1062
>     #7 0x7f0e9ebb21d7 in cmd_execute lib/command.c:1228
>     #8 0x7f0e9ed90bf0 in vty_command lib/vty.c:626
>     #9 0x7f0e9ed95ad5 in vty_execute lib/vty.c:1389
>     #10 0x7f0e9ed9c01e in vtysh_read lib/vty.c:2408
>     #11 0x7f0e9ed8074d in event_call lib/event.c:1996
>     #12 0x7f0e9ec48933 in frr_run lib/libfrr.c:1232
>     #13 0x55cdc48a9a27 in main bgpd/bgp_main.c:555
>     #14 0x7f0e9e629d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
>
> Direct leak of 6 byte(s) in 1 object(s) allocated from:
>     #0 0x7f0e9f25b9a7 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:454
>     #1 0x7f0e9ec772fa in qstrdup lib/memory.c:118
>     #2 0x55cdc4b57d54 in af_rd_vpn_export_magic bgpd/bgp_vty.c:9814
>     #3 0x55cdc4b288d7 in af_rd_vpn_export bgpd/bgp_vty_clippy.c:3493
>     #4 0x7f0e9ebb1178 in cmd_execute_command_real lib/command.c:1003
>     #5 0x7f0e9ebb1505 in cmd_execute_command lib/command.c:1062
>     #6 0x7f0e9ebb21d7 in cmd_execute lib/command.c:1228
>     #7 0x7f0e9ed90bf0 in vty_command lib/vty.c:626
>     #8 0x7f0e9ed95ad5 in vty_execute lib/vty.c:1389
>     #9 0x7f0e9ed9c01e in vtysh_read lib/vty.c:2408
>     #10 0x7f0e9ed8074d in event_call lib/event.c:1996
>     #11 0x7f0e9ec48933 in frr_run lib/libfrr.c:1232
>     #12 0x55cdc48a9a27 in main bgpd/bgp_main.c:555
>     #13 0x7f0e9e629d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
>
> Indirect leak of 5 byte(s) in 1 object(s) allocated from:
>     #0 0x7f0e9f25b9a7 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:454
>     #1 0x7f0e9ec772fa in qstrdup lib/memory.c:118
>     #2 0x7f0e9e5a49ae in bmp_imported_bgp_get bgpd/bgp_bmp.c:2443
>     #3 0x7f0e9e5acbed in bmp_import_vrf_magic bgpd/bgp_bmp.c:2855
>     #4 0x7f0e9e5a7f97 in bmp_import_vrf bgpd/bgp_bmp_clippy.c:147
>     #5 0x7f0e9ebb1178 in cmd_execute_command_real lib/command.c:1003
>     #6 0x7f0e9ebb1505 in cmd_execute_command lib/command.c:1062
>     #7 0x7f0e9ebb21d7 in cmd_execute lib/command.c:1228
>     #8 0x7f0e9ed90bf0 in vty_command lib/vty.c:626
>     #9 0x7f0e9ed95ad5 in vty_execute lib/vty.c:1389
>     #10 0x7f0e9ed9c01e in vtysh_read lib/vty.c:2408
>     #11 0x7f0e9ed8074d in event_call lib/event.c:1996
>     #12 0x7f0e9ec48933 in frr_run lib/libfrr.c:1232
>     #13 0x55cdc48a9a27 in main bgpd/bgp_main.c:555
>     #14 0x7f0e9e629d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
>
> SUMMARY: AddressSanitizer: 237 byte(s) leaked in 5 allocation(s).

Fix this by freeing the missing memory block that helps building the
open message to send to remote bmp collector.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agotopotests: bgp_bmp, add test for import-vrf-view service
Philippe Guibert [Mon, 28 Oct 2024 17:52:58 +0000 (18:52 +0100)]
topotests: bgp_bmp, add test for import-vrf-view service

Add a test with a new peer defined in a VRF, and where
the BGP updates are imported in the BMP instance of the
default BGP instance.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd: bmp, handle imported bgp instances for bmp statistics
Philippe Guibert [Mon, 23 Sep 2024 13:03:15 +0000 (15:03 +0200)]
bgpd: bmp, handle imported bgp instances for bmp statistics

Only the BMP statistics of the current BGP instance are handled.
Extend the transmission of BMP statistics for imported BGP instances.
-  Separate the bmp_stats() function in two, and pass the bgp
instance to process its bgp peers, as a separate parameter.
- Pass the BGP peers from imported instances as parameter

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd: bmp, handle imported bgp instances in bmp_send_peerup()
Philippe Guibert [Mon, 23 Sep 2024 10:01:20 +0000 (12:01 +0200)]
bgpd: bmp, handle imported bgp instances in bmp_send_peerup()

When a BMP target comes up, only the peer up events of the
current BGP instance are sent.
- Apply the peer up event for external peers that are imported
by the BMP target.
- handle the peer up event when an imported vrf is
configured in a target.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd: bmp, handle imported bgp instances in bmp_mirror
Philippe Guibert [Fri, 20 Sep 2024 14:50:07 +0000 (16:50 +0200)]
bgpd: bmp, handle imported bgp instances in bmp_mirror

Modify the bmp_mirror() function to export the route update information
to all BMP instances importing it.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd: bmp, handle imported bgp instances in bmp_process
Philippe Guibert [Fri, 20 Sep 2024 11:47:17 +0000 (13:47 +0200)]
bgpd: bmp, handle imported bgp instances in bmp_process

Modify the bmp_process() function to export the route update information
to all BMP instances importing it.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd: bmp, handle imported bgp instances for peer up/down events
Philippe Guibert [Thu, 7 Nov 2024 13:28:39 +0000 (14:28 +0100)]
bgpd: bmp, handle imported bgp instances for peer up/down events

Only the peer transition events of the local BGP instance where BMP
is configured, were handled.
Add the support for peers from imported BGP instances:
- Add an internal API bmp_send_bt() function to handle stream
emission per bmp target
- Modify the BMP peer transition code to export the peer status
notifications to all BMP instances importing it.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd: bmp, handle imported bgp instances for route updates
Philippe Guibert [Fri, 20 Sep 2024 06:47:56 +0000 (08:47 +0200)]
bgpd: bmp, handle imported bgp instances for route updates

Upon route update, the list of available BGP instances that
import the BGP instance where this updates comes from, is checked.

For each eligible BGP instance, the route update is sent.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd: bmp, rework the bmp_route_update() function
Philippe Guibert [Thu, 19 Sep 2024 16:35:50 +0000 (18:35 +0200)]
bgpd: bmp, rework the bmp_route_update() function

Separate the bmp_route_update() function in two, by passing
the bgpbmp structure to the internal function instead of
the bgp instance.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd: add 'bmp import-vrf-view' command
Philippe Guibert [Thu, 19 Sep 2024 16:04:02 +0000 (18:04 +0200)]
bgpd: add 'bmp import-vrf-view' command

Add a configuration command to import BGP information from
another BGP instance. Specifically, it should be possible for
a user to have a BMP instance configured on the default VRF,
and be able to import the VRF information from the other BGP
VRF instances.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agobgpd: bmp, rename bmp->targets->bgp with peer->bgp
Philippe Guibert [Mon, 23 Sep 2024 11:23:34 +0000 (13:23 +0200)]
bgpd: bmp, rename bmp->targets->bgp with peer->bgp

Some BMP actions require to get the bgp instance of the
given peer. Instead of considering that the BGP BMP instance
is the BGP instance of the peer, let us use directly the
peer->bgp pointer.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agotests: ospf6_ecmp_inter_area, no shutdown r7/r8 eth3 17707/head
Martin Buck [Fri, 20 Dec 2024 17:55:26 +0000 (18:55 +0100)]
tests: ospf6_ecmp_inter_area, no shutdown r7/r8 eth3

Drop eth3 shutdown from ospf6d.conf - it doesn't do anything there. And it
actually shouldn't do anything: eth3 on r7/r8 are used as loopback-like
interfaces to inject the address on eth2 into OSPFv3. So they need to be up
for eth2 to work as expected.

Based on original PR#16811 commit:

    eth3 shutdown is not applied because it is ospf6d.conf.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
3 months agotests: ospf6_ecmp_inter_area, use router_json_cmp
Martin Buck [Fri, 20 Dec 2024 17:54:58 +0000 (18:54 +0100)]
tests: ospf6_ecmp_inter_area, use router_json_cmp

Use router_json_cmp when checking for proper nexthops to get better
diagnostics in case of mismatches. Add step() messages to see which check
failed.

Based on original PR#16811 commit:

    expect_num_nexthops() errors are not understandable.

    Use router_json_cmp.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
3 months agoMerge pull request #17733 from pguibert6WIND/bmp_event_changes
Russ White [Tue, 7 Jan 2025 14:06:43 +0000 (09:06 -0500)]
Merge pull request #17733 from pguibert6WIND/bmp_event_changes

BMP handling of BGP configuration changes

3 months agoMerge pull request #17771 from opensourcerouting/fix/show_ifindex_bgp
Russ White [Tue, 7 Jan 2025 14:03:33 +0000 (09:03 -0500)]
Merge pull request #17771 from opensourcerouting/fix/show_ifindex_bgp

bgpd: Show ifindex for every BGP nexthop cache entry

3 months agoMerge pull request #17773 from LabNConsulting/chopps/more-oper-test-fix
Russ White [Tue, 7 Jan 2025 14:02:41 +0000 (09:02 -0500)]
Merge pull request #17773 from LabNConsulting/chopps/more-oper-test-fix

tests: improve test reliability

3 months agoMerge pull request #17774 from famfo/doc/alpine
Russ White [Tue, 7 Jan 2025 14:01:29 +0000 (09:01 -0500)]
Merge pull request #17774 from famfo/doc/alpine

doc: fix building for alpine package path

3 months agoMerge pull request #17779 from anlancs/ospfd/fix-wrong-check-summary
Russ White [Tue, 7 Jan 2025 13:56:36 +0000 (08:56 -0500)]
Merge pull request #17779 from anlancs/ospfd/fix-wrong-check-summary

ospfd: fix wrong check for two commands

3 months agoMerge pull request #17667 from opensourcerouting/fix/withdraw_routes_regarless_of_coa...
Russ White [Tue, 7 Jan 2025 13:54:52 +0000 (08:54 -0500)]
Merge pull request #17667 from opensourcerouting/fix/withdraw_routes_regarless_of_coalescing_timer_to_expire_path_info_unusable

bgpd: Withdraw routes without waiting for the coalescing timer to expire

3 months agoMerge pull request #17474 from sougata-github-nvidia/rib_ip_protocol_cleanup
Russ White [Tue, 7 Jan 2025 13:45:07 +0000 (08:45 -0500)]
Merge pull request #17474 from sougata-github-nvidia/rib_ip_protocol_cleanup

zebra: Fix ip protocol route-map issue.