]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
13 months agobgpd: add cli command to control explicit-null label usage
Philippe Guibert [Fri, 17 Mar 2023 13:46:13 +0000 (14:46 +0100)]
bgpd: add cli command to control explicit-null label usage

In BGP labeled unicast address-family, it is not possible to
send explicit-null label values with redistributed or network
declared prefixes.
A new CLI command is introduced:

  > [no] bgp labeled-unicast explicit-null

When used, the explicit-null value for IPv4 ('0' value) or
IPv6 ('2' value) will be used.
It is necessary to reconfigure the networks or the
redistribution in order to inherit this new behaviour.

Add the documentation.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
13 months agoMerge pull request #13247 from donaldsharp/evpn_crashes_and_other_ilk
Christian Hopps [Tue, 11 Apr 2023 06:35:26 +0000 (02:35 -0400)]
Merge pull request #13247 from donaldsharp/evpn_crashes_and_other_ilk

Evpn crashes and other ilk

13 months agobgpd: Do not allow a `no router bgp XXX` when autoimport is happening
Donald Sharp [Mon, 10 Apr 2023 18:04:27 +0000 (14:04 -0400)]
bgpd: Do not allow a `no router bgp XXX` when autoimport is happening

When we have these sequence of events causing a crash in
evpn_type5_test_topo1:

(A) no router bgp vrf RED 100
   this schedules for deletion the vrf RED instance
(B) a l3vni change event from zebra
   this creates a bgp instance for VRF RED in some cases
   additionally it auto imports evpn routes into VRF RED
   Please note this is desired behavior to allow for the
   auto importation of evpn vrf routes
(C) no router bgp 100
   The code was allowing the deletion of the default
   instance and causing tests to crash.

Effectively the test in bgp_vty to allow/dissallow
the removal of the default instance was not correct
for the case when (B) happens.

Let's just not allow the command to succeed in this case as that
the test was wrong.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agobgpd: Do not allow l3vni changes when shutting down
Donald Sharp [Mon, 10 Apr 2023 17:59:48 +0000 (13:59 -0400)]
bgpd: Do not allow l3vni changes when shutting down

When a `no router bgp XXX` is issued and the bgp instance
is in the process of shutting down, do not allow a l3vni
change coming up from zebra to do anything.  We can just
safely ignore it at this point in time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agobgpd: Use the actual pointer type instead of a void
Donald Sharp [Mon, 10 Apr 2023 18:02:18 +0000 (14:02 -0400)]
bgpd: Use the actual pointer type instead of a void

Let's cut to the chase, we know the pointer type and
it allows us to not to some gyrations.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agoMerge pull request #13239 from opensourcerouting/fix/enable_scripting_for_docker_alpi...
Jafar Al-Gharaibeh [Mon, 10 Apr 2023 16:29:20 +0000 (11:29 -0500)]
Merge pull request #13239 from opensourcerouting/fix/enable_scripting_for_docker_alpine_build

docker: Fix --enable-scripting for Docker images

13 months agotests: Copy script1.lua for make dist
Donatas Abraitis [Sat, 8 Apr 2023 15:00:53 +0000 (18:00 +0300)]
tests: Copy script1.lua for make dist

This is needed for `make dist` when building Docker images with Lua support.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
13 months agodocker: Enable Lua (scripting) for Alpine images
Donatas Abraitis [Sat, 8 Apr 2023 15:00:20 +0000 (18:00 +0300)]
docker: Enable Lua (scripting) for Alpine images

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
13 months agobuild: Take LUA_LIBS from pkg-config
Donatas Abraitis [Sat, 8 Apr 2023 14:59:51 +0000 (17:59 +0300)]
build: Take LUA_LIBS from pkg-config

Alpine Linux has LUA_LIB with a broken path, let's use pkg-config to grab
the LUA_LIBS properly.

checking for library containing lua_load... no
configure: error: Lua 5.3 libraries are required to build with Lua support. No other version is supported.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
13 months agoMerge pull request #13237 from LabNConsulting/chopps/fixriptest
Donald Sharp [Sat, 8 Apr 2023 13:23:22 +0000 (09:23 -0400)]
Merge pull request #13237 from LabNConsulting/chopps/fixriptest

tests: fix cause of intermittent failure

13 months agotests: fix cause of intermittent failure
Christian Hopps [Sat, 8 Apr 2023 00:01:33 +0000 (00:01 +0000)]
tests: fix cause of intermittent failure

Signed-off-by: Christian Hopps <chopps@labn.net>
13 months agoMerge pull request #13109 from LabNConsulting/topotest-cleanup
Jafar Al-Gharaibeh [Fri, 7 Apr 2023 19:45:33 +0000 (14:45 -0500)]
Merge pull request #13109 from LabNConsulting/topotest-cleanup

minor topotest cleanup

13 months agoMerge pull request #13228 from LabNConsulting/chopps/json-via-yang
Igor Ryzhov [Fri, 7 Apr 2023 14:56:54 +0000 (17:56 +0300)]
Merge pull request #13228 from LabNConsulting/chopps/json-via-yang

Update ripd YANG operational state (ECMP routes)

13 months agotests: Check if RIP `allow-ecmp` command works correctly
Donatas Abraitis [Mon, 3 Apr 2023 11:07:41 +0000 (14:07 +0300)]
tests: Check if RIP `allow-ecmp` command works correctly

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Signed-off-by: Christian Hopps <chopps@labn.net>
13 months agoripd: implement new YANG operational state
Christian Hopps [Thu, 6 Apr 2023 22:23:31 +0000 (18:23 -0400)]
ripd: implement new YANG operational state

Signed-off-by: Christian Hopps <chopps@labn.net>
13 months agoripd: yang: extend nexthops functionality in YANG model - skeleton
Christian Hopps [Thu, 6 Apr 2023 21:28:37 +0000 (17:28 -0400)]
ripd: yang: extend nexthops functionality in YANG model - skeleton

Signed-off-by: Christian Hopps <chopps@labn.net>
13 months agoMerge pull request #13162 from donaldsharp/pass_by_value_no_no_no
Donatas Abraitis [Fri, 7 Apr 2023 07:19:09 +0000 (10:19 +0300)]
Merge pull request #13162 from donaldsharp/pass_by_value_no_no_no

