]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
2 years agobgpd: Drop label_ntop/label_pton functions
Donatas Abraitis [Wed, 1 Jun 2022 12:19:33 +0000 (15:19 +0300)]
bgpd: Drop label_ntop/label_pton functions

Start using mpls_lse_encode/mpls_lse_decode, that is endian-aware, because
we always use host-byte order, should use network-byte.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoisisd: add ISIS_MT_STANDARD define
Philippe Guibert [Wed, 25 May 2022 09:47:36 +0000 (11:47 +0200)]
isisd: add ISIS_MT_STANDARD define

This define is added to reflect more what the standard
topology means. Actually, the standard topology may
contain not only IPv4 protocol but also IPv6 protocol.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2 years agoMerge pull request #11326 from gromit1811/fix_init_stop_msgs2
Donatas Abraitis [Wed, 1 Jun 2022 12:26:52 +0000 (15:26 +0300)]
Merge pull request #11326 from gromit1811/fix_init_stop_msgs2

tools: Really fix all daemon shutdown without complaining about PID files

2 years agotools: Really fix all daemon shutdown without complaining about PID files
Martin Buck [Wed, 1 Jun 2022 09:58:52 +0000 (11:58 +0200)]
tools: Really fix all daemon shutdown without complaining about PID files

Fix daemon shutdown broken by f0cccaa6bf7dda71d0e1ad1b0406a9b453a84bb3. Now
we still don't complain about missing PID files but actually stop the
running daemons.

The previous fix was broken because it passed a new "--all" option to
daemon_stop which wasn't handled properly (it assumed $1 contains the
daemon name when at that time it acutally contained the "--all" option).
Plus, "--all" wasn't actually necessary, because we already passed
"--reallyall" from all_stop to daemon_stop after the daemon name.

So remove "--all" again and simply check for "--reallyall" in $2. This
should *really* fix #11317.

Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
2 years agoMerge pull request #11315 from gromit1811/fix_init_stop_msgs
Donatas Abraitis [Wed, 1 Jun 2022 08:24:13 +0000 (11:24 +0300)]
Merge pull request #11315 from gromit1811/fix_init_stop_msgs

tools: Don't complain about missing PID files when stopping all damons

2 years agoMerge pull request #11319 from donaldsharp/retry
Donatas Abraitis [Wed, 1 Jun 2022 05:08:55 +0000 (08:08 +0300)]
Merge pull request #11319 from donaldsharp/retry

tests: Remove duplicated work

2 years agoMerge pull request #11322 from donaldsharp/peer_group_route_map_match
Donatas Abraitis [Wed, 1 Jun 2022 05:08:05 +0000 (08:08 +0300)]
Merge pull request #11322 from donaldsharp/peer_group_route_map_match

bgpd: Add ability to match `match peer <PEERGROUPNAME>`

2 years agozebra: add error check condition to sock option
Chirag Shah [Tue, 31 May 2022 03:51:17 +0000 (20:51 -0700)]
zebra: add error check condition to sock option

Adding error checking condition which was missed
in PR-11216.

*** CID 1517953:  Error handling issues  (CHECKED_RETURN)
/zebra/kernel_netlink.c: 313 in netlink_socket()
307                     memset(&snl, 0, sizeof(snl));
308                     snl.nl_family = AF_NETLINK;
309                     snl.nl_groups = groups;
310
311     #if defined SOL_NETLINK
312                     if (ext_groups)
>>>     CID 1517953:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "setsockopt(sock, 270, 1, &ext_groups, 8U)" without checking return value. This library function may fail and return an error code.
313                             setsockopt(sock, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP,
314                                        &ext_groups, sizeof(ext_groups));
315     #endif
316
317                     /* Bind the socket to the netlink structure for anything. */
318                     ret = bind(sock, (struct sockaddr *)&snl, sizeof(snl));

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2 years agoMerge pull request #11293 from opensourcerouting/feature/update_workflow_dates
Donald Sharp [Tue, 31 May 2022 17:20:47 +0000 (13:20 -0400)]
Merge pull request #11293 from opensourcerouting/feature/update_workflow_dates

doc, tools: Update release dates in workflow.rst

