Commit Graph

30815 Commits

Author SHA1 Message Date
Louis Scalbert
66a45dae56 doc: add extended admin-group user documentation
Add the extended admin-group user documentation using affinity-maps.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-02-10 14:13:46 +01:00
Louis Scalbert
7d46f8dded tests: add extended admin-group test in isis_te_topo1
Add extended admin-group test in isis_te_topo1

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-02-10 14:13:46 +01:00
Louis Scalbert
bd0581e434 lib,isisd: add extended admin-group info into the ted
Add extended admin-group info into the ted.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-02-10 13:52:03 +01:00
Louis Scalbert
ae251b8684 lib,zebra: add affinity-map configuration hooks
Add affinity-map hooks to check the utilization of affinity-map in
link-params before its deletion and to update link-params when the
affinity-map bit-position is updated.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-02-10 13:52:01 +01:00
Louis Scalbert
fa1b95c3ec isisd: add extended admin-group
Add to the Extended IS Reachability TLV the support of Extended
Administrative-Groups (RFC7308)

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-02-10 11:31:06 +01:00
Louis Scalbert
6c2cafdcb0 lib: extend sbuf size
sbuf variable is used among other things to store IS-IS database output.
Future commits will introduce the output of extended access groups in
the "show isis database detail" output.

Extend the sbuf size to have chance to store all information.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-02-10 11:31:05 +01:00
Louis Scalbert
158332617d lib,yang,zebra: add extended admin-group support
Add the support of Extended Admin-Group (RFC7308) to the zebra interface
link-params Traffic-Engineering context.

Extended admin-groups can be configured with the affinity-map:

> affinity-map blue bit-position 221
> int eth-rt1
>  link-params
>   affinity blue
>  exit-link-params

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-02-10 11:31:05 +01:00
Hiroki Shirokura
c86a325285 lib: add copy function for bitfield_t
Add a function to copy a bitfield_t structure.

Add a ‘void *’ to ‘word_t *’ converstion in bf_init() to avoid the
following error:

> ./lib/bitfield.h: In function ‘bf_copy’:
> ./lib/bitfield.h:75:12: error: request for implicit conversion from ‘void *’ to ‘word_t *’ {aka ‘unsigned int *’} not permitted in C++ [-Werror=c++-compat]
>    (v).data = XCALLOC(MTYPE_BITFIELD, ((v).m * sizeof(word_t)));  \
>             ^
> ./lib/bitfield.h:278:2: note: in expansion of macro ‘bf_init’
>   bf_init(dst, WORD_SIZE * (src.m - 1));
>   ^~~~~~~

Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-02-09 15:48:39 +01:00
Louis Scalbert
8300f2f56c isisd: add affinity-map support
Add the support of the affinity-map command to isisd.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-02-09 15:48:38 +01:00
Louis Scalbert
05a12619dd lib,yang,zebra: add affinity-map support
Add the affinity-map global command to zebra. The syntax is:

> affinity-map NAME bit-position (0-1023)

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-02-09 15:48:21 +01:00
Olivier Dugeon
ad1327b3d4
Merge pull request #12730 from louis-6wind/fix-ext-te-metrics
Fix for Extended TE metrics
2023-02-09 15:12:41 +01:00
mobash-rasool
3e5da1fbae
Merge pull request #12773 from donaldsharp/pbr_table_values
pbrd: fix large tableids displayed as negative
2023-02-09 16:17:54 +05:30
Donatas Abraitis
f83956c06d
Merge pull request #12738 from taspelund/adj-rib-specific
Improvements to advertised/received/bestpath-routes commands
2023-02-09 11:02:11 +02:00
Wesley Coakley
8dc2001c91 pbrd: fix large tableids displayed as negative
Ticket: 2699411
Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
2023-02-08 16:28:27 -05:00
Trey Aspelund
200631aa65 doc: optional keyword info for bestpath-routes
Adds information about the optional keywords for the bestpath-routes
bgp show command.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2023-02-08 21:07:02 +00:00
Trey Aspelund
bda4a61288 doc: prefix match for advertised/received-routes
Doc changes for new prefix matching.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2023-02-08 21:07:02 +00:00
Trey Aspelund
3880b4ece4 bgpd: prefix match for advertised/received-routes
This introduces the option for a user to lookup one specific prefix in
the advertised-routes or received-routes table of a peer.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2023-02-08 21:06:10 +00:00
Trey Aspelund
aa9bf57eb8 bgpd: add 'detail' option to bestpath-routes
Introduce 'detail' keyword for 'show bgp <afi> <safi> bestpath-routes'.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2023-02-08 20:55:00 +00:00
Donatas Abraitis
5a77b9d61d
Merge pull request #12769 from donaldsharp/missing_syslog
tools: Fix missing pbrd in rsyslog.d 45-frr.conf file
2023-02-08 22:40:32 +02:00
Donatas Abraitis
b9f352f0ab
Merge pull request #12768 from louis-6wind/fix-grep-vpnv4-noretain
tests: do not use exclude grep
2023-02-08 21:53:19 +02:00
Donald Sharp
7386031781 tools: Fix missing pbrd in rsyslog.d 45-frr.conf file
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-02-08 13:04:01 -05:00
Louis Scalbert
a8d6faa986 tests: do not use exclude grep
Filter out keys in JSON output with "grep -v" does not work when JSON
does not use the pretty format.

