]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
3 months agobgpd: add 'match community-count' command to restrict comm count
Philippe Guibert [Fri, 10 Jan 2025 16:29:10 +0000 (17:29 +0100)]
bgpd: add 'match community-count' command to restrict comm count

Add a mechanism in route-map to filter out route-map which have a list
of communities greater than the given number.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
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 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 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 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 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 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.

3 months agoMerge pull request #17431 from krishna-samy/bgpd_json_commits
Russ White [Tue, 7 Jan 2025 13:43:55 +0000 (08:43 -0500)]
Merge pull request #17431 from krishna-samy/bgpd_json_commits

bgpd: show json output changes to optimize various show commands

3 months agotests: add test for new northbound get function 17783/head
Christian Hopps [Thu, 19 Dec 2024 13:58:03 +0000 (07:58 -0600)]
tests: add test for new northbound get function

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agolib: if.c use new get() oper callback
Christian Hopps [Sun, 24 Nov 2024 08:00:37 +0000 (03:00 -0500)]
lib: if.c use new get() oper callback

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agoMerge pull request #17780 from enkechen-panw/allowas-fix
Donatas Abraitis [Tue, 7 Jan 2025 11:13:36 +0000 (13:13 +0200)]
Merge pull request #17780 from enkechen-panw/allowas-fix

bgpd: fix a bug in peer_allowas_in_set()

3 months agotests: fe-client: only pick mgmtd FE notify selectors once 17782/head
Christian Hopps [Mon, 16 Dec 2024 07:09:46 +0000 (02:09 -0500)]
tests: fe-client: only pick mgmtd FE notify selectors once

- adapt fe_client to new notification message format

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agolib: add impl of NOTIF message ops (notif, replace, delete, patch)
Christian Hopps [Mon, 6 Jan 2025 12:57:24 +0000 (07:57 -0500)]
lib: add impl of NOTIF message ops (notif, replace, delete, patch)

- needed for supporting backend datastore notifications

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agolib: add NOTIF message ops (notification, replace, delete, patch)
Christian Hopps [Mon, 6 Jan 2025 12:39:39 +0000 (07:39 -0500)]
lib: add NOTIF message ops (notification, replace, delete, patch)

- needed for supporting backend datastore notifications

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agotools: add new-style get operation callback support
Christian Hopps [Mon, 30 Dec 2024 03:31:21 +0000 (22:31 -0500)]
tools: add new-style get operation callback support

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agolib: northbound: add new get() callback to add lyd_node direclty
Christian Hopps [Sun, 24 Nov 2024 07:56:22 +0000 (02:56 -0500)]
lib: northbound: add new get() callback to add lyd_node direclty

This allows eliminating the superfluous yang_data object (which
is getting created used to call lyd_new_term then deleted). Instead
just call lyd_new_term() in the callback directly.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agotools: we specifically added %Lu to our sprintfrr so allow it 17772/head
Christian Hopps [Tue, 7 Jan 2025 06:34:13 +0000 (01:34 -0500)]
tools: we specifically added %Lu to our sprintfrr so allow it

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agotests: add unit test case for keyless list xpath queries 17781/head
Christian Hopps [Tue, 7 Jan 2025 05:15:12 +0000 (00:15 -0500)]
tests: add unit test case for keyless list xpath queries

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agolib: northbound oper: fix keyless position predicate queries
Christian Hopps [Tue, 7 Jan 2025 05:10:27 +0000 (00:10 -0500)]
lib: northbound oper: fix keyless position predicate queries

- i.e., `show /foos/foo[1]`

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agobgpd: fix a bug in peer_allowas_in_set() 17780/head
Enke Chen [Tue, 7 Jan 2025 05:01:14 +0000 (21:01 -0800)]
bgpd: fix a bug in peer_allowas_in_set()

Fix a bug in peer_allowas_in_set() so that the config takes effect
for peer-group members.

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
3 months agoospfd: fix wrong check for two commands 17779/head
anlan_cs [Tue, 7 Jan 2025 02:55:02 +0000 (10:55 +0800)]
ospfd: fix wrong check for two commands

The users would know the failure of some case for the two commands, just
return the error ```CMD_WARNING_CONFIG_FAILED```.

Signed-off-by: anlan_cs <anlan_cs@126.com>
3 months agoMerge pull request #17770 from opensourcerouting/fix/BGP_NEXTHOP_EVPN_INCOMPLETE
Donald Sharp [Mon, 6 Jan 2025 18:25:02 +0000 (13:25 -0500)]
Merge pull request #17770 from opensourcerouting/fix/BGP_NEXTHOP_EVPN_INCOMPLETE

bgpd: Use unique value for BGP_NEXTHOP_EVPN_INCOMPLETE flag

3 months agodoc: fix building-for-alpine package path 17774/head
famfo [Mon, 6 Jan 2025 15:23:41 +0000 (16:23 +0100)]
doc: fix building-for-alpine package path