2 years agobgpd: Add ability to match `match peer <PEERGROUPNAME>`
Donald Sharp [Tue, 31 May 2022 16:19:27 +0000 (12:19 -0400)]
bgpd: Add ability to match `match peer <PEERGROUPNAME>`

Allow the end operator to match `match peer <PEERGROUPNAME>`
in a route-map.  If the end operator defines interface
based peers and peer-groups that have names that overlap
the interface based peer will match first.

Fixes: #11316
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11299 from taspelund/update-svi-macip
Donatas Abraitis [Tue, 31 May 2022 14:53:46 +0000 (17:53 +0300)]
Merge pull request #11299 from taspelund/update-svi-macip

zebra: Update advertise-svi-ip MACIPs w/ new MAC

2 years agolib/md5,lib/sha256: Use explicit_bzero to clean up sensitive data.
Loganaden Velvindron [Sat, 7 May 2022 17:23:09 +0000 (21:23 +0400)]
lib/md5,lib/sha256: Use explicit_bzero to clean up sensitive data.

explicit_bzero() is available as an API to clean up sensitive data
and avoid compiler optimizations that remove calls to memset() or bzero().

Signed-off-by: Loganaden Velvindron <logan@cyberstorm.mu>
2 years agotests: Remove duplicated work
Donald Sharp [Tue, 31 May 2022 13:44:02 +0000 (09:44 -0400)]
tests: Remove duplicated work

If at first you succeed try try again.
No I mean if it works the first time no need to do
the same command again.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #10997 from Orange-OpenSource/isis-sr
Russ White [Tue, 31 May 2022 12:27:56 +0000 (08:27 -0400)]
Merge pull request #10997 from Orange-OpenSource/isis-sr

isisd: Stop fulfill MPLS table when SR is disabled

2 years agotools: Don't complain about missing PID files when stopping all damons
Martin Buck [Tue, 31 May 2022 12:16:34 +0000 (14:16 +0200)]
tools: Don't complain about missing PID files when stopping all damons

Since 1686b1d4864384ee508b58418f20970f2dff2587, we try to stop all daemons,
even those which are not (no longer) enabled in /etc/frr/daemons. But we
shouldn't complain about missing PID files for daemons which have never been
started and just silently ignore those.

Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
2 years agoMerge pull request #11300 from c-po/patch-1
Donald Sharp [Tue, 31 May 2022 11:58:40 +0000 (07:58 -0400)]
Merge pull request #11300 from c-po/patch-1

tools: add eigrp support on frr-reload

2 years agoMerge pull request #11304 from opensourcerouting/feature/show_rpki_prefix_json
Donald Sharp [Tue, 31 May 2022 11:57:53 +0000 (07:57 -0400)]
Merge pull request #11304 from opensourcerouting/feature/show_rpki_prefix_json

bgpd: Add JSON output for `show rpki prefix` and other show commands

2 years agotools: add eigrp support on frr-reload
Christian Poessinger [Sun, 29 May 2022 08:56:56 +0000 (10:56 +0200)]
tools: add eigrp support on frr-reload

Signed-off-by: Christian Poessinger <christian@poessinger.com>
2 years agoMerge pull request #11297 from donaldsharp/bgp_color_nht
Donatas Abraitis [Mon, 30 May 2022 11:06:30 +0000 (14:06 +0300)]
Merge pull request #11297 from donaldsharp/bgp_color_nht

bgpd: Fix SR color nexthop processing in BGP

2 years agoMerge pull request #11295 from donaldsharp/ospf_gr_helper_breakup
Donatas Abraitis [Mon, 30 May 2022 08:11:49 +0000 (11:11 +0300)]
Merge pull request #11295 from donaldsharp/ospf_gr_helper_breakup

tests: Convert test_ospf_gr_helper into running more parallel

2 years agobgpd: Add JSON output for `show rpki prefix` and other show commands
Donatas Abraitis [Mon, 30 May 2022 06:05:34 +0000 (09:05 +0300)]
bgpd: Add JSON output for `show rpki prefix` and other show commands

