]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
22 months agobgpd: add mpls vpn nh label bind cache struct and apis
Louis Scalbert [Tue, 2 May 2023 14:38:53 +0000 (16:38 +0200)]
bgpd: add mpls vpn nh label bind cache struct and apis

In the context of the ASBR facing an EBGP neighbor, or
facing an IBGP neighbor where the BGP updates received
are re-advertised with a modified next-hop, a new local
label will be re-advertised too, to replace the original
one.

Create a binding table, in the form of a hash list, from the
original labels to the new labels. Since labels can be the
same on several routers, set the next-hop and the label as
the keys. Add the needed API functions to manage the hash
list.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
22 months agobgpd: add LP_TYPE_BGP_L3VPN_BIND label type
Louis Scalbert [Tue, 2 May 2023 14:30:20 +0000 (16:30 +0200)]
bgpd: add LP_TYPE_BGP_L3VPN_BIND label type

Redistributing mpls vpn prefixes with a new label
requires picking up unused MPLS local labels.

Today, there is an MPLS label pool which is owned
by the zebra daemon. BGP gets a chunk of labels
that are shared with the multiple usage of the BGP
daemon. A label type attribute is used whenever
BGP needs a new label value.

The 'LP_TYPE_BGP_L3VPN_BIND' label type will be used
to allocate the MPLS labels that will be bound to
the original next-hop, and label value of an L3VPN
update.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
22 months agobgpd: track mpls vpn nexthops
Philippe Guibert [Fri, 21 Apr 2023 12:28:28 +0000 (14:28 +0200)]
bgpd: track mpls vpn nexthops

There is no nexthop reachability information for
received MPLS VPN prefixes.
This information is necessary when BGP also acts
as LSR device, and is needed to create an MPLS entry
between two BGP speakers: the next-hop to pick-up
in the MPLS entry has to be connected.

The nexthop reachability information is available
for other non MPLS VPN prefixes, and is handled
by the bgp nexthop cache (bnc) contexts.
Extend the usage of the BNC contexts for L3VPN
prefixes.

Note that the MPLS VPN routes had to be redistributed
as before, to avoid breaking existing deployments
that use FRR as route reflectors. Because of this, the
nexthop reachability status has been maintained to OK
for MPLS VPN prefixes.

Note also that the label allocation per nexthop tracking
was wrongly using the MPLS VPN safi to get a valid BNC
context, when choosing which label to return in the
'vpn_leak_from_vrf_get_per_nexthop_label()' function.
Fix this by using SAFI_UNICAST instead.

Fixes: 577be36a41be ("bgpd: add support for l3vpn per-nexthop label")
Link: https://github.com/FRRouting/frr/pull/13380
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
22 months agobgpd: fix label allocation per next-hop applied to unicast
Philippe Guibert [Wed, 24 May 2023 11:50:37 +0000 (13:50 +0200)]
bgpd: fix label allocation per next-hop applied to unicast

The label allocation per next-hop functionality is calling
the 'bgp_find_or_add_nexthop()' method using the SAFI_MPLS_VPN
safi parameter, whereas the call is supposed to apply to
unicast paths.

Fix this by using the SAFI_UNICAST safi parameter in the call.
Simplify the vpn_leak_from_vrf_get_per_nexthop_label() API by
removing the safi parameter from the function.

Fixes: 577be36a41be ("bgpd: add support for l3vpn per-nexthop label")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
22 months agobgpd: add 'mpls bgp l3vpn-multi-domain-switching' command
Louis Scalbert [Tue, 2 May 2023 14:19:20 +0000 (16:19 +0200)]
bgpd: add 'mpls bgp l3vpn-multi-domain-switching' command

When acting as intermediate device for BGP signaling, and
as transit device for data traffic, the device is not able
to modify the label value from incoming MPLS VPN updates:

- as BGP device, modifying the label value is necessary
when redistributing VPN prefixes with its own next-hop.
- as transit device that connects two ethernet segments
on separate interfaces, the return MPLS traffic must be
handled: the modified label value must be swapped with
the original label value and sent back to the original
next-hop.

The border router use case can be taken as example, when
it acts both as transit and as BGP device:
- When receiving updates from a border router peer, and where
interior traffic is expected to transit through the local
border router.
- When receiving updates from interior devices, and where
exterior traffic will transit through the local border router.

In those two situations, a new label is bound to the received
entry, and the entry is advertised to a new peer with the new
label. In the same time, an MPLS entry is created to handle
return traffic with the new mpls label: the traffic would be
swapped to the original MPLS label and the original next-hop.

This is the first commit of a series of patches, that address
the above mentioned issue.
The first commit introduces a new per-interface command:

> interface eth0
>  [no] mpls bgp l3vpn-multi-domain-switching
> exit

This command will authorise mpls vpn updates to have a new
label value bound to the mpls vpn routes received over that
interface.