*: Use a `struct prefix *p` instead of a `struct prefix` in functions

13 months agoMerge pull request #13222 from donaldsharp/limit_scope
Donatas Abraitis [Fri, 7 Apr 2023 07:14:54 +0000 (10:14 +0300)]
Merge pull request #13222 from donaldsharp/limit_scope

Limit scope

13 months agotests: don't warn with expected results
Christian Hopps [Fri, 7 Apr 2023 05:58:15 +0000 (05:58 +0000)]
tests: don't warn with expected results

Signed-off-by: Christian Hopps <chopps@labn.net>
13 months agotests: initialize parent test namespace too
Christian Hopps [Fri, 24 Mar 2023 22:02:16 +0000 (18:02 -0400)]
tests: initialize parent test namespace too

Signed-off-by: Christian Hopps <chopps@labn.net>
13 months agotests: cleanup infra
Christian Hopps [Fri, 24 Mar 2023 21:59:33 +0000 (17:59 -0400)]
tests: cleanup infra

Signed-off-by: Christian Hopps <chopps@labn.net>
13 months agotests: create 8 link, switch pairs, not 8 links on one switch
Christian Hopps [Fri, 24 Mar 2023 21:58:21 +0000 (17:58 -0400)]
tests: create 8 link, switch pairs, not 8 links on one switch

Signed-off-by: Christian Hopps <chopps@labn.net>
13 months agotests: don't flush ipv6 addresses
Christian Hopps [Fri, 24 Mar 2023 21:58:01 +0000 (17:58 -0400)]
tests: don't flush ipv6 addresses

Signed-off-by: Christian Hopps <chopps@labn.net>
13 months agoyang: fix YANG lint
Christian Hopps [Thu, 6 Apr 2023 10:39:06 +0000 (06:39 -0400)]
yang: fix YANG lint

Signed-off-by: Christian Hopps <chopps@labn.net>
13 months ago*: Use a `struct prefix *p` instead of a `struct prefix` in functions
Donald Sharp [Thu, 30 Mar 2023 19:48:53 +0000 (15:48 -0400)]
*: Use a `struct prefix *p` instead of a `struct prefix` in functions

When passing a prefix into a function let's pass by address instead
of pass by value.  Let's save our stack space.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agobgpd: Treat withdraw variable as a bool
Donald Sharp [Wed, 5 Apr 2023 19:25:57 +0000 (15:25 -0400)]
bgpd: Treat withdraw variable as a bool

Used as a bool, treated as a bool.  Make it a bool

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agobgpd: Limit flowspec to no attribute means a implicit withdrawal
Donald Sharp [Wed, 5 Apr 2023 18:57:05 +0000 (14:57 -0400)]
bgpd: Limit flowspec to no attribute means a implicit withdrawal

All other parsing functions done from bgp_nlri_parse() assume
no attributes == an implicit withdrawal.  Let's move
bgp_nlri_parse_flowspec() into the same alignment.

Reported-by: Matteo Memelli <mmemelli@amazon.it>
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agobgpd: Conform bgp_packet.h with coding standards
Donald Sharp [Wed, 5 Apr 2023 18:51:47 +0000 (14:51 -0400)]
bgpd: Conform bgp_packet.h with coding standards

FRR's standards state that function declarations should
have actual variable names for parameters passed in.
Let's make this so for bgp_packet.h

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agoMerge pull request #13214 from chiragshah6/fdev2
Donatas Abraitis [Thu, 6 Apr 2023 09:48:52 +0000 (12:48 +0300)]
Merge pull request #13214 from chiragshah6/fdev2

zebra:return empty dict in json when evpn is disabled

13 months agoMerge pull request #13220 from mjstapp/fix_zebra_gr_client
Jafar Al-Gharaibeh [Thu, 6 Apr 2023 03:53:00 +0000 (22:53 -0500)]
Merge pull request #13220 from mjstapp/fix_zebra_gr_client

zebra: null-check client pointer during GR processing

13 months agozebra: null-check client pointer during GR processing
Mark Stapp [Wed, 5 Apr 2023 16:30:52 +0000 (12:30 -0400)]
zebra: null-check client pointer during GR processing

Add a null check.

Signed-off-by: Mark Stapp <mjs@labn.net>
13 months agoMerge pull request #13194 from Keelan10/sharpd-memory-leak
Donatas Abraitis [Wed, 5 Apr 2023 07:05:49 +0000 (10:05 +0300)]
Merge pull request #13194 from Keelan10/sharpd-memory-leak

[WIP] sharpd: fix leak

13 months agozebra:return empty dict when evpn is disabled
Sindhu Parvathi Gopinathan [Tue, 4 Apr 2023 12:38:28 +0000 (05:38 -0700)]
zebra:return empty dict when evpn is disabled

"show evpn json" returns nothing when evpn is disabled.

Code has been fixed to return {} when evpn is disabled or no entry
available.

Before Fix:-
```
cumulus@r2:mgmt:~$ sudo vtysh -c "show evpn json"
cumulus@r2:mgmt:~$
```

After Fix:-
```
cumulus@r1:mgmt:~$ sudo vtysh -c "show evpn json"
{
}
cumulus@r1:mgmt:~$
```

Ticket:#3417955

Issue:3417955

Testing: UT done

Signed-off-by: Chirag Shah <chirag@nvidia.com>
Signed-off-by: Sindhu Parvathi Gopinathan <sgopinathan@nvidia.com>
13 months agoMerge pull request #13145 from donaldsharp/do_delete
Jafar Al-Gharaibeh [Wed, 5 Apr 2023 02:10:54 +0000 (21:10 -0500)]
Merge pull request #13145 from donaldsharp/do_delete

Improve and fix zebra GR

13 months agoMerge pull request #13206 from opensourcerouting/fix/docker_build_alpine_protobuf
Jafar Al-Gharaibeh [Tue, 4 Apr 2023 18:36:28 +0000 (13:36 -0500)]
Merge pull request #13206 from opensourcerouting/fix/docker_build_alpine_protobuf

docker: Install missing dependencies for Alpine build

13 months agoMerge pull request #13200 from kuldeepkash/socat_cleanup
Jafar Al-Gharaibeh [Tue, 4 Apr 2023 18:36:03 +0000 (13:36 -0500)]
Merge pull request #13200 from kuldeepkash/socat_cleanup

