Commit Graph

30591 Commits

Author SHA1 Message Date
Donatas Abraitis
859cca2f70
Merge pull request #11290 from donaldsharp/bgp_auth_breakup
Bgp auth breakup
2022-05-27 09:52:59 +03:00
Donatas Abraitis
bfb8639395 doc, tools: Update release dates in workflow.rst
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-27 08:25:12 +03:00
Russ White
0f4d109b51
Merge pull request #11277 from donaldsharp/pim_prefix_list_bug
pimd: Allow the LPM match work properly with prefix lists and normal …
2022-05-26 17:47:21 -04:00
Christian Hopps
97385dddf1 ospfd: cli: add opaque data to json output
Signed-off-by: Christian Hopps <chopps@labn.net>
2022-05-26 17:27:18 -04:00
Donald Sharp
7e36aa0830
Merge pull request #11291 from opensourcerouting/fix/memory_leak_bgp_alias
bgpd: Memory leak for community alias
2022-05-26 17:22:00 -04:00
Russ White
53f681fc22
Merge pull request #11282 from donaldsharp/pim_v2_v3
pimd: Disable handling v3 igmp packets on an interface config'ed for v2
2022-05-26 15:59:39 -04:00
Donald Sharp
2ba7b5763a
Merge pull request #11287 from opensourcerouting/build-llvm-20220526
build: fix some corners for LLVM analysis tools
2022-05-26 15:14:36 -04:00
Donatas Abraitis
8cfa1e7846 bgpd: Simplify BGP community alias handling
Also, warn in CLI an operator if we are trying to overwrite an existing
community alias with an existing alias.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-26 20:15:35 +03:00
Donald Sharp
da72986a9b test: Abstract common functions from script break ups in test_bgp_auth.py
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-05-26 12:17:21 -04:00
Donald Sharp
f30959147f tests: Break up test_bgp_auth.py into 4 test scripts
This breakup converts run times for test_bgp_auth.py from
~9 minutes to just over 2 and a half minutes of run
time when running in parallel.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-05-26 12:17:17 -04:00
Donald Sharp
94dc0c4ed4 pimd: Allow the LPM match work properly with prefix lists and normal rp's
All rp_info's are being saved in the pim->rp_list and the non prefix-list
rp's are supposed to be saved in table pim->rp_table.  What was happening,
though, is that all the plists were being stored at the 224.0.0.0/4 node
of the tree(irrelevant to the fact that we should not be looking up the
non-prefix list rp's in the table) and since we can have multiple prefix lists
and only one rp_info stored at the 224.0.0.0/4 node of the tree, there can be situations
where the 224.0.0.0/4 node can be overwritten due to the order entered.

As such there exists situations where command enter ordering will cause
what we match to, change in pim_rp_find_match_group.

Fixes:

a) Do not store prefix list based rp_info's in the pim->rp_table
b) In pim_rp_find_match_group, ensure that the node lookup does
not correspond to a prefix list based node.
c) When in the situation there are both:
ip pim rp 4.5.6.7 224.0.0.0/16
ip pim rp 5.6.67.8 prefix-list FOO
ip prefix-list FOO permit 224.0.1.0/24
and we receive a group for 224.0.1.5, we were comparing the
224.0.0.0/16 to the 224.0.0.0/4 of the 5.6.67.8 group, when
FRR should have been comparing to entry that matched in the prefix-list

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-05-26 10:45:35 -04:00
David Lamparter
76ea392900 tools: fix unused variable in callgraph tool
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-05-26 16:11:12 +02:00
David Lamparter
9cef17c73e build: reformat makefile.py
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-05-26 16:11:12 +02:00
David Lamparter
dd3689e2c3 build: add a bunch of comments to makefile.py
... to (maybe?) make understandable what it's doing.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-05-26 16:11:12 +02:00
David Lamparter
e8422835f2 build: fix LLVM bitcode per-target CFLAGS
When automake decides to customize CFLAGS, use those for building LLVM
bitcode files too.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-05-26 16:11:12 +02:00
Donatas Abraitis
5b0f36a8f7 bgpd: Distinguish BGP community alias memory separately from community
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-26 15:43:42 +03:00
Donatas Abraitis
d13d137a1b bgpd: Fix memory leak for BGP community alias in CLI
Before:
```
root@spine1-debian-11:~/frr# vtysh -c 'show memory bgpd | include Large Community'
Large Community               :      100     40        4000      100      4000
Large Community value         :      100     12        2400      100      2400
root@spine1-debian-11:~/frr# for x in $(seq 1 100); do vtysh -c 'conf' -c 'bgp community alias 123:123:123 testas' > /dev/null; done
root@spine1-debian-11:~/frr# vtysh -c 'show memory bgpd | include Large Community'
Large Community               :      200     40        8000      200      8000
Large Community value         :      200     12        4800      200      4800
root@spine1-debian-11:~/frr# for x in $(seq 1 100); do vtysh -c 'conf' -c 'bgp community alias 123:123:123 testas' > /dev/null; done
root@spine1-debian-11:~/frr# vtysh -c 'show memory bgpd | include Large Community'
Large Community               :      300     40       12000      300     12000
Large Community value         :      300     12        7200      300      7200
root@spine1-debian-11:~/frr#
```