Link: https://www.rfc-editor.org/rfc/rfc3107.html#section-3
> When a BGP speaker redistributes a route, the label(s) assigned to
> that route must not be changed (except by omission), unless the
> speaker changes the value of the Next Hop attribute of the route.

Link: https://www.rfc-editor.org/rfc/rfc3031.html#section-4.6
Link: https://www.rfc-editor.org/rfc/rfc4364.html#section-10
sub-chapter b.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
22 months agobgpd: add a function to compare two label lists
Philippe Guibert [Thu, 20 Apr 2023 11:10:15 +0000 (13:10 +0200)]
bgpd: add a function to compare two label lists

Create a bgp_labels_same() function that does the
same operations as the static function labels_same from
bgp_mplsvpn.c.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
22 months agoMerge pull request #13742 from sri-mohan1/srib-ldpd1
Mark Stapp [Wed, 14 Jun 2023 15:14:16 +0000 (11:14 -0400)]
Merge pull request #13742 from sri-mohan1/srib-ldpd1

ldpd: changes for code maintainability

22 months agoldpd: changes for code maintainability 13742/head
sri-mohan1 [Thu, 8 Jun 2023 17:49:43 +0000 (23:19 +0530)]
ldpd: changes for code maintainability

these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
22 months agoMerge pull request #13793 from LabNConsulting/aceelindem/coverity-doc-update
Donald Sharp [Wed, 14 Jun 2023 10:57:57 +0000 (06:57 -0400)]
Merge pull request #13793 from LabNConsulting/aceelindem/coverity-doc-update

doc: Update Coverity workflow in developer documentation.

22 months agoMerge pull request #13783 from opensourcerouting/fix/some_gcc13_nits
Donald Sharp [Wed, 14 Jun 2023 10:56:40 +0000 (06:56 -0400)]
Merge pull request #13783 from opensourcerouting/fix/some_gcc13_nits

GCC13 nits

22 months agodoc: Update Coverity workflow in developer documentation. 13793/head
Acee Lindem [Tue, 13 Jun 2023 20:10:48 +0000 (16:10 -0400)]
doc: Update Coverity workflow in developer documentation.

Signed-off-by: Acee Lindem <aceelindem@gmail.com>
22 months agoMerge pull request #13766 from LabNConsulting/chopps/mgmtd-cleanup
Igor Ryzhov [Tue, 13 Jun 2023 19:50:39 +0000 (22:50 +0300)]
Merge pull request #13766 from LabNConsulting/chopps/mgmtd-cleanup

mgmtd cleanup/simplify some code

22 months agoMerge pull request #13768 from LabNConsulting/chopps/mgmt-better-logs
Igor Ryzhov [Tue, 13 Jun 2023 19:43:11 +0000 (22:43 +0300)]
Merge pull request #13768 from LabNConsulting/chopps/mgmt-better-logs

mgmtd: improvements in logging and commentary

22 months agoMerge pull request #13764 from LabNConsulting/chopps/robust1
Igor Ryzhov [Tue, 13 Jun 2023 19:25:13 +0000 (22:25 +0300)]
Merge pull request #13764 from LabNConsulting/chopps/robust1

lib: mgmtd: make error handling more robust

22 months agoMerge pull request #13755 from LabNConsulting/ziemba/zebra-dplane-priority
Donald Sharp [Tue, 13 Jun 2023 14:36:57 +0000 (10:36 -0400)]
Merge pull request #13755 from LabNConsulting/ziemba/zebra-dplane-priority

zebra: bugfix dplane priority sorting

22 months agoMerge pull request #13589 from mjstapp/fix_pbr_zebra
Donald Sharp [Tue, 13 Jun 2023 14:23:46 +0000 (10:23 -0400)]
Merge pull request #13589 from mjstapp/fix_pbr_zebra

pbrd, zebra: fix zapi and netlink rule encoding

22 months agoMerge pull request #13612 from chiragshah6/fdev1
Russ White [Tue, 13 Jun 2023 13:55:07 +0000 (09:55 -0400)]
Merge pull request #13612 from chiragshah6/fdev1

ospfd: fix interface param type update

22 months agobgpd: Use enum bgp_create_error_code as argument in header 13783/head
Donatas Abraitis [Tue, 13 Jun 2023 13:08:24 +0000 (16:08 +0300)]
bgpd: Use enum bgp_create_error_code as argument in header

```
bgpd/bgp_vty.c:865:5: warning: conflicting types for ‘bgp_vty_return’ due to enum/integer mismatch; have ‘int(struct vty *, enum bgp_create_error_code)’ [-Wenum-int-mismatch]
  865 | int bgp_vty_return(struct vty *vty, enum bgp_create_error_code ret)
      |     ^~~~~~~~~~~~~~
In file included from ./bgpd/bgp_mplsvpn.h:15,
                 from bgpd/bgp_vty.c:48:
./bgpd/bgp_vty.h:148:12: note: previous declaration of ‘bgp_vty_return’ with type ‘int(struct vty *, int)’
  148 | extern int bgp_vty_return(struct vty *vty, int ret);
      |            ^~~~~~~~~~~~~~
```