tests: [topojson] multicast pimv6 socat cleanup

13 months agoMerge pull request #13209 from LabNConsulting/chopps/log-redux
Jafar Al-Gharaibeh [Tue, 4 Apr 2023 18:34:51 +0000 (13:34 -0500)]
Merge pull request #13209 from LabNConsulting/chopps/log-redux

tests: lower logging level on some infra logs

13 months agoMerge pull request #13160 from chiragshah6/fdev2
Russ White [Tue, 4 Apr 2023 14:02:48 +0000 (10:02 -0400)]
Merge pull request #13160 from chiragshah6/fdev2

ospfd:display correct DR-BDR router-id in nbr cmd

13 months agoMerge pull request #13192 from anlancs/fix/ripd-wrong-routemap
Russ White [Tue, 4 Apr 2023 13:50:02 +0000 (09:50 -0400)]
Merge pull request #13192 from anlancs/fix/ripd-wrong-routemap

ripd: Fix malformed route-map

13 months agoMerge pull request #13199 from pguibert6WIND/isis_ipv4_linklocal
Russ White [Tue, 4 Apr 2023 13:48:11 +0000 (09:48 -0400)]
Merge pull request #13199 from pguibert6WIND/isis_ipv4_linklocal

isisd: consider link local ipv4 addresses as valid

13 months agoMerge pull request #13131 from LabNConsulting/chopps/no-startup-file
Jafar Al-Gharaibeh [Tue, 4 Apr 2023 13:42:04 +0000 (08:42 -0500)]
Merge pull request #13131 from LabNConsulting/chopps/no-startup-file

mgmtd: remove startup config feature for now

13 months agoMerge pull request #12969 from opensourcerouting/ospfd-nssa
Russ White [Tue, 4 Apr 2023 13:38:55 +0000 (09:38 -0400)]
Merge pull request #12969 from opensourcerouting/ospfd-nssa

ospfd: implement NSSA default routes & ranges

13 months agoMerge pull request #12837 from donaldsharp/unlikely_routemap
Russ White [Tue, 4 Apr 2023 12:20:25 +0000 (08:20 -0400)]
Merge pull request #12837 from donaldsharp/unlikely_routemap

Unlikely routemap

13 months agotests: lower logging level on some infra logs
Christian Hopps [Tue, 4 Apr 2023 10:21:14 +0000 (10:21 +0000)]
tests: lower logging level on some infra logs

Signed-off-by: Christian Hopps <chopps@labn.net>
13 months agodocker: Install missing dependencies for Alpine build
Donatas Abraitis [Tue, 4 Apr 2023 08:18:30 +0000 (11:18 +0300)]
docker: Install missing dependencies for Alpine build

protobuf-c-compiler
protobuf-c-dev

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
13 months agoMerge pull request #13198 from mxyns/bmp-fix-peerup-port
Donatas Abraitis [Tue, 4 Apr 2023 07:49:09 +0000 (10:49 +0300)]
Merge pull request #13198 from mxyns/bmp-fix-peerup-port

bgpd: bmp fix peer-up ports byte order

13 months agoMerge pull request #13181 from taspelund/route_origin_extcom_parse_fix
Donatas Abraitis [Tue, 4 Apr 2023 07:24:44 +0000 (10:24 +0300)]
Merge pull request #13181 from taspelund/route_origin_extcom_parse_fix

bgpd: fix ecommunity parsing for AS4

13 months agoisisd: consider link local ipv4 addresses as valid
Philippe Guibert [Mon, 3 Apr 2023 16:06:48 +0000 (18:06 +0200)]
isisd: consider link local ipv4 addresses as valid

It is not possible to create an adjacency by using interface
addresses within the `169.254.0.0/24` pool.

When forging the IIH messages, the interface addresses from
that pool are not appended:

> Neither IPv4 nor IPv6 considered usable. Ignoring IIH

Using this network pool is possible on other IS-IS
implementations. Let us authorize to use such network
addresses.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
13 months agoMerge pull request #13191 from opensourcerouting/fix/add_missing_rfc9384
Jafar Al-Gharaibeh [Tue, 4 Apr 2023 04:16:08 +0000 (23:16 -0500)]
Merge pull request #13191 from opensourcerouting/fix/add_missing_rfc9384

doc: Add missing rfc9384 to BGP supported RFC list

13 months agotests: [topojson] multicast pimv6 socat cleanup
Kuldeep Kashyap [Tue, 4 Apr 2023 02:33:21 +0000 (08:03 +0530)]
tests: [topojson] multicast pimv6 socat cleanup

For multicast pimv6 join and traffic, socat is
used, which was not cleaned up post tests executions,
enhanced kill_socat() API to kill socat join and
traffic specific PIDs during teardown module.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
13 months agotests: add test to validate 4-byte ecomm parsing
Trey Aspelund [Mon, 3 Apr 2023 21:03:40 +0000 (21:03 +0000)]
tests: add test to validate 4-byte ecomm parsing

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
13 months agobgpd: fix ecommunity parsing for AS4
Trey Aspelund [Fri, 31 Mar 2023 21:46:21 +0000 (17:46 -0400)]
bgpd: fix ecommunity parsing for AS4

The parser for extended communities was incorrectly disallowing an
operator from configuring "Route Origin" extended communities
(e.g. RD/RT/SoO) with a 4-byte value matching BGP_AS4_MAX (UINT32_MAX)
and allowed the user to overflow UINT32_MAX. This updates the parser to
read the value as a uint64_t so that we can do proper checks on the
upper bounds (> BGP_AS4_MAX || errno).

before:
```
TORC11(config-router-af)# neighbor uplink-1 soo 4294967296:65
TORC11(config-router-af)# do sh run | include soo
  neighbor uplink-1 soo 0:65
TORC11(config-router-af)# neighbor uplink-1 soo 4294967295:65
% Malformed SoO extended community
TORC11(config-router-af)#
```

after:
```
TORC11(config-router-af)# neighbor uplink-1 soo 4294967296:65
% Malformed SoO extended community
TORC11(config-router-af)# neighbor uplink-1 soo 4294967295:65
TORC11(config-router-af)# do sh run | include soo
  neighbor uplink-1 soo 4294967295:65
TORC11(config-router-af)#
```

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
13 months agobgpd: bmp fix peer-up ports byte order
Maxence Younsi [Mon, 3 Apr 2023 15:19:32 +0000 (17:19 +0200)]
bgpd: bmp fix peer-up ports byte order