```
spine1-debian-11# sh rpki prefix 192.168.100.1/32
Prefix                                   Prefix Length  Origin-AS
192.168.100.1                               32 -  32        47583
spine1-debian-11# sh rpki prefix 192.168.100.1/32 json
{
  "prefixes":[
    {
      "prefix":"192.168.100.1",
      "prefixLenMin":32,
      "prefixLenMax":32,
      "asn":47583
    }
  ]
}
```

```
spine1-debian-11# sh rpki as-number 47583 json
{
  "prefixes":[
    {
      "prefix":"192.168.100.1",
      "prefixLenMin":32,
      "prefixLenMax":32,
      "asn":47583
    },
    {
      "prefix":"2606:4700:7000::",
      "prefixLenMin":48,
      "prefixLenMax":48,
      "asn":47583
    }
  ],
  "ipv4PrefixCount":1,
  "ipv6PrefixCount":1
}
spine1-debian-11# sh rpki as-number 47583
RPKI/RTR prefix table
Prefix                                   Prefix Length  Origin-AS
192.168.100.1                               32 -  32        47583
2606:4700:7000::                            48 -  48        47583
Number of IPv4 Prefixes: 1
Number of IPv6 Prefixes: 1
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agozebra: Update advertise-svi-ip MACIPs w/ new MAC
Trey Aspelund [Sat, 28 May 2022 07:10:51 +0000 (03:10 -0400)]
zebra: Update advertise-svi-ip MACIPs w/ new MAC

When the kernel was sending an RTM_NEWLINK updating the MAC of a known
SVI, Type-2 routes created by advertise-svi-ip were not getting updated
with the new address.
This adds removal of any old Type-2 routes (with old MAC) and creation
of new Type-2 routes (with new MAC) into RTM_NEWLINK processing.

Fixes: #11174
Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2 years agobgpd: Fix SR color nexthop processing in BGP
Donald Sharp [Fri, 27 May 2022 15:16:47 +0000 (11:16 -0400)]
bgpd: Fix SR color nexthop processing in BGP

Commit:
9f002fa5dd34e7d901b501e7d0306027d85b531a

Accidently broke the handling of SR color for nexthops
in BGP.  Put it back

Fixes: #11237
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agotests: Convert test_ospf_gr_helper into running more parallel
Donald Sharp [Thu, 26 May 2022 17:32:27 +0000 (13:32 -0400)]
tests: Convert test_ospf_gr_helper into running more parallel

With this change run time in parallel for these tests go from
10:37 -> 4:11 on my machine.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agotopotests: fix "ip vrf exec"
Louis Scalbert [Thu, 12 May 2022 08:16:52 +0000 (10:16 +0200)]
topotests: fix "ip vrf exec"

"ip vrf exec" command is not possible in the topotest shell.

> root@r1:~# ip vrf exec r1-cust5 bash
> mkdir failed for /sys/fs/cgroup/unified: No such file or directory
> Failed to setup vrf cgroup2 directory

Remount cgroup after remounting sysfs.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2 years agoMerge pull request #11290 from donaldsharp/bgp_auth_breakup
Donatas Abraitis [Fri, 27 May 2022 06:52:59 +0000 (09:52 +0300)]
Merge pull request #11290 from donaldsharp/bgp_auth_breakup

Bgp auth breakup

2 years agodoc, tools: Update release dates in workflow.rst
Donatas Abraitis [Fri, 27 May 2022 05:25:12 +0000 (08:25 +0300)]
doc, tools: Update release dates in workflow.rst

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #11277 from donaldsharp/pim_prefix_list_bug
Russ White [Thu, 26 May 2022 21:47:21 +0000 (17:47 -0400)]
Merge pull request #11277 from donaldsharp/pim_prefix_list_bug

pimd: Allow the LPM match work properly with prefix lists and normal …

2 years agoospfd: cli: add opaque data to json output
Christian Hopps [Sat, 8 Jan 2022 11:17:15 +0000 (06:17 -0500)]
ospfd: cli: add opaque data to json output

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agoMerge pull request #11291 from opensourcerouting/fix/memory_leak_bgp_alias
Donald Sharp [Thu, 26 May 2022 21:22:00 +0000 (17:22 -0400)]
Merge pull request #11291 from opensourcerouting/fix/memory_leak_bgp_alias

bgpd: Memory leak for community alias

2 years agoMerge pull request #11282 from donaldsharp/pim_v2_v3
Russ White [Thu, 26 May 2022 19:59:39 +0000 (15:59 -0400)]
Merge pull request #11282 from donaldsharp/pim_v2_v3

pimd: Disable handling v3 igmp packets on an interface config'ed for v2

2 years agoMerge pull request #11287 from opensourcerouting/build-llvm-20220526
Donald Sharp [Thu, 26 May 2022 19:14:36 +0000 (15:14 -0400)]
Merge pull request #11287 from opensourcerouting/build-llvm-20220526

build: fix some corners for LLVM analysis tools

2 years agobgpd: Simplify BGP community alias handling
Donatas Abraitis [Thu, 26 May 2022 17:15:35 +0000 (20:15 +0300)]
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>
2 years agotest: Abstract common functions from script break ups in test_bgp_auth.py
Donald Sharp [Thu, 26 May 2022 16:16:14 +0000 (12:16 -0400)]
test: Abstract common functions from script break ups in test_bgp_auth.py

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agotests: Break up test_bgp_auth.py into 4 test scripts
Donald Sharp [Thu, 26 May 2022 14:30:22 +0000 (10:30 -0400)]
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>
2 years agopimd: Allow the LPM match work properly with prefix lists and normal rp's
Donald Sharp [Tue, 24 May 2022 17:33:35 +0000 (13:33 -0400)]
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>
2 years agotools: fix unused variable in callgraph tool
David Lamparter [Thu, 26 May 2022 09:56:36 +0000 (11:56 +0200)]
tools: fix unused variable in callgraph tool

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agobuild: reformat makefile.py
David Lamparter [Thu, 26 May 2022 14:11:00 +0000 (16:11 +0200)]
build: reformat makefile.py

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agobuild: add a bunch of comments to makefile.py
David Lamparter [Thu, 26 May 2022 10:07:18 +0000 (12:07 +0200)]
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>
2 years agobuild: fix LLVM bitcode per-target CFLAGS
David Lamparter [Thu, 26 May 2022 09:55:51 +0000 (11:55 +0200)]
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>
2 years agobgpd: Distinguish BGP community alias memory separately from community
Donatas Abraitis [Thu, 26 May 2022 12:43:42 +0000 (15:43 +0300)]
bgpd: Distinguish BGP community alias memory separately from community

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Fix memory leak for BGP community alias in CLI
Donatas Abraitis [Thu, 26 May 2022 11:03:02 +0000 (14:03 +0300)]
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>
2 years agoMerge pull request #11281 from opensourcerouting/fix/gh_actions
Donald Sharp [Thu, 26 May 2022 11:32:11 +0000 (07:32 -0400)]
Merge pull request #11281 from opensourcerouting/fix/gh_actions

github: Use pull_request_target as a target

2 years agotools: Add `show ip igmp statistics` to support bundle gathering
Donald Sharp [Thu, 26 May 2022 00:06:22 +0000 (20:06 -0400)]
tools: Add `show ip igmp statistics` to support bundle gathering

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agopimd: Disable handling v3 igmp packets on an interface config'ed for v2
Donald Sharp [Wed, 25 May 2022 17:15:14 +0000 (13:15 -0400)]
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>
2 years agoMerge pull request #11244 from pguibert6WIND/flowspec_added_twice
Stephen Worley [Wed, 25 May 2022 16:29:27 +0000 (12:29 -0400)]
Merge pull request #11244 from pguibert6WIND/flowspec_added_twice

zebra: avoid pbr iptable added twice when used with flowspec

2 years agogithub: Use pull_request_target as a target
Donatas Abraitis [Wed, 25 May 2022 16:07:40 +0000 (19:07 +0300)]
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>
2 years agoMerge pull request #11279 from opensourcerouting/fix/labeler_gh_actions
Donald Sharp [Wed, 25 May 2022 15:44:28 +0000 (11:44 -0400)]
Merge pull request #11279 from opensourcerouting/fix/labeler_gh_actions

github: Add permissions for labeler action

2 years agoisisd: Stop fulfill MPLS table when SR is disabled
Olivier Dugeon [Fri, 8 Apr 2022 15:10:25 +0000 (17:10 +0200)]
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>
2 years agogithub: Add permissions for labeler action
Donatas Abraitis [Wed, 25 May 2022 15:25:42 +0000 (18:25 +0300)]
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>
2 years agoMerge pull request #11239 from opensourcerouting/feature/topotests_for_notification_gr
Donald Sharp [Wed, 25 May 2022 14:07:49 +0000 (10:07 -0400)]
Merge pull request #11239 from opensourcerouting/feature/topotests_for_notification_gr

tests: Add Notification support for Graceful-Restart tests

2 years agoMerge pull request #11245 from opensourcerouting/fix/doc_overview_package_url
Donald Sharp [Wed, 25 May 2022 14:06:48 +0000 (10:06 -0400)]
Merge pull request #11245 from opensourcerouting/fix/doc_overview_package_url

doc: Use full URL for FRR keyword highlight

2 years agoMerge pull request #11250 from opensourcerouting/feature/add_label_automatically_to_s...
Donald Sharp [Wed, 25 May 2022 14:03:53 +0000 (10:03 -0400)]
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

2 years agoMerge pull request #11252 from Jafaral/rel-pkg
Donatas Abraitis [Wed, 25 May 2022 12:33:53 +0000 (15:33 +0300)]
Merge pull request #11252 from Jafaral/rel-pkg

debian, redhat: update changelog for new release

2 years agozebra: avoid pbr iptable added twice when used with flowspec
Philippe Guibert [Mon, 23 May 2022 08:21:16 +0000 (10:21 +0200)]
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>
2 years agoMerge pull request #11267 from donaldsharp/cspf_topo1_scale_fix
Olivier Dugeon [Wed, 25 May 2022 11:19:34 +0000 (13:19 +0200)]
Merge pull request #11267 from donaldsharp/cspf_topo1_scale_fix

tests: Allow cspf_topo1 to function correctly at scale

2 years agoMerge pull request #11268 from opensourcerouting/fix/drop_rpki_cli_server_redundand
Donald Sharp [Tue, 24 May 2022 21:51:22 +0000 (17:51 -0400)]
Merge pull request #11268 from opensourcerouting/fix/drop_rpki_cli_server_redundand

bgpd: Drop redundand output under `show rpki prefix-table`

2 years agoMerge pull request #11270 from opensourcerouting/fix/docker_builds_centos
Donald Sharp [Tue, 24 May 2022 21:50:34 +0000 (17:50 -0400)]
Merge pull request #11270 from opensourcerouting/fix/docker_builds_centos

docker: CentOS/UBI adoptions for librtr 0.8.0

2 years agoMerge pull request #11271 from opensourcerouting/fix/docker_build_alpine
Donald Sharp [Tue, 24 May 2022 21:49:33 +0000 (17:49 -0400)]
Merge pull request #11271 from opensourcerouting/fix/docker_build_alpine

docker: Use Alpine 3.15 for build

2 years agoMerge pull request #11266 from opensourcerouting/feature/rpki_cache_server_json
Donald Sharp [Tue, 24 May 2022 21:48:54 +0000 (17:48 -0400)]
Merge pull request #11266 from opensourcerouting/feature/rpki_cache_server_json

bgpd: Add JSON support for `show rpki cache-server`

2 years agobgpd: Add JSON support for `show rpki cache-server`
Donatas Abraitis [Tue, 24 May 2022 12:43:47 +0000 (15:43 +0300)]
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>
2 years agoMerge pull request #11265 from opensourcerouting/fix/ssh_config_rpki
Donald Sharp [Tue, 24 May 2022 16:05:14 +0000 (12:05 -0400)]
Merge pull request #11265 from opensourcerouting/fix/ssh_config_rpki

bgpd: Put ssh_config->port as integer, not as string in RPKI code

2 years agodocker: Use Alpine 3.15 for build
Donatas Abraitis [Tue, 24 May 2022 15:10:00 +0000 (18:10 +0300)]
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>
2 years agoMerge pull request #11248 from donaldsharp/fix_pbr_topo1
Donatas Abraitis [Tue, 24 May 2022 14:49:24 +0000 (17:49 +0300)]
Merge pull request #11248 from donaldsharp/fix_pbr_topo1

tests: pbr_topo1 sometimes fails under really heavy load

2 years agodocker: Install systemd-devel for centos7 build
Donatas Abraitis [Tue, 24 May 2022 14:24:16 +0000 (17:24 +0300)]
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>
2 years agodocker: Use librtr 0.8.0 for centos/ubi builds
Donatas Abraitis [Tue, 24 May 2022 14:18:14 +0000 (17:18 +0300)]
docker: Use librtr 0.8.0 for centos/ubi builds

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Drop redundand output under `show rpki prefix-table`
Donatas Abraitis [Tue, 24 May 2022 13:18:11 +0000 (16:18 +0300)]
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>
2 years agotests: Allow cspf_topo1 to function correctly at scale
Donald Sharp [Tue, 24 May 2022 13:15:40 +0000 (09:15 -0400)]
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>
2 years agobgpd: Put ssh_config->port as integer, not as string in RPKI code
Donatas Abraitis [Tue, 24 May 2022 11:56:45 +0000 (14:56 +0300)]
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>
2 years agoMerge pull request #11256 from opensourcerouting/feature/bgp_rpki_json
Donald Sharp [Tue, 24 May 2022 11:51:24 +0000 (07:51 -0400)]
Merge pull request #11256 from opensourcerouting/feature/bgp_rpki_json

bgpd: Add JSON output for `show rpki cache-connection`

2 years agoMerge pull request #11261 from opensourcerouting/fix/double_notify_atomic
Donald Sharp [Tue, 24 May 2022 11:50:26 +0000 (07:50 -0400)]
Merge pull request #11261 from opensourcerouting/fix/double_notify_atomic

bgpd: Don't increment twice notification sent stats counter

2 years agobgpd: Don't increment twice notification sent stats counter
Donatas Abraitis [Tue, 24 May 2022 07:04:50 +0000 (10:04 +0300)]
bgpd: Don't increment twice notification sent stats counter

Before:

```
$ vtysh -c 'clear ip bgp 192.168.10.17'
$ vtysh -c 'show bgp neighbor 192.168.10.17 json' | jq '."192.168.10.17".messageStats.notificationsSent'
2
```

After:

```
$ vtysh -c 'clear ip bgp 192.168.10.17'
$ vtysh -c 'show bgp neighbor 192.168.10.17 json' | jq '."192.168.10.17".messageStats.notificationsSent'
1
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agotests: [Topojson] Enhance CLI logging
Kuldeep Kashyap [Mon, 23 May 2022 23:52:16 +0000 (16:52 -0700)]
tests: [Topojson] Enhance CLI logging