Signed-off-by: famfo <famfo@famfo.xyz>
3 months agotests: improve test reliability 17773/head
Christian Hopps [Sun, 24 Nov 2024 08:06:05 +0000 (03:06 -0500)]
tests: improve test reliability

Test for presence of IPv6 kernel routes too.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agolib: change and improve walk finish callback function API
Christian Hopps [Sun, 5 Jan 2025 05:29:05 +0000 (00:29 -0500)]
lib: change and improve walk finish callback function API

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agomgmtd: improve debug statement
Christian Hopps [Mon, 6 Jan 2025 13:07:23 +0000 (08:07 -0500)]
mgmtd: improve debug statement

Signed-off-by: Christian Hopps <chopps@labn.net>
3 months agobgpd: Show ifindex for every BGP nexthop cache entry 17771/head
Donatas Abraitis [Sun, 5 Jan 2025 19:56:44 +0000 (21:56 +0200)]
bgpd: Show ifindex for every BGP nexthop cache entry

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 months agobgpd: Use unique value for BGP_NEXTHOP_EVPN_INCOMPLETE flag 17770/head
Donatas Abraitis [Sun, 5 Jan 2025 19:42:18 +0000 (21:42 +0200)]
bgpd: Use unique value for BGP_NEXTHOP_EVPN_INCOMPLETE flag

This was reused with BGP_NEXTHOP_ULTIMATE by error.

Fixes: 93fd9cbb5022e0c40827cd6d6ef339624a8b5daa ("bgpd: Validate imported routes next-hop that is in a default VRF")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 months agozebra: Fix ip protocol route-map issue. 17474/head
Sougata Barik [Wed, 30 Oct 2024 09:30:32 +0000 (02:30 -0700)]
zebra: Fix ip protocol route-map issue.

"ip/ipv6 protocol any route-map <route map>" cli is setting
wrong route type ( ZEBRA_ROUTE_MAX ), It should set route type
ZEBRA_ROUTE_ALL.

Ticket: #4101560

Signed-off-by: Sougata Barik <sougatab@nvidia.com>
3 months agoMerge pull request #17752 from raja-rajasekar/rajasekarr/comp_issue
Jafar Al-Gharaibeh [Mon, 6 Jan 2025 02:15:20 +0000 (20:15 -0600)]
Merge pull request #17752 from raja-rajasekar/rajasekarr/comp_issue

zebra: fix dpdk compilation error

3 months agoMerge pull request #17750 from jvoss/vrf_rpki
Donatas Abraitis [Sat, 4 Jan 2025 11:52:40 +0000 (13:52 +0200)]
Merge pull request #17750 from jvoss/vrf_rpki

tools: Add missing rpki keyword to vrf in frr-reload

3 months agoMerge pull request #17715 from ykholod/master-17413-1
Donatas Abraitis [Sat, 4 Jan 2025 11:51:03 +0000 (13:51 +0200)]
Merge pull request #17715 from ykholod/master-17413-1

babel: Clean babel related config on daemon stop

3 months agoMerge pull request #17762 from anlancs/fix/ospf-minor-word
Donatas Abraitis [Sat, 4 Jan 2025 11:49:22 +0000 (13:49 +0200)]
Merge pull request #17762 from anlancs/fix/ospf-minor-word

ospfd: Correct one word

3 months agozebra: fix dpdk compilation error 17752/head
Rajasekar Raja [Fri, 3 Jan 2025 07:15:12 +0000 (23:15 -0800)]
zebra: fix dpdk compilation error

Fixing compilation error in a switch statement case

Fixes :aa4786642c9a65c282d0fd5247a35b0f14fa1c3c

Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
3 months agoospfd: Correct one word 17762/head
anlan_cs [Fri, 3 Jan 2025 14:55:40 +0000 (22:55 +0800)]
ospfd: Correct one word

Signed-off-by: anlan_cs <anlan_cs@126.com>
3 months agoMerge pull request #17732 from opensourcerouting/fix/isisd_detail_json
Mark Stapp [Fri, 3 Jan 2025 12:37:05 +0000 (07:37 -0500)]
Merge pull request #17732 from opensourcerouting/fix/isisd_detail_json

isisd: Show correct level information for `show isis interface detail json`

3 months agoMerge pull request #17737 from chiragshah6/fdev7
Donatas Abraitis [Fri, 3 Jan 2025 07:34:54 +0000 (09:34 +0200)]
Merge pull request #17737 from chiragshah6/fdev7

zebra:check DAD freeze action before notifying bgp

3 months agotools: Add missing rpki keyword to vrf in frr-reload 17750/head
Jonathan Voss [Fri, 3 Jan 2025 03:19:30 +0000 (03:19 +0000)]
tools: Add missing rpki keyword to vrf in frr-reload