added htons to ports in the peer-up message to fix byte order

Signed-off-by: Maxence Younsi <mx.yns@outlook.fr>
13 months agosharpd: Fix sharpd memory leak
Keelan10 [Mon, 3 Apr 2023 07:36:33 +0000 (11:36 +0400)]
sharpd: Fix sharpd memory leak

Free path

Signed-off-by: Keelan Cannoo <keelan.cannoo@icloud.com>
13 months agoripd: Fix malformed route-map
anlan_cs [Sun, 2 Apr 2023 00:33:25 +0000 (08:33 +0800)]
ripd: Fix malformed route-map

Currently the process of the `route-map` configuration for `per-vrf-rip`
is wrong.

There are two problems:
1. `ctx->name` for `if_rmap_ctx`  is not initialized in `if_rmap_ctx_create()`.
2.  The global `if_rmap_ctx_list` is wrongly used for `per-vrf-rip`.

So, two changes for it:
1. Correctly initializes `ctx->name`.
2. Use specific `if_rmap_ctx` for `per-vrf-rip`, not global one.

Note, this related implementation for `route-map` is only for `ripd`.

Before:
```
anlan(config)# route rip vrf vrf1
anlan(config-router)# route-map aa in lan
anlan(config-router)# do show run
!
router rip
 route-map aa in lan
exit
!
```

After:
```
anlan(config)# route rip vrf vrf1
anlan(config-router)# route-map aa in lan
anlan(config-router)# do show run
!
router rip vrf vrf1
 route-map aa in lan
exit
!
```

Signed-off-by: anlan_cs <vic.lan@pica8.com>
13 months agoospfd:display correct DR-BDR router-id in nbr cmd
Sindhu Parvathi Gopinathan [Thu, 23 Mar 2023 11:30:55 +0000 (04:30 -0700)]
ospfd:display correct DR-BDR router-id in nbr cmd

ospf neighbor DR and BDR router-id wrongly displays with interface
ip-address instead of router-id.

It is fixed to display the correct DR & BDR router-id  for
JSON and CLI commands.

Commands:
```
show ip ospf vrf <vrf-name> neighbor detail json
show ip ospf vrf <vrf-name> neighbor detail
```

Before Fix:-
```
r1# show ip ospf vrf default neighbor  swp1 detail
 Neighbor 0.0.0.17, interface address 11.0.0.1
    In the area 0.0.0.0 via interface swp1 local interface IP 11.0.0.2
    Neighbor priority is 1, State is Full, Role is DR, 6 state changes
    Most recent state change statistics:
      Progressive change 1d15h05m ago
    DR is 11.0.0.1, BDR is 11.0.0.2 ======> DR and BDR shows the intef &
local intf ipaddress
    Options 2 *|-|-|-|-|-|E|-
    Dead timer due in 35.178s
    Database Summary List 0
    Link State Request List 0
    Link State Retransmission List 0
    Thread Inactivity Timer on
    Thread Database Description Retransmision off
    Thread Link State Request Retransmission on
    Thread Link State Update Retransmission on

r1#

r1# show ip ospf vrf default neighbor  swp1 detail json
{
  "0.0.0.17":[
    {
      "ifaceAddress":"11.0.0.1",
      "areaId":"0.0.0.0",
      "ifaceName":"swp1",
      "localIfaceAddress":"11.0.0.2",
      "nbrPriority":1,
      "nbrState":"Full",
      "role":"DR",
      "stateChangeCounter":6,
      "lastPrgrsvChangeMsec":141141533,
      "routerDesignatedId":"11.0.0.1", =============> interface ip
instead of DR rotuer-id
      "routerDesignatedBackupId":"11.0.0.2", =======> lo-interface ip
instead of BDR rotuer-id
      "optionsCounter":2,
      "optionsList":"*|-|-|-|-|-|E|-",
      "routerDeadIntervalTimerDueMsec":32272,
      "databaseSummaryListCounter":0,
      "linkStateRequestListCounter":0,
      "linkStateRetransmissionListCounter":0,
      "threadInactivityTimer":"on",
      "threadLinkStateRequestRetransmission":"on",
      "threadLinkStateUpdateRetransmission":"on"
    }
  ]
}
r1#
```