Use native python code to filter out keys.

Fixes: 6c13bd5744 ("topotests: fix bgp_vpnv4_noretain")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-02-08 12:05:15 +01:00
Donatas Abraitis
e7765b81ce
Merge pull request #12761 from anlancs/fix/bgpd-crash-evpn-vni-both-rts
bgpd: fix use-after-free crash for evpn
2023-02-08 10:07:07 +02:00
Donatas Abraitis
197c3a768c
Merge pull request #12654 from Pdoijode/evpn-evi-detail-json-changes
zebra: fix JSON fields for show evpn vni detail
2023-02-07 23:31:53 +02:00
Donatas Abraitis
96475dfde9
Merge pull request #12707 from donaldsharp/missed_enums
Missed enums
2023-02-07 22:22:27 +02:00
Donald Sharp
bbdbc828b3
Merge pull request #12759 from opensourcerouting/fix/revalidate_commit_on_pr_update
tools: Revalidate commits when PR is updated
2023-02-07 15:13:50 -05:00
Donatas Abraitis
8428482abb tools: Fetch more commits for commitlint to validate the commit
Note: It's necessary that you specify the fetch-depth argument to
actions/checkout@v2 step. By default they fetch only latest commit of the
branch, but we need more commits since we validate a range of commit messages.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-02-07 22:03:42 +02:00
Donatas Abraitis
0a18c855fd tools: Revalidate commits when PR is updated
Trigger GH action also if labeled, unlabeled.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-02-07 21:55:31 +02:00
Donald Sharp
48d4629d1b
Merge pull request #12756 from opensourcerouting/fix/add_build_to_commits
tools: Add `build` as a valid prefix for commit messages
2023-02-07 14:50:00 -05:00
Donatas Abraitis
5e66e742d7 tools: Add build as a valid prefix for commit messages
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-02-07 21:41:20 +02:00
Donatas Abraitis
16c38045b1 build: FRR 9.0 development version
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-02-07 21:25:42 +02:00
Jafar Al-Gharaibeh
2285f5aca8
Merge pull request #12722 from opensourcerouting/vim-xref
tools: add `GotoXref` vim script
2023-02-07 10:43:27 -06:00
Jafar Al-Gharaibeh
6e1ae0137d
Merge pull request #12715 from opensourcerouting/fix/contribution_guid_squash_random_commits
Commits hygiene
2023-02-07 10:42:53 -06:00
Russ White
0b1a6ca322
Merge pull request #12748 from opensourcerouting/fix/route_map_vpn_import
tests: Check if route-map vpn import basic funtionality works fine
2023-02-07 11:40:03 -05:00
Russ White
24caf3069b
Merge pull request #12720 from opensourcerouting/fix/ecommunity_ipv6_missing_token
bgpd: ecommunity_token_rt6 is not handled
2023-02-07 09:21:07 -05:00
Donatas Abraitis
b313408c01
Merge pull request #12741 from thesamesam/missing-time
pceplib: add <time.h> include for time_t
2023-02-07 11:05:46 +02:00
Sam James
3c8c112df4
pceplib: add <time.h> include for time_t
Fixes build on musl. Used for time_t in the header.

Bug: https://bugs.gentoo.org/862558
Signed-off-by: Sam James <sam@gentoo.org>
2023-02-06 20:31:22 +00:00
Donatas Abraitis
4ee5265aa7 bgpd: Add more context in logs about from where to where routes are leaked
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-02-06 18:44:11 +02:00
Donatas Abraitis
1aa2c93e2c bgpd: Drop struct bgp from vpn_leak_to_vrf_withdraw()
Not used at all, just drop it.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-02-06 18:44:11 +02:00
Donatas Abraitis
1c2ba4a23f tests: Check if route-map vpn import basic funtionality works fine
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-02-06 18:44:10 +02:00
anlan_cs
432ff4b036 bgpd: fix use-after-free crash for evpn
```
anlan(config-router-af)# vni 33
anlan(config-router-af-vni)# route-target both 44:55
anlan(config-router-af-vni)# no route-target both 44:55
vtysh: error reading from bgpd: Resource temporarily unavailable (11)Warning: closing connection to bgpd because of an I/O error!
```