Fixing stuff regarding GCC13.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
22 months agobgpd: Use enum bgp_fsm_state_progress for bgp_stop()
Donatas Abraitis [Tue, 13 Jun 2023 13:01:40 +0000 (16:01 +0300)]
bgpd: Use enum bgp_fsm_state_progress for bgp_stop()

```
bgpd/bgp_fsm.c:1360:29: warning: conflicting types for ‘bgp_stop’ due to enum/integer mismatch; have ‘enum bgp_fsm_state_progress(struct peer *)’ [-Wenum-int-mismatch]
 1360 | enum bgp_fsm_state_progress bgp_stop(struct peer *peer)
      |                             ^~~~~~~~
In file included from bgpd/bgp_fsm.c:29:
./bgpd/bgp_fsm.h:111:12: note: previous declaration of ‘bgp_stop’ with type ‘int(struct peer *)’
  111 | extern int bgp_stop(struct peer *peer);
      |            ^~~~~~~~
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
22 months agoMerge pull request #13775 from mobash-rasool/fixes2
David Lamparter [Tue, 13 Jun 2023 10:50:06 +0000 (12:50 +0200)]
Merge pull request #13775 from mobash-rasool/fixes2

22 months agoMerge pull request #13767 from opensourcerouting/fix/convert_rip_topo1_to_polling
Christian Hopps [Tue, 13 Jun 2023 08:20:49 +0000 (04:20 -0400)]
Merge pull request #13767 from opensourcerouting/fix/convert_rip_topo1_to_polling

tests: Convert rip/ripng tests using run_and_expect

22 months agolib: mgmtd: improvements in logging and commentary 13768/head
Christian Hopps [Fri, 9 Jun 2023 20:54:54 +0000 (16:54 -0400)]
lib: mgmtd: improvements in logging and commentary

- log names of datastores not numbers
- improve logging for mgmt_msg_read
- Rather than use a bool, instead store the pending const string name of
the command being run that has postponed the CLI. This adds some nice
information to the logging when enabled.

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agoMerge pull request #13763 from LabNConsulting/mgmtd/simplify
Donatas Abraitis [Tue, 13 Jun 2023 08:10:18 +0000 (11:10 +0300)]
Merge pull request #13763 from LabNConsulting/mgmtd/simplify

fix 'exit' bug in config file processing, et al.

22 months agopimd,pim6d: Correct the socket to send reg-stop msg 13775/head
Mobashshera Rasool [Mon, 12 Jun 2023 13:07:22 +0000 (06:07 -0700)]
pimd,pim6d: Correct the socket to send reg-stop msg

We were using the pim interface socket to send the register
stop msg, it works fine in cases where the interface on which
register msg is received and the interface on which the register-stop
msg is supposed to be sent is the same.
But when the interfaces are different, msg send fails because
the outgoing interface is not right.

Fixes: #13774
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
22 months agopbrd, zebra: fix zapi and netlink rule encoding 13589/head
Mark Stapp [Tue, 23 May 2023 19:31:31 +0000 (15:31 -0400)]
pbrd, zebra: fix zapi and netlink rule encoding

In pbrd, don't encode a rule without a table. There are cases
where the zapi encoding was incorrect because the 4-octet
table id was missing. In zebra, mask off the ECN bits in the
TOS byte when encoding an iprule to match netlink's
expectation.

Signed-off-by: Mark Stapp <mjs@labn.net>
22 months agoMerge pull request #13704 from donaldsharp/flowspec_support_bundle
David Lamparter [Mon, 12 Jun 2023 16:47:55 +0000 (18:47 +0200)]
Merge pull request #13704 from donaldsharp/flowspec_support_bundle

22 months agobgpd: Add some color to why nexthop_set failed 13704/head
Donald Sharp [Wed, 7 Jun 2023 14:09:27 +0000 (10:09 -0400)]
bgpd: Add some color to why nexthop_set failed

We are seeing some frequent test failures with
setting the nexthop correctly.  At this point
in time, I have no idea what is going wrong,
but I don't have a bunch of information either,
so let's add the local and remote values.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
22 months agotests: test_bgp_flowspec_topo.py changes as per linter
Donald Sharp [Tue, 6 Jun 2023 18:50:25 +0000 (14:50 -0400)]
tests: test_bgp_flowspec_topo.py changes as per linter

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
22 months agotests: The bgp_flowspec frequently fails try to gather more data
Donald Sharp [Tue, 6 Jun 2023 16:13:50 +0000 (12:13 -0400)]
tests: The bgp_flowspec frequently fails try to gather more data

Add a bit of code to allow the bgp_flowspec topotest to gather
data when something goes wrong.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
22 months agomgmtd: complex redux in txn cleanup 13766/head
Christian Hopps [Mon, 12 Jun 2023 04:26:50 +0000 (00:26 -0400)]
mgmtd: complex redux in txn cleanup

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agolib: mgmtd: simplify implicit commit code
Christian Hopps [Fri, 9 Jun 2023 20:52:56 +0000 (16:52 -0400)]
lib: mgmtd: simplify implicit commit code

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agolib: mgmtd: make error handling more robust 13764/head
Christian Hopps [Fri, 9 Jun 2023 15:03:54 +0000 (11:03 -0400)]
lib: mgmtd: make error handling more robust

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agotests: Apply black formatting for rip_topo1/ripng_topo1 13767/head
Donatas Abraitis [Mon, 12 Jun 2023 08:45:03 +0000 (11:45 +0300)]
tests: Apply black formatting for rip_topo1/ripng_topo1

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
22 months agotests: Use run_and_expect() for ripng_topo1
Donatas Abraitis [Mon, 12 Jun 2023 08:40:09 +0000 (11:40 +0300)]
tests: Use run_and_expect() for ripng_topo1

Avoid checking once and failing immediately.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
22 months agotests: Use run_and_expect() for rip_topo1
Donatas Abraitis [Mon, 12 Jun 2023 08:35:37 +0000 (11:35 +0300)]
tests: Use run_and_expect() for rip_topo1

Avoid checking once and failing immediately.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
22 months agoMerge pull request #13762 from anlancs/doc/pthread-typo
Donatas Abraitis [Mon, 12 Jun 2023 08:13:49 +0000 (11:13 +0300)]
Merge pull request #13762 from anlancs/doc/pthread-typo

doc: Adjust pthread description

22 months agotests: add mgmtd config test 13763/head
Christian Hopps [Mon, 12 Jun 2023 04:58:03 +0000 (00:58 -0400)]
tests: add mgmtd config test

Testing early exits/ends from config files loaded with `vtysh -f cfgfile`
as well as `vtysh < cfgfile`, verify the same as non-mgmtd behavior.

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agolib: mgmtd: fix/stdize debug message macros
Christian Hopps [Mon, 12 Jun 2023 04:25:07 +0000 (00:25 -0400)]
lib: mgmtd: fix/stdize debug message macros

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agomgmtd: remove unused code
Christian Hopps [Fri, 9 Jun 2023 20:54:13 +0000 (16:54 -0400)]
mgmtd: remove unused code

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agolib: mgmtd: session create and destroy both short-circuit
Christian Hopps [Mon, 12 Jun 2023 02:13:48 +0000 (22:13 -0400)]
lib: mgmtd: session create and destroy both short-circuit

For creation this is the first thing done so short-circuit just means inline
sync response. However, for destroy there could be commands in-flight, these
will be discarded when they match no session, and the state cleaned up
immediately when the message short-circuits.

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agolib: mgmtd: avoid recursion with vty_close and add error log
Christian Hopps [Mon, 12 Jun 2023 02:19:54 +0000 (22:19 -0400)]
lib: mgmtd: avoid recursion with vty_close and add error log

Avoid recursion into vty_close() when being notified of a session closure that
happened inside vty_close().

If a vty is closed with outstanding config yet to be commited
issue a warning that it is being lost.

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agovtysh: stop reading config file if user `exit`s from root level.
Christian Hopps [Sun, 11 Jun 2023 21:53:10 +0000 (17:53 -0400)]
vtysh: stop reading config file if user `exit`s from root level.

This is required to make sure that we properly send the
XFRR_end_configuration tag to the daemons. Previously if the user had an
`exit` at the root level the parser would just drop out of the config
node and so XFRR_end_configuration, even if sent, would be ignored

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agostaticd: staticd no longer loads config files
Christian Hopps [Sat, 10 Jun 2023 03:15:12 +0000 (23:15 -0400)]
staticd: staticd no longer loads config files

We need to ignore SIGHUP rather than reload config now.

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agodoc: Adjust pthread description 13762/head
anlan_cs [Mon, 12 Jun 2023 04:56:24 +0000 (12:56 +0800)]
doc: Adjust pthread description

Refer to the latest code, modified the description of pthread.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
22 months agoMerge pull request #13752 from donaldsharp/fix_suppress_fib_test
Donatas Abraitis [Sun, 11 Jun 2023 18:40:09 +0000 (21:40 +0300)]
Merge pull request #13752 from donaldsharp/fix_suppress_fib_test

tests: Fix missing assert for test case in bgp_suppress_fib

22 months agoMerge pull request #13675 from zmw12306/bfd_version_check
Igor Ryzhov [Sun, 11 Jun 2023 11:16:50 +0000 (14:16 +0300)]
Merge pull request #13675 from zmw12306/bfd_version_check

bfd:fix version bits check

22 months agoMerge pull request #13743 from LabNConsulting/chopps/docker-ci-update
Donatas Abraitis [Sun, 11 Jun 2023 11:13:14 +0000 (14:13 +0300)]
Merge pull request #13743 from LabNConsulting/chopps/docker-ci-update

docker: ubuntu-ci 18.04 -> 22.04, topotest parallel run examples

22 months agoMerge pull request #13727 from anlancs/pimd/cleanup-1
mobash-rasool [Fri, 9 Jun 2023 17:00:44 +0000 (22:30 +0530)]
Merge pull request #13727 from anlancs/pimd/cleanup-1

pimd: adjust the display for debug

22 months agozebra: bugfix dplane priority sorting 13755/head
G. Paul Ziemba [Fri, 9 Jun 2023 13:58:20 +0000 (06:58 -0700)]
zebra: bugfix dplane priority sorting

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
22 months agotests: Fix missing assert for test case in bgp_suppress_fib 13752/head
Donald Sharp [Fri, 9 Jun 2023 13:25:29 +0000 (09:25 -0400)]
tests: Fix missing assert for test case in bgp_suppress_fib

Test was attempting to test the 60.0.0.0 route but was querying
10.0.0.3 and ignoring the result.  Let's fix it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
22 months agodocker: ubuntu-ci 18.04 -> 22.04, topotest parallel run examples 13743/head
Christian Hopps [Thu, 8 Jun 2023 17:47:01 +0000 (13:47 -0400)]
docker: ubuntu-ci 18.04 -> 22.04, topotest parallel run examples

Update the READMEs, and give example of a full parallel topotest run with
result extraction for analyze.py

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agoMerge pull request #13745 from FRRouting/revert-13509-bgp_nht_other_if_cases
Christian Hopps [Fri, 9 Jun 2023 07:07:07 +0000 (03:07 -0400)]
Merge pull request #13745 from FRRouting/revert-13509-bgp_nht_other_if_cases

Revert "bgpd: upon if up event, evaluate bnc with matching nexthop"

22 months agoMerge pull request #13734 from LabNConsulting/chopps/removeunused
Jafar Al-Gharaibeh [Fri, 9 Jun 2023 04:46:45 +0000 (23:46 -0500)]
Merge pull request #13734 from LabNConsulting/chopps/removeunused

remove mentions of socat

22 months agoMerge pull request #13739 from donaldsharp/zebra_dplane_crash
Jafar Al-Gharaibeh [Fri, 9 Jun 2023 04:44:55 +0000 (23:44 -0500)]
Merge pull request #13739 from donaldsharp/zebra_dplane_crash

zebra: Prevent crash because nl is NULL on shutdown

22 months agoRevert "bgpd: upon if up event, evaluate bnc with matching nexthop" revert-13509-bgp_nht_other_if_cases 13745/head
Donald Sharp [Fri, 9 Jun 2023 03:17:53 +0000 (23:17 -0400)]
Revert "bgpd: upon if up event, evaluate bnc with matching nexthop"

22 months agoMerge pull request #13730 from anlancs/doc/thread-event-typo
Jafar Al-Gharaibeh [Thu, 8 Jun 2023 21:02:59 +0000 (16:02 -0500)]
Merge pull request #13730 from anlancs/doc/thread-event-typo

doc: Adjust event system

22 months agoMerge pull request #13596 from Pdoijode/pdoijode/ospf-intf-json-changes
Jafar Al-Gharaibeh [Thu, 8 Jun 2023 19:03:14 +0000 (14:03 -0500)]
Merge pull request #13596 from Pdoijode/pdoijode/ospf-intf-json-changes

ospfd: json hierarchy change for "show ip ospf interface json"

22 months agoMerge pull request #13509 from pguibert6WIND/bgp_nht_other_if_cases
Donatas Abraitis [Thu, 8 Jun 2023 17:19:48 +0000 (20:19 +0300)]
Merge pull request #13509 from pguibert6WIND/bgp_nht_other_if_cases

bgpd: upon if up event, evaluate bnc with matching nexthop

22 months agoMerge pull request #13664 from routingrocks/pim_nb_fix
Donatas Abraitis [Thu, 8 Jun 2023 17:16:32 +0000 (20:16 +0300)]
Merge pull request #13664 from routingrocks/pim_nb_fix

pimd: Change in PIM northbound error, when a path to RP is not found …

22 months agoMerge pull request #13364 from zmw12306/bfd_auth
Donatas Abraitis [Thu, 8 Jun 2023 17:12:29 +0000 (20:12 +0300)]
Merge pull request #13364 from zmw12306/bfd_auth

bfd: fix missing Authentication in control pkt

22 months agoMerge pull request #13650 from opensourcerouting/feature/bgpd_default_originate_route...
Quentin Young [Thu, 8 Jun 2023 16:05:35 +0000 (12:05 -0400)]
Merge pull request #13650 from opensourcerouting/feature/bgpd_default_originate_route_map_timer

bgpd: Add an ability to control default-originate route-map timer

22 months agozebra: Prevent crash because nl is NULL on shutdown 13739/head
Donald Sharp [Thu, 8 Jun 2023 16:03:49 +0000 (12:03 -0400)]
zebra: Prevent crash because nl is NULL on shutdown

When shutting down the main pthread was first closing
the sockets associated with the dplane pthread and
then telling it to shutdown the pthread at a later point
in time.  This caused the dplane to crash because the nl
data has been freed already.  Change the shutdown order
to stop the dplane pthread *and* then close the sockets.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
22 months agoMerge pull request #13645 from idryzhov/bfd-nb-destroy
Christian Hopps [Thu, 8 Jun 2023 15:19:40 +0000 (11:19 -0400)]
Merge pull request #13645 from idryzhov/bfd-nb-destroy

bfdd: remove redundant nb destroy callbacks

22 months agodoc: update doc removing socat req + remove unused tests code 13734/head
Christian Hopps [Thu, 8 Jun 2023 12:37:27 +0000 (08:37 -0400)]
doc: update doc removing socat req + remove unused tests code

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agoMerge pull request #13726 from LabNConsulting/chopps/fixpim6topotest
Jafar Al-Gharaibeh [Thu, 8 Jun 2023 13:47:15 +0000 (08:47 -0500)]
Merge pull request #13726 from LabNConsulting/chopps/fixpim6topotest

tests: fixing pim6 topotest bugs

22 months agotests: convert old pim test to more cleanly use pytest fixture 13726/head
Christian Hopps [Thu, 8 Jun 2023 08:12:26 +0000 (04:12 -0400)]
tests: convert old pim test to more cleanly use pytest fixture

This is a good way to run a per-test background helper process. Here the
helper object is created before the test function requesting it (through param
name match), and then cleaned up after the test function exits (pass or failed).

A context manager is used to further guarantee the cleanup is done.

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agotests: fixing pim6 topotest bugs
Christian Hopps [Thu, 8 Jun 2023 06:42:32 +0000 (02:42 -0400)]
tests: fixing pim6 topotest bugs

- Remove use of bespoke socat
- Use ipv6 support in mcast-tester.py
- do not run processes in the background behind munet/micronet's
  back with `&` (ever) -- use popen or the helper class

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agoMerge pull request #13421 from mobash-rasool/igmp-ups2
Donatas Abraitis [Thu, 8 Jun 2023 07:46:38 +0000 (10:46 +0300)]
Merge pull request #13421 from mobash-rasool/igmp-ups2

pimd, pim6d: re-arrange some code and pimv6 deletion flow fix

22 months agodoc: Adjust event system 13730/head
anlan_cs [Wed, 7 Jun 2023 09:29:30 +0000 (17:29 +0800)]
doc: Adjust event system

Refer to the latest code, modify the description of event system.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
22 months agoMerge pull request #13390 from ryndia/master
Donatas Abraitis [Thu, 8 Jun 2023 07:02:28 +0000 (10:02 +0300)]
Merge pull request #13390 from ryndia/master

ospfd: ospf_route.c memory leak fix

22 months agotests: mcast-tester.py handles IPv6
Christian Hopps [Thu, 8 Jun 2023 06:11:50 +0000 (02:11 -0400)]
tests: mcast-tester.py handles IPv6

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agopimd: adjust the display for debug 13727/head
anlan_cs [Thu, 8 Jun 2023 02:00:48 +0000 (10:00 +0800)]
pimd: adjust the display for debug

The vrf name should be separated when it is displayed. And remove
unnecessary space after number.

Before:
```
pim_upstream_sg_running: (100.100.1.100,232.100.100.100)x is not installed in mroute
pim_upstream_del(pim_ifchannel_delete): Delete (100.100.1.100,232.100.100.100)[x] ref count: 1 , flags: 1048585 c_oil ref count 2 (Pre decrement)
```

After:
```
pim_upstream_sg_running: (100.100.1.100,232.100.100.100)[x] is not installed in mroute
pim_upstream_del(pim_ifchannel_delete): Delete (100.100.1.100,232.100.100.100)[x] ref count: 1, flags: 1048585 c_oil ref count 2 (Pre decrement)
```

Signed-off-by: anlan_cs <vic.lan@pica8.com>
22 months agoMerge pull request #13624 from Keelan10/bgp_flowspec-leak-fix
Donald Sharp [Wed, 7 Jun 2023 21:36:03 +0000 (17:36 -0400)]
Merge pull request #13624 from Keelan10/bgp_flowspec-leak-fix

bgpd: Free temp memory

22 months agoMerge pull request #11560 from patrasar/fix_pim6_state_on_prune
David Lamparter [Wed, 7 Jun 2023 13:39:45 +0000 (15:39 +0200)]
Merge pull request #11560 from patrasar/fix_pim6_state_on_prune

22 months agopimd, pim6d: Move mld/igmp deletion code to a common api 13421/head
Mobashshera Rasool [Thu, 1 Jun 2023 09:04:44 +0000 (02:04 -0700)]
pimd, pim6d: Move mld/igmp deletion code to a common api

Move the mld/igmp deletion common code to api pim_gm_interface_delete
code for IPv6 deletion(gm_ifp_teardown) for MLD was missing in this flow
Making the code common fixes this too.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
22 months agopimd, pim6d: Rename and move api pim_cmd_interface_delete
Mobashshera Rasool [Thu, 1 Jun 2023 08:56:41 +0000 (01:56 -0700)]
pimd, pim6d: Rename and move api pim_cmd_interface_delete

Rename pim_cmd_interface_delete to pim_pim_interface_delete
and move the api to pimd/pim_iface.c

Changed the return type of the api from int to void.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
22 months agopimd, pim6d: Move api pim_if_membership_clear
Mobashshera Rasool [Tue, 3 Jan 2023 13:37:34 +0000 (05:37 -0800)]
pimd, pim6d: Move api pim_if_membership_clear

Move pim_if_membership_clear api from pimd/pim_nb_config.c
to pimd/pim_iface.c
Also fixed curly braces warning
WARNING: braces {} are not necessary for single statement blocks
1773: FILE: /tmp/f1-127504/pim_iface.c:1773:

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
22 months agoMerge pull request #13622 from kuldeepkash/bgp_always_compare_med
Donatas Abraitis [Wed, 7 Jun 2023 06:36:15 +0000 (09:36 +0300)]
Merge pull request #13622 from kuldeepkash/bgp_always_compare_med

tests: Adding bgp_always_compare_med testuite

22 months agoMerge pull request #13693 from chiragshah6/fdev2
Donatas Abraitis [Wed, 7 Jun 2023 06:22:46 +0000 (09:22 +0300)]
Merge pull request #13693 from chiragshah6/fdev2

tools: fix list value remove in frr-reload

22 months agoMerge pull request #13706 from LabNConsulting/chopps/close-files-coverity
Donatas Abraitis [Wed, 7 Jun 2023 06:12:56 +0000 (09:12 +0300)]
Merge pull request #13706 from LabNConsulting/chopps/close-files-coverity

lib: close config files after reading (coverity)

22 months agoMerge pull request #13707 from LabNConsulting/chopps/coverity-strftime
Donatas Abraitis [Wed, 7 Jun 2023 06:12:31 +0000 (09:12 +0300)]
Merge pull request #13707 from LabNConsulting/chopps/coverity-strftime

mgmtd: assert an assertion for coverity

22 months agoMerge pull request #13709 from Jafaral/pkg-9.1
Donatas Abraitis [Wed, 7 Jun 2023 06:11:08 +0000 (09:11 +0300)]
Merge pull request #13709 from Jafaral/pkg-9.1

debian, redhat: updating changelog for new release

22 months agodebian, redhat: updating changelog for new release 13709/head
Jafar Al-Gharaibeh [Tue, 6 Jun 2023 20:21:30 +0000 (15:21 -0500)]
debian, redhat: updating changelog for new release

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
22 months agoMerge pull request #13697 from sri-mohan1/srib-ldpd1
Donatas Abraitis [Tue, 6 Jun 2023 19:57:08 +0000 (22:57 +0300)]
Merge pull request #13697 from sri-mohan1/srib-ldpd1

ldpd: changes for code maintainability

22 months agomgmtd: assert an assertion for coverity 13707/head
Christian Hopps [Tue, 6 Jun 2023 19:12:58 +0000 (15:12 -0400)]
mgmtd: assert an assertion for coverity

I believe coverity can't tell the length of the return value from strftime based
on the format string (like we can), so it allows `n` to be larger than it could
be which then allows `sz - n` to be negative which is size_t positive and very
large so it thinks an overrun is possible.

CID#1563211

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agobuild: FRR 9.1 development version frr-9.1-dev
Jafar Al-Gharaibeh [Tue, 6 Jun 2023 19:03:19 +0000 (14:03 -0500)]
build: FRR 9.1 development version

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
22 months agoMerge pull request #13701 from opensourcerouting/fix/update_show_ip_bgp_summary_doc base_9.0
Donald Sharp [Tue, 6 Jun 2023 18:55:52 +0000 (14:55 -0400)]
Merge pull request #13701 from opensourcerouting/fix/update_show_ip_bgp_summary_doc

doc: Document RFC8212 under `Displaying BGP Information` section

22 months agoMerge pull request #13687 from donaldsharp/eigrp_fakeout
Jafar Al-Gharaibeh [Tue, 6 Jun 2023 18:53:27 +0000 (13:53 -0500)]
Merge pull request #13687 from donaldsharp/eigrp_fakeout

tests: Babel tests do not need to log to eigrp

22 months agolib: close config files after reading (coverity) 13706/head
Christian Hopps [Tue, 6 Jun 2023 18:27:04 +0000 (14:27 -0400)]
lib: close config files after reading (coverity)

fixes coverity CID# 1564375

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agotests: Babel tests do not need to log to eigrp 13687/head
Donald Sharp [Mon, 5 Jun 2023 12:28:22 +0000 (08:28 -0400)]
tests: Babel tests do not need to log to eigrp

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
22 months agodoc: Document RFC8212 under `Displaying BGP Information` section 13701/head
Donatas Abraitis [Tue, 6 Jun 2023 12:22:44 +0000 (15:22 +0300)]
doc: Document RFC8212 under `Displaying BGP Information` section

Looks like people don't find what does it mean (Policy) at first shot, let's
try giving more hints here.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
22 months agoMerge pull request #13690 from LabNConsulting/chopps/mgmtd-cleanup
Donald Sharp [Tue, 6 Jun 2023 11:22:31 +0000 (07:22 -0400)]
Merge pull request #13690 from LabNConsulting/chopps/mgmtd-cleanup

Chopps/mgmtd cleanup

22 months agoMerge pull request #13618 from LabNConsulting/chopps/fixlogging
Martin Winter [Tue, 6 Jun 2023 09:35:20 +0000 (02:35 -0700)]
Merge pull request #13618 from LabNConsulting/chopps/fixlogging

22 months agoldpd: changes for code maintainability 13697/head
sri-mohan1 [Tue, 6 Jun 2023 09:07:08 +0000 (14:37 +0530)]
ldpd: changes for code maintainability

these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
22 months agoMerge pull request #13649 from donaldsharp/unlock_the_node_or_else
Donatas Abraitis [Tue, 6 Jun 2023 05:52:40 +0000 (08:52 +0300)]
Merge pull request #13649 from donaldsharp/unlock_the_node_or_else

zebra: Unlock the route node when sending route notifications

22 months agoMerge pull request #13689 from sri-mohan1/srib-ldpd1
Donatas Abraitis [Tue, 6 Jun 2023 05:43:36 +0000 (08:43 +0300)]
Merge pull request #13689 from sri-mohan1/srib-ldpd1

ldpd: changes for code maintainability

22 months agotools: fix list value remove in frr-reload 13693/head
Chirag Shah [Tue, 6 Jun 2023 04:48:12 +0000 (21:48 -0700)]
tools: fix list value remove in frr-reload

There might be a time element(s) from
temporary list are removed more than once
which leads to valueError in certain python3
version.

commit-id 1543f58b5 did not handle valueError
properly. This caused regression where
prefix-list config leads to delete followed
by add.

The new fix should just pass the exception as
value removal from list_to_add or list_to_del
is best effort.
This allows prefix-list config has no change
then removes the lines from lines_to_del and
lines_to_add properly.

Ticket:#3490252
Testing:

Configure prefix-list in frr.conf and perform
multiple frr-reload. After first reload operatoin
subsequent ones should not result in delete followed
by add of the prefix-list but rather no-op operation.

(Pdb) lines_to_add
[(('ip prefix-list FOO permit 10.2.1.0/24',), None)]
(Pdb) lines_to_del
[(('ip prefix-list FOO seq 5 permit 10.2.1.0/24',), None),
 (('ip prefix-list FOO seq 10 permit 10.2.1.0/24',), None)]
(Pdb) lines_to_del_to_del
[(('ip prefix-list FOO seq 5 permit 10.2.1.0/24',), None),
 (('ip prefix-list FOO seq 10 permit 10.2.1.0/24',), None)]
(Pdb) lines_to_add_to_del
[(('ip prefix-list FOO permit 10.2.1.0/24',), None),
 (('ip prefix-list FOO permit 10.2.1.0/24',), None)]
(Pdb) c
> /usr/lib/frr/frr-reload.py(1562)ignore_delete_re_add_lines()
-> return (lines_to_add, lines_to_del)
(Pdb) lines_to_add
[]
(Pdb) lines_to_del
[]

Signed-off-by: Chirag Shah <chirag@nvidia.com>
22 months agoMerge pull request #13670 from donaldsharp/coverity_99
Donatas Abraitis [Mon, 5 Jun 2023 19:33:55 +0000 (22:33 +0300)]
Merge pull request #13670 from donaldsharp/coverity_99

Coverity 99

22 months agomgmtd: rm unused/unneeded code add couple comments 13690/head
Christian Hopps [Sun, 4 Jun 2023 22:09:25 +0000 (18:09 -0400)]
mgmtd: rm unused/unneeded code add couple comments

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agoldpd: changes for code maintainability 13689/head
sri-mohan1 [Mon, 5 Jun 2023 19:09:42 +0000 (00:39 +0530)]
ldpd: changes for code maintainability

these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>