After Fix:-
```
r1# show ip ospf vrf default neighbor detail json
{
  "default":{
    "vrfName":"default",
    "vrfId":0,
    "neighbors":{
      "0.0.0.17":[
        {
          "ifaceAddress":"11.0.0.1",
          "areaId":"0.0.0.0",
          "ifaceName":"swp1",
          "localIfaceAddress":"11.0.0.2",
          "nbrPriority":1,
          "nbrState":"Full",
          "role":"DR",
          "stateChangeCounter":6,
          "lastPrgrsvChangeMsec":4531505,
          "routerDesignatedId":"0.0.0.17", =====> DR Router-Id
          "routerDesignatedBackupId":"0.0.0.12", =====> BDR Router-Id
          "optionsCounter":2,
          "optionsList":"*|-|-|-|-|-|E|-",
          "routerDeadIntervalTimerDueMsec":38495,
          "databaseSummaryListCounter":0,
          "linkStateRequestListCounter":0,
          "linkStateRetransmissionListCounter":0,
          "threadInactivityTimer":"on",
          "threadLinkStateRequestRetransmission":"on",
          "threadLinkStateUpdateRetransmission":"on"
        }
      ],
      "0.0.0.13":[
        {
          "ifaceAddress":"11.0.2.2",
          "areaId":"0.0.0.0",
          "ifaceName":"swp2",
          "localIfaceAddress":"11.0.2.1",
          "nbrPriority":1,
          "nbrState":"Full",
          "role":"DR",
          "stateChangeCounter":6,
          "lastPrgrsvChangeMsec":4522182,
          "routerDesignatedId":"0.0.0.13", =====> DR Router-Id
          "routerDesignatedBackupId":"0.0.0.12", =====> BDR Router-Id
          "optionsCounter":2,
          "optionsList":"*|-|-|-|-|-|E|-",
          "routerDeadIntervalTimerDueMsec":37840,
          "databaseSummaryListCounter":0,
          "linkStateRequestListCounter":0,
          "linkStateRetransmissionListCounter":0,
          "threadInactivityTimer":"on",
          "threadLinkStateRequestRetransmission":"on",
          "threadLinkStateUpdateRetransmission":"on"
        }
      ],
      "0.0.0.14":[
        {
          "ifaceAddress":"11.0.3.2",
          "areaId":"0.0.0.0",
          "ifaceName":"swp3",
          "localIfaceAddress":"11.0.3.1",
          "nbrPriority":1,
          "nbrState":"Full",
          "role":"DR",
          "stateChangeCounter":6,
          "lastPrgrsvChangeMsec":4522182,
          "routerDesignatedId":"0.0.0.14",  =====> DR Router-Id
          "routerDesignatedBackupId":"0.0.0.12", =====> BDR Router-Id
          "optionsCounter":2,
          "optionsList":"*|-|-|-|-|-|E|-",
          "routerDeadIntervalTimerDueMsec":37840,
          "databaseSummaryListCounter":0,
          "linkStateRequestListCounter":0,
          "linkStateRetransmissionListCounter":0,
          "threadInactivityTimer":"on",
          "threadLinkStateRequestRetransmission":"on",
          "threadLinkStateUpdateRetransmission":"on"
        }
      ]
    }
  }
}
r1#

r1# show ip ospf vrf default neighbor swp1 detail
 Neighbor 0.0.0.17, interface address 11.0.0.1
    In the area 0.0.0.0 via interface swp1 local interface IP 11.0.0.2
    Neighbor priority is 1, State is Full, Role is DR, 6 state changes
    Most recent state change statistics:
      Progressive change 1h18m11s ago
    DR is  0.0.0.17, BDR is 0.0.0.12  =======> correct DR and BDR
router-id
    Options 2 *|-|-|-|-|-|E|-
    Dead timer due in 38.339s
    Database Summary List 0
    Link State Request List 0
    Link State Retransmission List 0
    Thread Inactivity Timer on
    Thread Database Description Retransmision off
    Thread Link State Request Retransmission on
    Thread Link State Update Retransmission on

r1#

r1# show ip ospf vrf default neighbor swp
swp1  swp2  swp3  swp4
r1# show ip ospf vrf default neighbor swp2 detail
 Neighbor 0.0.0.13, interface address 11.0.2.2
    In the area 0.0.0.0 via interface swp2 local interface IP 11.0.2.1
    Neighbor priority is 1, State is Full, Role is DR, 6 state changes
    Most recent state change statistics:
      Progressive change 12m02s ago
    DR is 0.0.0.13, BDR is 0.0.0.12 =======> correct DR and BDR
router-id
    Options 2 *|-|-|-|-|-|E|-
    Dead timer due in 37.136s
    Database Summary List 0
    Link State Request List 0
    Link State Retransmission List 0
    Thread Inactivity Timer on
    Thread Database Description Retransmision off
    Thread Link State Request Retransmission on
    Thread Link State Update Retransmission on

r1#
```

Ticket:#3395270

Issue:3395270

Testing: UT done

Signed-off-by: Sindhu Parvathi Gopinathan's <sgopinathan@nvidia.com>
13 months agoMerge pull request #13182 from taspelund/add_bgp_json_comments
Donatas Abraitis [Sun, 2 Apr 2023 17:33:56 +0000 (20:33 +0300)]
Merge pull request #13182 from taspelund/add_bgp_json_comments

bgpd: add comments for 'json detail' show cmd code

13 months agoMerge pull request #13179 from donaldsharp/array_size
Christian Hopps [Sat, 1 Apr 2023 23:21:41 +0000 (08:21 +0900)]
Merge pull request #13179 from donaldsharp/array_size

isisd, zebra: Use array_size instead of ARRAY_SIZE

13 months agoMerge pull request #13175 from donaldsharp/msdp_topo1_memleak
Jafar Al-Gharaibeh [Sat, 1 Apr 2023 23:13:58 +0000 (18:13 -0500)]
Merge pull request #13175 from donaldsharp/msdp_topo1_memleak

zebra: Cleanup ctx leak on shutdown and turn off event

13 months agomgmtd: lib: read transitioned daemons split config files in mgmtd
Christian Hopps [Fri, 31 Mar 2023 16:34:49 +0000 (16:34 +0000)]
mgmtd: lib: read transitioned daemons split config files in mgmtd

When daemons transition to mgmtd they should stop reading their split config
files, and let mgmtd do that, otherwise things can get out of sync.

Signed-off-by: Christian Hopps <chopps@labn.net>
13 months agodoc: Add missing rfc9384 to BGP supported RFC list
Donatas Abraitis [Sat, 1 Apr 2023 18:56:37 +0000 (21:56 +0300)]
doc: Add missing rfc9384 to BGP supported RFC list

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
13 months agoMerge pull request #13171 from manojvn/13154_fix
Donald Sharp [Sat, 1 Apr 2023 13:18:10 +0000 (09:18 -0400)]
Merge pull request #13171 from manojvn/13154_fix

mgmtd: Fix for issue 13154.

13 months agobgpd: add comments for 'json detail' show cmd code
Trey Aspelund [Fri, 31 Mar 2023 22:34:48 +0000 (22:34 +0000)]
bgpd: add comments for 'json detail' show cmd code

The json structure changes used for 'json detail' show commands are not
very straightforward and might require code analysis to understand.
This addscommentary to the flow to explain the change in structure.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
13 months agotests: add OSPF NSSA topotest
Renato Westphal [Thu, 2 Mar 2023 22:38:52 +0000 (19:38 -0300)]
tests: add OSPF NSSA topotest

At this point OSPF NSSA deserves a dedicated topotest given the
latest nerd knobs that were added :)

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
13 months agoospfd: add support for NSSA Type-7 address ranges
Renato Westphal [Wed, 8 Mar 2023 00:13:53 +0000 (21:13 -0300)]
ospfd: add support for NSSA Type-7 address ranges