As of now we are logging only JSON output of CLIs
in topotests(topojson) executions and same o/p is
getting printed twice, which is of no use.

Enhanced code to show both plain and JSON output
of CLIs and remove duplicate logging.

It will help in reducing execution logs and in
verification, if sometimes there is mis-match
in CLI plain and JSON outputs.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2 years agobgpd: Add JSON output for `show rpki cache-connection`
Donatas Abraitis [Mon, 23 May 2022 16:40:45 +0000 (19:40 +0300)]
bgpd: Add JSON output for `show rpki cache-connection`

```
spine1-debian-11# sh rpki cache-connection
Connected to group 1
rpki tcp cache 192.168.10.17 8283 pref 1 (connected)
rpki tcp cache 192.168.10.17 8282 pref 2
spine1-debian-11# sh rpki cache-connection json
{
  "connectedGroup":1,
  "connections":[
    {
      "mode":"tcp",
      "host":"192.168.10.17",
      "port":"8283",
      "preference":1,
      "state":"connected"
    },
    {
      "mode":"tcp",
      "host":"192.168.10.17",
      "port":"8282",
      "preference":2,
      "state":"disconnected"
    }
  ]
}
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agodebian, redhat: update changelog for new release
Jafar Al-Gharaibeh [Wed, 2 Mar 2022 06:09:40 +0000 (00:09 -0600)]
debian, redhat: update changelog for new release

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2 years agotests: pbr_topo1 sometimes fails under really heavy load
Donald Sharp [Mon, 23 May 2022 12:16:56 +0000 (08:16 -0400)]
tests: pbr_topo1 sometimes fails under really heavy load

This test is sometimes failing under severe load.  Give some time
for the linux rule installation to actually be registered by the
system before declaring failure.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11150 from opensourcerouting/fix/use_librtr_higher_0.8.0
Jafar Al-Gharaibeh [Mon, 23 May 2022 15:11:10 +0000 (11:11 -0400)]
Merge pull request #11150 from opensourcerouting/fix/use_librtr_higher_0.8.0

packaging: Require librtr >= 0.8.0

2 years agogithub: Add base branch label to every PR to distinguish easily
Donatas Abraitis [Mon, 23 May 2022 13:56:39 +0000 (16:56 +0300)]
github: Add base branch label to every PR to distinguish easily

Faster notice and filter backports by labels per release.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agodoc: Use full URL for FRR keyword highlight
Donatas Abraitis [Mon, 23 May 2022 08:47:16 +0000 (11:47 +0300)]
doc: Use full URL for FRR keyword highlight

Seems replacement is not working when referenced, only when used directly
in the text |PACKAGE_URL|.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agopim6d: Don't enable mld on pimreg interface
sarita patra [Sat, 21 May 2022 16:10:58 +0000 (09:10 -0700)]
pim6d: Don't enable mld on pimreg interface

Signed-off-by: sarita patra <saritap@vmware.com>
2 years agoMerge pull request #10836 from anlancs/bgpd-mh-delay-esi
Donatas Abraitis [Mon, 23 May 2022 05:49:08 +0000 (07:49 +0200)]
Merge pull request #10836 from anlancs/bgpd-mh-delay-esi

zebra: delay setting esi in zebra_evpn_local_es_update()

2 years agotests: Add Notification support for Graceful-Restart tests
Donatas Abraitis [Sun, 22 May 2022 17:19:01 +0000 (20:19 +0300)]
tests: Add Notification support for Graceful-Restart tests

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #11217 from opensourcerouting/fix/doc_overview
Donald Sharp [Sun, 22 May 2022 19:03:05 +0000 (15:03 -0400)]
Merge pull request #11217 from opensourcerouting/fix/doc_overview

doc: Fix FRR/Slack keyword links in overview section

2 years agoMerge pull request #11238 from opensourcerouting/rtadv-cleanup
Donald Sharp [Sun, 22 May 2022 19:02:27 +0000 (15:02 -0400)]
Merge pull request #11238 from opensourcerouting/rtadv-cleanup

zebra: clean up rtadv integration

2 years agozebra: clean up rtadv integration
David Lamparter [Sun, 18 Apr 2021 10:11:14 +0000 (12:11 +0200)]
zebra: clean up rtadv integration

Move a few things into places they actually belong, and reduce the
number of places we have `#ifdev HAVE_RTADV`.  Just overall code
prettification.