When reloading the following configuration:
```
vrf red
 rpki
  rpki cache tcp 172.65.0.2 8282 preference 1
 exit
exit-vrf
```
frr-reload.py does not properly enter the `rpki` context
within a `vrf`. Because of this, it fails to apply RPKI
configurations.

Signed-off-by: Jonathan Voss <jvoss@onvox.net>
3 months agoMerge pull request #17726 from guoguojia2021/static_fix
Donatas Abraitis [Thu, 2 Jan 2025 11:22:54 +0000 (13:22 +0200)]
Merge pull request #17726 from guoguojia2021/static_fix

staticd: Reduce the frequency of adding routes

3 months agobabel: Clean babel related config on daemon stop 17715/head
Yaroslav Kholod [Mon, 23 Dec 2024 11:06:57 +0000 (13:06 +0200)]
babel: Clean babel related config on daemon stop

When deactivating babel no router babel and later re-enabling it router babel the previous configuration is still in place.

Steps to reproduce:

    Enable babel
    Configure babel
    Disable babel with "no router babel"
    Verify config

Expected correct behavior: No config present

Signed-off-by: Yaroslav Kholod <y.kholod@vyos.io>
3 months agoMerge pull request #17716 from ykholod/master-17463
Donatas Abraitis [Wed, 1 Jan 2025 19:16:39 +0000 (21:16 +0200)]
Merge pull request #17716 from ykholod/master-17463

bgpd: Clean address-family config on daemon restart

3 months agoMerge pull request #17728 from dmytroshytyi-6WIND/bgp_rpki_state
Donatas Abraitis [Wed, 1 Jan 2025 19:15:42 +0000 (21:15 +0200)]
Merge pull request #17728 from dmytroshytyi-6WIND/bgp_rpki_state

bgpd: add rpki current state

3 months agoMerge pull request #17731 from raja-rajasekar/rajasekarr/stale_nhg_link_flap_4200788
Donatas Abraitis [Tue, 31 Dec 2024 13:39:40 +0000 (15:39 +0200)]
Merge pull request #17731 from raja-rajasekar/rajasekarr/stale_nhg_link_flap_4200788

zebra: Fix resetting valid flags for NHG dependents

3 months agoMerge pull request #17719 from jvoss/srv6_format
Donatas Abraitis [Tue, 31 Dec 2024 13:33:21 +0000 (15:33 +0200)]
Merge pull request #17719 from jvoss/srv6_format

tools: Add missing formats keyword to segment-routing in frr-reload

3 months agozebra:check DAD freeze action before notifying bgp 17737/head
Chirag Shah [Wed, 1 Nov 2023 05:11:04 +0000 (22:11 -0700)]
zebra:check DAD freeze action before notifying bgp

If Duplicate Address Detection action is freeze
(permanent or definite time means not warn only mode)
then locally duplicate detected MAC delete notification
is not require to inform,
instead ask BGP to sync previous remote MAC entry.
In freeze case local MAC event is not known to BGP,
instead BGP is pointing to remote VTEP for the MAC.

Ticket: #3652383
Issue: 3652383

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 months agozebra: Fix resetting valid flags for NHG dependents 17731/head
Donald Sharp [Sun, 29 Dec 2024 06:40:37 +0000 (22:40 -0800)]
zebra: Fix resetting valid flags for NHG dependents

Upon if_down, we don't reset the valid flag for dependents
and unset the INSTALLED flag.

So when its time for the NHG to be deleted (routes dereferenced),
zebra deletes it since refcnt goes to 0, but stale NHG remains in kernel.

Ticket :#4200788

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
3 months agotopotests: bgp_bmp, add peer message test when RD changes 17733/head
Philippe Guibert [Mon, 30 Dec 2024 09:41:32 +0000 (10:41 +0100)]
topotests: bgp_bmp, add peer message test when RD changes

Add a test to control the peer up and down message sent when the route
distinguisher is updated.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agotopotests: bmp_collector, fix display peer distinguisher IP:AS2B
Philippe Guibert [Tue, 3 Dec 2024 07:30:54 +0000 (08:30 +0100)]
topotests: bmp_collector, fix display peer distinguisher IP:AS2B

The peer distinguisher format was badly displayed when a per peer
header is sent with an IP:AS2B format.

>  {"peer_type": "loc-rib instance", "is_filtered": false, "policy": "loc-rib",
> "peer_distinguisher": "None:2", ...

The IP header is incorrectly read. Fix it.

> {"peer_type": "loc-rib instance", "is_filtered": false, "policy": "loc-rib",
> "peer_distinguisher": "3.3.3.5:2", ...

Fixes: 875511c46676 ("topotests: add basic bmp collector")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 months agotopotests: bgp_bmp, add peer up message test when router-id changes
Philippe Guibert [Thu, 19 Dec 2024 08:01:12 +0000 (09:01 +0100)]
topotests: bgp_bmp, add peer up message test when router-id changes

Add a test to control the value of the peer bgp id of loc-rib peer up
messages when the bgp router-id is reconfigured.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>