Implement NSSA address ranges as specified by RFC 3101:

   NSSA border routers may be configured with Type-7 address ranges.
   Each Type-7 address range is defined as an [address,mask] pair.  Many
   separate Type-7 networks may fall into a single Type-7 address range,
   just as a subnetted network is composed of many separate subnets.
   NSSA border routers may aggregate Type-7 routes by advertising a
   single Type-5 LSA for each Type-7 address range.  The Type-5 LSA
   resulting from a Type-7 address range match will be distributed to
   all Type-5 capable areas.

Syntax:
  area A.B.C.D nssa range A.B.C.D/M [<not-advertise|cost (0-16777215)>]

Example:
  router ospf
   router-id 1.1.1.1
   area 1 nssa
   area 1 nssa range 172.16.0.0/16
   area 1 nssa range 10.1.0.0/16
  !

Since regular area ranges and NSSA ranges have a lot in common,
this commit reuses the existing infrastructure for area ranges as
much as possible to avoid code duplication.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
13 months agoospfd: do not install blackhole routes for ranges with "not-advertise"
Renato Westphal [Wed, 8 Mar 2023 00:13:53 +0000 (21:13 -0300)]
ospfd: do not install blackhole routes for ranges with "not-advertise"

Adding blackhole routes is unnecessary in that case.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
13 months agoospfd: refactor range commands
Renato Westphal [Wed, 8 Mar 2023 00:13:53 +0000 (21:13 -0300)]
ospfd: refactor range commands

* Update the "range" helpers to accept an area pointer instead of
  an area ID;
* Always call ospf_area_display_format_set() after every "range"
  command to ensure consistency.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
13 months agoospfd: use the ospf_area_range_active() helper function more consistently
Renato Westphal [Wed, 8 Mar 2023 00:13:53 +0000 (21:13 -0300)]
ospfd: use the ospf_area_range_active() helper function more consistently

A small change to improve code readability.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
13 months agoospfd: remove duplicated code
Renato Westphal [Wed, 8 Mar 2023 00:13:53 +0000 (21:13 -0300)]
ospfd: remove duplicated code

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
13 months agoospfd: implement Type-7 default routes for NSSA areas
Renato Westphal [Wed, 8 Mar 2023 00:13:53 +0000 (21:13 -0300)]
ospfd: implement Type-7 default routes for NSSA areas

Add the "default-information-originate" option to the "area X nssa"
command. That option allows the origination of Type-7 default routes
on NSSA ABRs and ASBRs.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
13 months agoospfd: refactor the "area nssa" command using DEFPY
Renato Westphal [Wed, 8 Mar 2023 00:13:53 +0000 (21:13 -0300)]
ospfd: refactor the "area nssa" command using DEFPY

Combine all variation of the "area nssa" command into a single
DEFPY to improve code maintainability.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
13 months agoMerge pull request #12454 from donaldsharp/bgp_getc
Donatas Abraitis [Fri, 31 Mar 2023 21:23:12 +0000 (00:23 +0300)]
Merge pull request #12454 from donaldsharp/bgp_getc

bgpd: Ensure stream received has enough data

13 months agoMerge pull request #13139 from ribarroetavena/master
Donatas Abraitis [Fri, 31 Mar 2023 20:44:00 +0000 (23:44 +0300)]
Merge pull request #13139 from ribarroetavena/master

bgpd: trim long neighbor description with no whitespace

13 months agomgmtd: remove startup config feature for now
Christian Hopps [Tue, 28 Mar 2023 17:08:01 +0000 (13:08 -0400)]
mgmtd: remove startup config feature for now

The startup config and how it interacts with explicit commits,
commit databases and implicit commits needs to be worked out
in design first. For now remove the offending code.

Signed-off-by: Christian Hopps <chopps@labn.net>
13 months agotests: when verifying a route is missing use expected=False
Christian Hopps [Fri, 31 Mar 2023 16:39:11 +0000 (16:39 +0000)]
tests: when verifying a route is missing use expected=False

Prior to this the full retry cycle was run with a "passing" negative
result each time through

Previous runtime ~5 minutes
New runtime ~20 seconds.

Signed-off-by: Christian Hopps <chopps@labn.net>
13 months agoisisd, zebra: Use array_size instead of ARRAY_SIZE
Donald Sharp [Fri, 31 Mar 2023 17:58:47 +0000 (13:58 -0400)]
isisd, zebra: Use array_size instead of ARRAY_SIZE

Use the FRR provided array_size.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agozebra: Cleanup ctx leak on shutdown and turn off event
Donald Sharp [Fri, 31 Mar 2023 13:08:23 +0000 (09:08 -0400)]
zebra: Cleanup ctx leak on shutdown and turn off event

two things:

On shutdown cleanup any events associated with the update walker.
Also do not allow new events to be created.

Fixes this mem-leak:

./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790:Direct leak of 8 byte(s) in 1 object(s) allocated from:
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-    #0 0x7f0dd0b08037 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-    #1 0x7f0dd06c19f9 in qcalloc lib/memory.c:105
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-    #2 0x55b42fb605bc in rib_update_ctx_init zebra/zebra_rib.c:4383
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-    #3 0x55b42fb6088f in rib_update zebra/zebra_rib.c:4421
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-    #4 0x55b42fa00344 in netlink_link_change zebra/if_netlink.c:2221
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-    #5 0x55b42fa24622 in netlink_information_fetch zebra/kernel_netlink.c:399
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-    #6 0x55b42fa28c02 in netlink_parse_info zebra/kernel_netlink.c:1183
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-    #7 0x55b42fa24951 in kernel_read zebra/kernel_netlink.c:493
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-    #8 0x7f0dd0797f0c in event_call lib/event.c:1995
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-    #9 0x7f0dd0684fd9 in frr_run lib/libfrr.c:1185
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-    #10 0x55b42fa30caa in main zebra/main.c:465
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-    #11 0x7f0dd01b5d09 in __libc_start_main ../csu/libc-start.c:308
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-
./msdp_topo1.test_msdp_topo1/r2.zebra.asan.1117790-SUMMARY: AddressSanitizer: 8 byte(s) leaked in 1 allocation(s).

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agoMerge pull request #13155 from opensourcerouting/fix/bgp_addpath_labeled_unicast_topotest
Donald Sharp [Fri, 31 Mar 2023 11:55:23 +0000 (07:55 -0400)]
Merge pull request #13155 from opensourcerouting/fix/bgp_addpath_labeled_unicast_topotest