... I had actually done this quite a while ago while doing some other
random hacking and thought it more useful to not be sitting on it on my
disk...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agoMerge pull request #11227 from donaldsharp/verify_not_queued
Jafar Al-Gharaibeh [Fri, 20 May 2022 20:03:23 +0000 (16:03 -0400)]
Merge pull request #11227 from donaldsharp/verify_not_queued

tests: Ensure routes are not queued when calling verify_rib

2 years agoMerge pull request #11223 from donaldsharp/ospf_shenanigans
David Lamparter [Fri, 20 May 2022 16:32:07 +0000 (18:32 +0200)]
Merge pull request #11223 from donaldsharp/ospf_shenanigans

2 years agoMerge pull request #11232 from opensourcerouting/bgp-sendhold-derp
Donald Sharp [Fri, 20 May 2022 15:10:04 +0000 (11:10 -0400)]
Merge pull request #11232 from opensourcerouting/bgp-sendhold-derp

bgpd: fix oopsie with SendHoldTime==0

2 years agotests: Allow a bit longer for bfd topo tests to synchronize
Donald Sharp [Thu, 19 May 2022 23:28:43 +0000 (19:28 -0400)]
tests: Allow a bit longer for bfd topo tests to synchronize

Allowing only 4 seconds for a bfd test to synchronize is going
to run into problems on extremely loaded systems.  The test
system should value it actually converged over it actually
converged in a reasonable time, especially on test systems
that are loaded because of many multiples of tests running
at the same time.  If it is important to actually test
that something got done by the RFC, the CI system as it
is currently written is not the correct place for this.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agotests: Make verify_rib wait up to 40 seconds.
Donald Sharp [Thu, 19 May 2022 23:08:39 +0000 (19:08 -0400)]
tests: Make verify_rib wait up to 40 seconds.