After:
```
root@spine1-debian-11:~/frr# vtysh -c 'show memory bgpd | include Large Community'
Large Community               :        0     40           0        1        56
Large Community display string:        0   8192           0        1      8200
Large Community value         :        0     12           0        1        24
root@spine1-debian-11:~/frr# for x in $(seq 1 100); do vtysh -c 'conf' -c 'bgp community alias 123:123:123 testas' > /dev/null; done
root@spine1-debian-11:~/frr# vtysh -c 'show memory bgpd | include Large Community'
Large Community               :        0     40           0        1        56
Large Community display string:        0   8192           0        1      8200
Large Community value         :        0     12           0        1        24
root@spine1-debian-11:~/frr#
```

After we call [l]community_str2com(), we should free the memory.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-26 15:31:35 +03:00
Donald Sharp
dcf6441e3f
Merge pull request #11281 from opensourcerouting/fix/gh_actions
github: Use pull_request_target as a target
2022-05-26 07:32:11 -04:00
Donald Sharp
8d65864d7a tools: Add show ip igmp statistics to support bundle gathering
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-05-25 20:06:22 -04:00
Donald Sharp
c7c5d685c0 pimd: Disable handling v3 igmp packets on an interface config'ed for v2
pimd is receiving v3 igmp packets on an interface that is setup as v2 and
causing the igmp group as configured on that interface to get a bit
wonky.

Add a check to receiving v3 packets and to drop the packet if the
igmp version configed on the interface is 2.

Fixes: #11105
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-05-25 20:05:49 -04:00
Stephen Worley
1ebae15eaf
Merge pull request #11244 from pguibert6WIND/flowspec_added_twice
zebra: avoid pbr iptable added twice when used with flowspec
2022-05-25 12:29:27 -04:00
Donatas Abraitis
4588d0cb49 github: Use pull_request_target as a target
And drop checkout action - not needed.

Due to the dangers inherent to automatic processing of PRs, GitHub’s standard
pull_request workflow trigger by default prevents write permissions and
secrets access to the target repository. However, in some scenarios such
access is needed to properly process the PR.

To this end the pull_request_target workflow trigger was introduced.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-25 19:07:40 +03:00
Donald Sharp
ad5124419f
Merge pull request #11279 from opensourcerouting/fix/labeler_gh_actions
github: Add permissions for labeler action
2022-05-25 11:44:28 -04:00
Olivier Dugeon
7700a88aa5 isisd: Stop fulfill MPLS table when SR is disabled
When Segment Routing is disabled, if isisd received LSP with Segment Routing
information, in particular prefix SIDs, it installs corresponding MPLS entries
while it should not as SR is disabled.

This patch adds extra control to verify if SR is enabled or not before
configuring MPLS LFIB & IP FIB with prefix SIDs and adjust SR & TI-LFA
tests accordingly.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2022-05-25 17:29:21 +02:00
Donatas Abraitis
e13d4745ef github: Add permissions for labeler action
Should solve this:

```
Error: HttpError: Resource not accessible by integration
Error: Resource not accessible by integration
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-25 18:25:42 +03:00
Donald Sharp
ed074aa182
Merge pull request #11239 from opensourcerouting/feature/topotests_for_notification_gr
tests: Add Notification support for Graceful-Restart tests
2022-05-25 10:07:49 -04:00
Donald Sharp
8550b3188d
Merge pull request #11245 from opensourcerouting/fix/doc_overview_package_url
doc: Use full URL for FRR keyword highlight
2022-05-25 10:06:48 -04:00
Donald Sharp
be4077b301
Merge pull request #11250 from opensourcerouting/feature/add_label_automatically_to_show_base_branch
github: Add base branch label to every PR to distinguish easily
2022-05-25 10:03:53 -04:00
Donatas Abraitis
ecdfbc7787
Merge pull request #11252 from Jafaral/rel-pkg
debian, redhat: update changelog for new release
2022-05-25 15:33:53 +03:00
Philippe Guibert
c9250e28e8 zebra: avoid pbr iptable added twice when used with flowspec
The usage of zebra dplane makes the job asyncronous which implies
that a given job will try to add an iptable, while the second job
will not know that its iptable is the same as the former one.

The below exabgp rules stand for two bgp flowspec rules sent to
the bgp device:

flow {
route {match {
source 185.228.172.73/32;
destination 0.0.0.0/0;
source-port >=49156&<=49159;
}then {redirect 213.242.114.113;}}
route {match {
source 185.228.172.73/32;
destination 0.0.0.0/0;
source-port >=49160&<=49163;
}then {redirect 213.242.114.113;}}
}

This rule creates a single iptable, but in fact, the same iptable
name is appended twice. This results in duplicated entries in the
iptables context. This also results in contexts not flushed, when
BGP session or 'flush' operation is performed.

iptables-save:
[..]
-A PREROUTING -m set --match-set match0x55baf4c25cb0 src,src -g match0x55baf4c25cb0
-A PREROUTING -m set --match-set match0x55baf4c25cb0 src,src -g match0x55baf4c25cb0
-A match0x55baf4c25cb0 -j MARK --set-xmark 0x100/0xffffffff
-A match0x55baf4c25cb0 -j ACCEPT
-A match0x55baf4c25cb0 -j MARK --set-xmark 0x100/0xffffffff
-A match0x55baf4c25cb0 -j ACCEPT
[..]

This commit addresses this issue, by checking that an iptable
context is not already being processed. A flag is added in the
original iptable context, and a check is done if the iptable
context is not already being processed for install or uinstall.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2022-05-25 14:26:28 +02:00
Olivier Dugeon
e207eaa32c
Merge pull request #11267 from donaldsharp/cspf_topo1_scale_fix
tests: Allow cspf_topo1 to function correctly at scale
2022-05-25 13:19:34 +02:00
Abhishek N R
ce5c686bb9 pim6d: Removed PIM_IPV == 4 flag
PIM_IPV == 4 is removed form function pim_cmd_show_ip_multicast_helper
as pim_zlookup.c is available for pimv6 aswell.

Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-05-24 22:51:10 -07:00
Donald Sharp
8cc19ddef5
Merge pull request #11268 from opensourcerouting/fix/drop_rpki_cli_server_redundand
bgpd: Drop redundand output under `show rpki prefix-table`
2022-05-24 17:51:22 -04:00
Donald Sharp
f0f993deca
Merge pull request #11270 from opensourcerouting/fix/docker_builds_centos
docker: CentOS/UBI adoptions for librtr 0.8.0
2022-05-24 17:50:34 -04:00
Donald Sharp
0f279e96ef
Merge pull request #11271 from opensourcerouting/fix/docker_build_alpine
docker: Use Alpine 3.15 for build
2022-05-24 17:49:33 -04:00
Donald Sharp
e197845712
Merge pull request #11266 from opensourcerouting/feature/rpki_cache_server_json
bgpd: Add JSON support for `show rpki cache-server`
2022-05-24 17:48:54 -04:00
Donatas Abraitis
cc4d121f9f bgpd: Add JSON support for show rpki cache-server
```
spine1-debian-11# sh rpki cache-server json
{
  "servers":[
    {
      "mode":"tcp",
      "host":"192.168.10.17",
      "port":"8283"
    },
    {
      "mode":"tcp",
      "host":"192.168.10.17",
      "port":"8282"
    }
  ]
}
spine1-debian-11# sh rpki cache-server
host: 192.168.10.17 port: 8283
host: 192.168.10.17 port: 8282
spine1-debian-11#
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-24 19:31:11 +03:00
Donald Sharp
0fe7b4f568
Merge pull request #11265 from opensourcerouting/fix/ssh_config_rpki
bgpd: Put ssh_config->port as integer, not as string in RPKI code
2022-05-24 12:05:14 -04:00
Donatas Abraitis
e59e44bacd docker: Use Alpine 3.15 for build
This has librtr 0.8.0, while 3.13 has 0.7.0.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-24 18:10:00 +03:00
Donatas Abraitis
c0fcf5cd8f
Merge pull request #11248 from donaldsharp/fix_pbr_topo1
tests: pbr_topo1 sometimes fails under really heavy load
2022-05-24 17:49:24 +03:00
Donatas Abraitis
8fbc0ab6bb docker: Install systemd-devel for centos7 build
```
error: Failed build dependencies:
	systemd-devel is needed by frr-8.3_git275938094422-01.el7.x86_64
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-24 17:27:41 +03:00
Donatas Abraitis
91dd071e9a docker: Use librtr 0.8.0 for centos/ubi builds
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-24 17:18:14 +03:00
Donatas Abraitis
0285264253 bgpd: Drop redundand output under show rpki prefix-table
This is already handled by a separate command `show rpki cache-server`.

Probably just copy/paste error.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-24 16:18:11 +03:00
Donald Sharp
882a8c7a71 tests: Allow cspf_topo1 to function correctly at scale
The cspf_topo1 test is comparing the adj-sid value that is
assigned dynamically based upon bring up order.  Under very
large scale this order changes causing the test to fail.
Since the adj-sid is dynamically allocated and appears to
be tested elsewhere, let's remove it from the grab all check.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-05-24 09:15:40 -04:00
Donatas Abraitis
4d4b9dc172 bgpd: Put ssh_config->port as integer, not as string in RPKI code
tcp_host->port is a string, ssh_config->port is an integer...

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-24 14:56:45 +03:00
Donald Sharp
403f312d56
Merge pull request #11256 from opensourcerouting/feature/bgp_rpki_json
bgpd: Add JSON output for `show rpki cache-connection`
2022-05-24 07:51:24 -04:00
Donald Sharp
5f3279aa37
Merge pull request #11261 from opensourcerouting/fix/double_notify_atomic
bgpd: Don't increment twice notification sent stats counter
2022-05-24 07:50:26 -04:00
Louis Scalbert
c8d2816ee5 topotests: isis-lfa add a switchover test after BFD down
Add a switchover test that consists in:
- Setting up ISIS BFD between rt1 and rt2
- The no link-detect setting on rt1 eth-rt2 is still present so that
  zebra does not take account linkdown events on this interface.
- Shutting down rt1 eth-rt2 from the switch side
- Wait for BFD to comes down

Check that the switchover between primary and backup happens before the
SPF re-computation.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-05-24 10:06:05 +02:00
Louis Scalbert
9cdc099bb5 topotests: isis-lfa add a switchover test after neighbor clear
Add a switchover test that consists in clearing the rt2 neighbor on rt1.

Check that the switchover between primary and backup happens before the
SPF re-computation.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-05-24 10:06:05 +02:00
Louis Scalbert
c99ef48962 topotests: isis-lfa add a switchover test after hello timeout
Add a switchover test that consists in:
- Setting no link-detect on rt1 eth-rt2 so that zebra does not take
  account linkdown events on this interface.
- Shutting down rt1 eth-rt2 from the switch side
- Wait for the hello timer expiration

Check that the switchover between primary and backup happens before the
SPF re-computation.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-05-24 10:06:05 +02:00