tests: Check received routes count for labeled-unicast with addpath

13 months agoMerge pull request #13017 from SaiGomathiN/12744
Donald Sharp [Fri, 31 Mar 2023 11:50:20 +0000 (07:50 -0400)]
Merge pull request #13017 from SaiGomathiN/12744

pim6d: Do not use interfaces with ifindex as 0

13 months agoMerge pull request #13161 from Orange-OpenSource/isis_te
Donald Sharp [Fri, 31 Mar 2023 11:48:26 +0000 (07:48 -0400)]
Merge pull request #13161 from Orange-OpenSource/isis_te

isisd: Correction of subnets creation in the TED

13 months agoMerge pull request #13164 from LabNConsulting/bad-file-bad
Mark Stapp [Fri, 31 Mar 2023 11:15:28 +0000 (07:15 -0400)]
Merge pull request #13164 from LabNConsulting/bad-file-bad

mgmtd: remove errant git added file

13 months agomgmtd: Fix for issue 13154.
Manoj Naragund [Fri, 31 Mar 2023 10:47:17 +0000 (03:47 -0700)]
mgmtd: Fix for issue 13154.

The changes involve adding show debuggin command for MGMTd which resolves
command incomplete issue.

issue #13154

Signed-off-by: Manoj Naragund <mnaragund@vmware.com>
13 months agoMerge pull request #13148 from samanvithab/bgp_mem_leak_fix
Donatas Abraitis [Fri, 31 Mar 2023 06:25:44 +0000 (09:25 +0300)]
Merge pull request #13148 from samanvithab/bgp_mem_leak_fix

bgpd : memory leak fix for aggregate-address on cleanup

13 months agoMerge pull request #13153 from jeclarke/dump_buf_size
Donatas Abraitis [Fri, 31 Mar 2023 06:24:30 +0000 (09:24 +0300)]
Merge pull request #13153 from jeclarke/dump_buf_size

bgpd: increase buffer size used for dumping BGP to MRT files

13 months agoMerge pull request #13082 from inspurSDN/bugfix_zebra_crash_rebooting
Jafar Al-Gharaibeh [Fri, 31 Mar 2023 05:17:19 +0000 (00:17 -0500)]
Merge pull request #13082 from inspurSDN/bugfix_zebra_crash_rebooting

zebra: move vrf deleting handle to zebra final state handle

13 months agoMerge pull request #13060 from opensourcerouting/feature/allow_peering_with_127.0.0.1
Jafar Al-Gharaibeh [Fri, 31 Mar 2023 05:14:27 +0000 (00:14 -0500)]
Merge pull request #13060 from opensourcerouting/feature/allow_peering_with_127.0.0.1

bgpd: Allow peering via 127.0.0.0/8

13 months agoMerge pull request #13142 from donaldsharp/cleanup_debugs
Jafar Al-Gharaibeh [Fri, 31 Mar 2023 05:09:55 +0000 (00:09 -0500)]
Merge pull request #13142 from donaldsharp/cleanup_debugs

tests: Turn off debug logging

13 months agomgmtd: remove errant git added file
Christian Hopps [Fri, 31 Mar 2023 00:16:23 +0000 (00:16 +0000)]
mgmtd: remove errant git added file

fixes #13156

Signed-off-by: Christian Hopps <chopps@gmail.com>
13 months agosharpd: Adjust TED builder
Olivier Dugeon [Thu, 30 Mar 2023 16:15:57 +0000 (18:15 +0200)]
sharpd: Adjust TED builder

Following correction of IS-IS subnet creation, this patch adjust the way the
TED is created in sharpd to automatically adjust subnet deletion.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
13 months agoisisd: Correction of subnets creation in the TED
Olivier Dugeon [Thu, 30 Mar 2023 15:53:33 +0000 (17:53 +0200)]
isisd: Correction of subnets creation in the TED

Subnets may be incorrectly created in the IS-IS Traffic Engineering Database
(TED). Indeed, to be usable, the subnets advertised by IS-IS peers must be
adjusted to avoid misinterpretation. For example, consider R1 which is
connected to R2 with IP addresses 10.0.0.1/24 (R1) and 10.0.0.2/24 (R2).
R1 and R2 will advertize the prefix 10.0.0.0/24. By leaving the subnet with the
prefix 10.0.0.0/24 in the TED, it is not possible to determine whether
10.0.0.1 is attached to R1 or R2 or whether 10.0.0.3 exists.

So to avoid this, the subnet prefixes are adjusted with the IP addresses of the
local interface. But IS-IS can start to advertise the subnet when not all
adjacencies are up, especially when IPv4 and IPv6 are configured on the same
interface. This results in an uncorrected prefix, e.g. 10.0.0.0/24, remaining
in the TED when it should be removed.

This problem affects some isis-related tests such as the CSPF test.

This patch fixes this bug by removing the uncorrected prefix before adding the
the corrected version.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
13 months agobgpd: Trim long neighbor description with no whitespace
rbarroetavena [Thu, 23 Mar 2023 19:19:48 +0000 (16:19 -0300)]
bgpd: Trim long neighbor description with no whitespace

Fix for missing neighbor description in "show bgp summary [wide]"
when its length exceeds 20[64] chars and it doesn't contain
withespaces.
Existing behavior remains if description contains whitespaces
before size limit.

Signed-off-by: rbarroetavena <rbarroetavena@gmail.com>
13 months agotests: Check received routes count for labeled-unicast with addpath
Donatas Abraitis [Thu, 30 Mar 2023 13:50:15 +0000 (16:50 +0300)]
tests: Check received routes count for labeled-unicast with addpath

Test failed time to time, let's try this way:

```
$ for x in $(seq 1 20); do cp test_bgp_labeled_unicast_addpath.py test_$x.py; done
$ sudo pytest -s -n 20
```

Ran 10 times using this pattern, no failure :shrug:

Before this change, we checked advertised routes, and at some point `=` was
missing from the output, but advertised correctly. Receiving router gets as
much routes as expected to receive.

I reversed checking received routes, not advertised.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
13 months agoMerge pull request #13004 from donaldsharp/vtysh_fork
Jafar Al-Gharaibeh [Thu, 30 Mar 2023 13:44:18 +0000 (08:44 -0500)]
Merge pull request #13004 from donaldsharp/vtysh_fork