Under heavy load I am seeing verify_rib failing after 12 seconds
but succeeding after 17:

2022-05-19 18:52:54,374 DEBUG: topolog: Exiting lib API: verify_rib
2022-05-19 18:52:54,374 DEBUG: topolog: Function returned True
2022-05-19 18:52:54,374 WARNING: topolog: RETRY DIAGNOSTIC: SUCCEED after FAILED with requested timeout of 12.0s; however, succeeded in 14.7s, investigate timeout timing

There is no reason to not have the test wait a bit longer for very very
heavily loaded systems.  Change the time to 40 seconds.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agotests: Ensure routes are not queued when calling verify_rib
Donald Sharp [Thu, 19 May 2022 19:54:59 +0000 (15:54 -0400)]
tests: Ensure routes are not queued when calling verify_rib

Lots of tests call verify_rib that takes a list of routes that
need to be verified in some fashion.  This verify_rib functionality
will try up to 12 seconds before failing the check that zebra
has the route and has installed it.

Unfortunately the verify_rib code was not looking to see if
the route was queued for installation and was then allowing
tests to immediately do subsuquent steps that depended on
that route actually being installed sometimes causing tests
to fail.

Write a bit of additional code that looks at the queued
status and allows the test to wait a bit longer for zebra
to finish processing before allowing the test to move on
to the next bit.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agolib: Make thread_is_scheduled a static inline
Donald Sharp [Fri, 20 May 2022 13:53:44 +0000 (09:53 -0400)]
lib: Make thread_is_scheduled a static inline