When `bgp_evpn_vni_rt_cmd` deals with "both" type, it wrongly created
only one node ( should be two nodes ) for lists of both `vpn->import_rtl` and
`vpn->export_rtl`.  At this time, the two lists are already wrong.

In `no route-target both RT`, it will free the single node from lists of both
`vpn->import_rtl` and `vpn->export_rtl`.  After freed from `vpn->import_rtl`,
it is "use-after-free" at the time of freeing it from `vpn->export_rtl`.
It causes crash sometimes, or other unexpected behaviours.

This issue is introduced by commit `3b7e8d`, which have adjusted both
`bgp_evpn_vni_rt_cmd` and `bgp_evpn_vrf_rt_cmd`.

Since `bgp_evpn_vrf_rt_cmd/no_bgp_evpn_vrf_rt_cmd` works well again
unintentionally with commit `7022da`, only `bgp_evpn_vni_rt_cmd` needs to
modify - add two nodes for "both" type and some explicit comments for this
special case of "both" type.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2023-02-06 21:39:22 +08:00
Donatas Abraitis
d83c36ee44
Merge pull request #12740 from vfreex/babel-fix-filtering
babeld: Fix filtering against all interfaces
2023-02-06 15:24:56 +02:00
Yuxiang Zhu
0f9650ca95 babeld: Fix filtering against all interfaces
The first argument of `access_list_lookup` and `prefix_list_lookup`
should be `AFI_` constants instead of `AF_` constants.

Signed-off-by: Yuxiang Zhu <vfreex@gmail.com>
2023-02-06 11:08:25 +00:00
Donatas Abraitis
51c48bdefd
Merge pull request #12668 from anlancs/fix/zebra-evpn-missing-advertise
zebra: fix wrong conversion for evpn advertising
2023-02-04 12:52:22 +02:00
Mark Stapp
9d5c511864
Merge pull request #12732 from donaldsharp/fix_bgp_open_issues
bgpd: Don't try to recursively hold peer io mutex
2023-02-03 07:17:00 -05:00
Donald Sharp
f1b1efdefc bgpd: Don't try to recursively hold peer io mutex
BGP was modified in a0b937de42
to grab the peer->io_mtx before validating the header to ensure
that the input Queue was not being modified by anyone else at that
moment in time.  Unfortunately validate_header can detect a problem
and attempt to relock the mutex, which deadlocks.  This deadlock in
the bgp_io pthread is the lone deadlock at first, eventually though
bgp attempts to write another packet to the peer( say when the
it's time to send the next packet ) and the main pthread of bgpd
becomes deadlocked and then the whole bgpd process is stuck at that
point in time leaving us dead in the water.

The point of locking the mutex earlier was to ensure that the input
Queue wasn't being modified by anyone else, (Say reading off it )
as that we wanted to ensure that we don't hold more packets then necessary.

Let's grab the mutex long enough to look at the input Q size, this
ensure that we have room and then we can validate_header and do the right
thing from there.  We'll need to lock the mutex when we actually move it
into the input Q as well.

Fixes: #12725
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-02-02 16:39:01 -05:00
Russ White
73fb874e0a
Merge pull request #12731 from donaldsharp/remove_pretty_print
lib, bgpd: Add ability to specify that some json output should not be…
2023-02-02 15:44:45 -05:00
Donald Sharp
2d4460de6f bgpd: Convert evpn output to not pretty print json
Commit: 3cdb03fba7
changed the vty_json output to not be pretty printing.
The previous commit in the tree added vty_json_no_pretty
let's use that instead

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-02-02 10:42:21 -05:00
Donald Sharp
d7c6467ba2 lib, bgpd: Add ability to specify that some json output should not be pretty
Initial commit: 23b2a7ef52
changed the json output of `show bgp <afi> <safi> json` to
not have pretty print because when under a situation where
there are a bunch of routes with a large scale ecmp show
output was taking forever and this commit cut 2 minutes out
of vtysh run time.

Subusequent commit: f4ec52f7cc
changed this back.

When upgrading to latest version the long run time was noticed
due to testing.  Let's add back this functionality such that
FRR can have reduced run times with vtysh when it's really
needed.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-02-02 10:28:19 -05:00
Louis Scalbert
e84179b6ef isisd: use the te anormal macro
Use the te anormal macro

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-02-02 16:20:46 +01:00