Vtysh fork

13 months agobgpd: increase buffer size used for dumping BGP to MRT files
jeclarke [Thu, 30 Mar 2023 13:23:48 +0000 (14:23 +0100)]
bgpd: increase buffer size used for dumping BGP to MRT files

Signed-off-by: James Clarke (jamclar2) <jamclar2@cisco.com>
13 months agobgpd : aggregate-address memory leak fix
Samanvitha B Bhargav [Thu, 30 Mar 2023 05:35:44 +0000 (22:35 -0700)]
bgpd : aggregate-address memory leak fix

Memory leaks are observed in the cleanup code. When “no router bgp" is executed,
cleanup in that flow for aggregate-address command is not taken care.

fixes the below leak:
    --
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444:Direct leak of 152 byte(s) in 1 object(s) allocated from:
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #0 0x7f163e911037 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #1 0x7f163e4b9259 in qcalloc lib/memory.c:105
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #2 0x562bf42ebbd5 in bgp_aggregate_new bgpd/bgp_route.c:7239
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #3 0x562bf42f14e8 in bgp_aggregate_set bgpd/bgp_route.c:8421
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #4 0x562bf42f1e55 in aggregate_addressv6_magic bgpd/bgp_route.c:8592
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #5 0x562bf42be3f5 in aggregate_addressv6 bgpd/bgp_route_clippy.c:341
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #6 0x7f163e3f1e1b in cmd_execute_command_real lib/command.c:988
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #7 0x7f163e3f219c in cmd_execute_command lib/command.c:1048
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #8 0x7f163e3f2df4 in cmd_execute lib/command.c:1215
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #9 0x7f163e5a2d73 in vty_command lib/vty.c:544
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #10 0x7f163e5a79c8 in vty_execute lib/vty.c:1307
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #11 0x7f163e5ad299 in vtysh_read lib/vty.c:2216
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #12 0x7f163e593f16 in event_call lib/event.c:1995
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #13 0x7f163e47c839 in frr_run lib/libfrr.c:1185
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #14 0x562bf414e58d in main bgpd/bgp_main.c:505
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #15 0x7f163de66d09 in __libc_start_main ../csu/libc-start.c:308
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444:Direct leak of 152 byte(s) in 1 object(s) allocated from:
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #0 0x7f163e911037 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #1 0x7f163e4b9259 in qcalloc lib/memory.c:105
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #2 0x562bf42ebbd5 in bgp_aggregate_new bgpd/bgp_route.c:7239
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #3 0x562bf42f14e8 in bgp_aggregate_set bgpd/bgp_route.c:8421
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #4 0x562bf42f1cde in aggregate_addressv4_magic bgpd/bgp_route.c:8543
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #5 0x562bf42bd258 in aggregate_addressv4 bgpd/bgp_route_clippy.c:255
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #6 0x7f163e3f1e1b in cmd_execute_command_real lib/command.c:988
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #7 0x7f163e3f219c in cmd_execute_command lib/command.c:1048
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #8 0x7f163e3f2df4 in cmd_execute lib/command.c:1215
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #9 0x7f163e5a2d73 in vty_command lib/vty.c:544
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #10 0x7f163e5a79c8 in vty_execute lib/vty.c:1307
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #11 0x7f163e5ad299 in vtysh_read lib/vty.c:2216
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #12 0x7f163e593f16 in event_call lib/event.c:1995
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #13 0x7f163e47c839 in frr_run lib/libfrr.c:1185
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #14 0x562bf414e58d in main bgpd/bgp_main.c:505
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-    #15 0x7f163de66d09 in __libc_start_main ../csu/libc-start.c:308
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-
    ./bgp_local_asn_dot.test_bgp_local_asn_dot_agg/r3.bgpd.asan.3410444-SUMMARY: AddressSanitizer: 304 byte(s) leaked in 2 allocation(s).

Signed-off-by: Samanvitha B Bhargav <bsamanvitha@vmware.com>
13 months agoMerge pull request #12916 from donaldsharp/clang_15_warnings
mobash-rasool [Thu, 30 Mar 2023 03:11:40 +0000 (08:41 +0530)]
Merge pull request #12916 from donaldsharp/clang_15_warnings

freebsd 14, clang 15

13 months agoMerge pull request #13133 from isabelladeleon12/add_drop_counter
Donald Sharp [Thu, 30 Mar 2023 00:30:00 +0000 (20:30 -0400)]
Merge pull request #13133 from isabelladeleon12/add_drop_counter

isisd: Add PDU drop counter to "show isis summary"

13 months agozebra: Ensure gr events run after Meta Queue has run
Donald Sharp [Wed, 29 Mar 2023 19:27:09 +0000 (15:27 -0400)]
zebra: Ensure gr events run after Meta Queue has run

BGP signals to zebra that a afi has converged immediately
after it has finished processing all routes for a given
afi/safi.  This generates events in zebra in this order

a) Routes received from BGP, placed on early-rib Meta-Q
b) Signal GR for the afi.

Now imagine that zebra reads GR code and immediately
processes routes that are in the actual rib and
removes some routes.  This generates a

c) route deletion to the kernel for some number of
routes that may be in the the early-rib Meta-Q
d) Process the Meta-Q, and re-install the routes

This is undesirable behavior in zebra.  In that
while we may end up in a correct state, there
will be a blip for some number of routes that
happen to be in the early rib Meta-Q.

Modify the GR code to have it's own processing
entry at the end of the Meta-Q.  This will
allow all routes to be processed and ready
for handling by the Graceful Restart code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agoMerge pull request #13146 from opensourcerouting/fix/drop_double_soft_reconfig_in
Donald Sharp [Thu, 30 Mar 2023 00:13:43 +0000 (20:13 -0400)]
Merge pull request #13146 from opensourcerouting/fix/drop_double_soft_reconfig_in

bgpd: Do not call bgp_soft_reconfig_in() twice in a row on policy change

13 months agotests: Turn off debug logging
Donald Sharp [Wed, 29 Mar 2023 18:03:28 +0000 (14:03 -0400)]
tests: Turn off debug logging

Tests are taking up too much space, turn off debug logging
for normal runs.

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