For performance, yo.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoospf6d: Clean up thread interface
Donald Sharp [Tue, 17 May 2022 20:29:29 +0000 (16:29 -0400)]
ospf6d: Clean up thread interface

a) Remove setting of thread pointer to NULL after
thread invocation, this is already done.

b) Use thread_is_scheduled()

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoospf6d: Remove double check of default prefix
Donald Sharp [Tue, 17 May 2022 20:08:01 +0000 (16:08 -0400)]
ospf6d: Remove double check of default prefix

The ospf6_is_valid_summary_addr function is checking
to see if a prefix is the default and also then double
comparing it against the v6 prefix part.  No need to do this.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11008 from patrasar/sec_addr_list_pimv6
David Lamparter [Fri, 20 May 2022 13:25:52 +0000 (15:25 +0200)]
Merge pull request #11008 from patrasar/sec_addr_list_pimv6

2 years agoMerge pull request #10903 from SaiGomathiN/pimv6debug
David Lamparter [Fri, 20 May 2022 13:23:31 +0000 (15:23 +0200)]
Merge pull request #10903 from SaiGomathiN/pimv6debug

2 years agobgpd: fix oopsie with SendHoldTime==0
David Lamparter [Fri, 20 May 2022 12:16:24 +0000 (14:16 +0200)]
bgpd: fix oopsie with SendHoldTime==0

... *duh*

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agozebra: remove one unnecessary check for l3vni nb
anlan_cs [Thu, 19 May 2022 01:55:33 +0000 (21:55 -0400)]
zebra: remove one unnecessary check for l3vni nb

The parent node of "vrf"  MUST be non-NULL, so the check is unnecessary and
misleading. Otherwise, there will be a branch of NULL parent node, it makes
no sense, remove it.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2 years agoMerge pull request #11225 from opensourcerouting/bgp-sendhold
Donald Sharp [Thu, 19 May 2022 18:51:29 +0000 (14:51 -0400)]
Merge pull request #11225 from opensourcerouting/bgp-sendhold

bgpd: implement SendHoldTimer

2 years agoMerge pull request #11216 from chiragshah6/fdev2
Sri Mohana Singamsetty [Thu, 19 May 2022 17:28:25 +0000 (10:28 -0700)]
Merge pull request #11216 from chiragshah6/fdev2

zebra: netlink registry of rtm tunnel notification