]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
3 years agonhrpd: replace nhrp route nexthop with onlink route when prefix=nh
Philippe Guibert [Thu, 30 Jul 2020 16:16:16 +0000 (18:16 +0200)]
nhrpd: replace nhrp route nexthop with onlink route when prefix=nh

There are cases where nhrp wants to create a nhrp route to gre interface
with the nexthop which is the same the prefix. This is the case with
ipv6:

ipv6 route a:ff::ff:4/128 via a:ff::ff:4:/128 dev gre1

This route entry is false from zebra point of view, and to avoid that,
the nexthop is ignored in nhrp only if the prefix equals the nexthop.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agonhrpd: shortcut routes installed with nexthop.
Philippe Guibert [Thu, 23 Jul 2020 06:57:05 +0000 (08:57 +0200)]
nhrpd: shortcut routes installed with nexthop.

Previously, when a shortcut entry was created, its associated route was
created on system, with no nexthop, only gre device. eg:

[..]
N>* 192.168.2.0/24 [10/0] is directly connected, gre1, 00:01:04           <--- can not be resolved

[..]
Type     Prefix                   Via                      Identity
dynamic  192.168.2.0/24           10.255.255.2              <---- correct

This situation was forcing neighbor resolution on the first outgoing packet matching the route entry. for instance 192.168.2.1 could not be resolved at link layer, and was going to fail. Instead, nhrp nexthop should have been used.
This is what this commit intends to do, that is to say that when a
shortcut is installed by nhrp, the associated nexthop entry is used.

[..]
N>* 192.168.2.0/24 [10/0] via 10.255.255.2, gre1 onlink, 00:00:31

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agoMerge pull request #7828 from mobash-rasool/pim-fixes-3
Donald Sharp [Mon, 11 Jan 2021 14:51:24 +0000 (09:51 -0500)]
Merge pull request #7828 from mobash-rasool/pim-fixes-3

pimd: SPT-bit is not set to false as per RFC section in one flow

3 years agoMerge pull request #7823 from donaldsharp/zebra_delay_timer
Donatas Abraitis [Mon, 11 Jan 2021 14:46:23 +0000 (16:46 +0200)]
Merge pull request #7823 from donaldsharp/zebra_delay_timer

Zebra delay timer

3 years agoMerge pull request #7847 from opensourcerouting/fix/skip-sr-te-topotest
Donald Sharp [Mon, 11 Jan 2021 14:44:46 +0000 (09:44 -0500)]
Merge pull request #7847 from opensourcerouting/fix/skip-sr-te-topotest

pathd: Skip SR-TE topotests if pathd has been disabled

3 years agoMerge pull request #7830 from volta-networks/misc_fixes_2021
Donatas Abraitis [Mon, 11 Jan 2021 13:18:18 +0000 (15:18 +0200)]
Merge pull request #7830 from volta-networks/misc_fixes_2021

Misc fixes (bgpd, pathd, tools)

3 years agoMerge pull request #7845 from cgoncalves/fix-broken-links
Donatas Abraitis [Mon, 11 Jan 2021 13:06:27 +0000 (15:06 +0200)]
Merge pull request #7845 from cgoncalves/fix-broken-links

Fix BGP and resource certification reference links

3 years agopathd: Skip SR-TE topotests if pathd has been disabled
Sebastien Merle [Mon, 11 Jan 2021 11:48:08 +0000 (12:48 +0100)]
pathd: Skip SR-TE topotests if pathd has been disabled

 * If pathd binary is not found, skip the SR-TE topotests.
 * Fix some compilation warnings when pathd is not built.

Signed-off-by: Sebastien Merle <sebastien@netdef.org>
3 years agodoc: fix reference links
Carlos Goncalves [Mon, 11 Jan 2021 09:42:19 +0000 (10:42 +0100)]
doc: fix reference links

The current securing BGP and resource certification reference links lead
to a page not found. This patch fixes that by pointing to their
corresponding PDF format resources.

Signed-off-by: Carlos Goncalves <cgoncalves@redhat.com>
3 years agobgpd: fix removal of rd vpn export
Emanuele Di Pascale [Thu, 7 Jan 2021 14:23:44 +0000 (15:23 +0100)]
bgpd: fix removal of rd vpn export

a missing '!' operator meant that correct rd strings were being
rejected in the destroy callback, making it impossible to remove
once configured.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
3 years agobgpd: fix unsetting of multipath as-set
Emanuele Di Pascale [Thu, 7 Jan 2021 13:46:59 +0000 (14:46 +0100)]
bgpd: fix unsetting of multipath as-set

in the nortbound callback for the boolean leaf multi-path-as-set, the
actual value of the leaf was being ignored. As a result, going from
as-set to no-as-set was having no effect.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
3 years agoMerge pull request #7810 from imzyxwvu/no-deforig
Donatas Abraitis [Mon, 11 Jan 2021 08:09:41 +0000 (10:09 +0200)]
Merge pull request #7810 from imzyxwvu/no-deforig

bgpd: Fix default-originate clearing from peer-groups.

3 years agopimd: SPT-bit is not set to false as per RFC section in one flow
Mobashshera Rasool [Thu, 7 Jan 2021 10:03:07 +0000 (10:03 +0000)]
pimd: SPT-bit is not set to false as per RFC section in one flow

1. As per RFC 4601 Sec 4.5.7:
* JoinDesired(S,G) -> False, set SPTbit to false.

2. Change the debug type.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agoMerge pull request #7652 from adharkar/frr-vni_switch
Donald Sharp [Sun, 10 Jan 2021 23:44:49 +0000 (18:44 -0500)]
Merge pull request #7652 from adharkar/frr-vni_switch

zebra: L3VNI to L2VNI conversion is not handled

3 years agoMerge pull request #7747 from reubendowle/fixes/nhrpd
Donald Sharp [Sun, 10 Jan 2021 23:43:20 +0000 (18:43 -0500)]
Merge pull request #7747 from reubendowle/fixes/nhrpd

nhrpd fixes

3 years agoMerge pull request #7751 from mobash-rasool/igmp-fixes
Donald Sharp [Sat, 9 Jan 2021 22:40:31 +0000 (17:40 -0500)]
Merge pull request #7751 from mobash-rasool/igmp-fixes

pimd: IGMP conformance 5.10 test case is failing

3 years agoMerge pull request #7753 from mobash-rasool/pim-fixes
Donald Sharp [Sat, 9 Jan 2021 22:36:08 +0000 (17:36 -0500)]
Merge pull request #7753 from mobash-rasool/pim-fixes

pimd: when node changes from non-DR to DR S,G entry not created

3 years agoMerge pull request #7756 from pjdruddy/bgplu-fixes
Donald Sharp [Sat, 9 Jan 2021 20:48:22 +0000 (15:48 -0500)]
Merge pull request #7756 from pjdruddy/bgplu-fixes

Bgplu fixes

3 years agoMerge pull request #7787 from deastoe/fpm-work-ready-fixes
Donald Sharp [Sat, 9 Jan 2021 20:38:46 +0000 (15:38 -0500)]
Merge pull request #7787 from deastoe/fpm-work-ready-fixes

dplane_fpm_nl: routes stuck with 'q' flag (revisited)

3 years agoMerge pull request #7785 from volta-networks/fix_show_pce_confidence_for_pr
Donald Sharp [Sat, 9 Jan 2021 20:36:56 +0000 (15:36 -0500)]
Merge pull request #7785 from volta-networks/fix_show_pce_confidence_for_pr

Add level of confidence to show pcep-session

3 years agoMerge pull request #7775 from vishaldhingra/pim
Donald Sharp [Sat, 9 Jan 2021 20:34:18 +0000 (15:34 -0500)]
Merge pull request #7775 from vishaldhingra/pim

pimd : Added the command to clear the pim bsr data.

3 years agotools: fix pce-config removal
Emanuele Di Pascale [Tue, 22 Dec 2020 17:40:47 +0000 (18:40 +0100)]
tools: fix pce-config removal

make sure that the order in which the pcep-related commands are
removed by frr-reload.py is the correct one, i.e., pce followed
by pce-config followed by pcc.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
3 years agopathd, tools: fix peer preference config
Emanuele Di Pascale [Tue, 22 Dec 2020 16:00:39 +0000 (17:00 +0100)]
pathd, tools: fix peer preference config

on one hand, the default value for a peer preference was always being
displayed, and on the other there was some code in frr-reload.py which
was attempting to add a default value to match this behavior, and which
was incorrectly overriding a specified preference. Fix this by removing
this code and making pathd behave like other daemons in this respect,
i.e. not displaying the default value.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
3 years agotools: add bfdd to frr-reload.py daemons list
Emanuele Di Pascale [Tue, 22 Dec 2020 17:20:14 +0000 (18:20 +0100)]
tools: add bfdd to frr-reload.py daemons list

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
3 years agoMerge pull request #7839 from ton31337/feature/print_large-community_dump
Donald Sharp [Sat, 9 Jan 2021 12:25:59 +0000 (07:25 -0500)]
Merge pull request #7839 from ton31337/feature/print_large-community_dump

bgpd: Print large-community inside bgp_dump_attr()

3 years agoMerge pull request #7835 from donaldsharp/cleanup_support_bundle
Donatas Abraitis [Sat, 9 Jan 2021 07:14:16 +0000 (09:14 +0200)]
Merge pull request #7835 from donaldsharp/cleanup_support_bundle

Cleanup support bundle

3 years agobgpd: Print large-community inside bgp_dump_attr()
Donatas Abraitis [Fri, 8 Jan 2021 14:09:34 +0000 (16:09 +0200)]
bgpd: Print large-community inside bgp_dump_attr()

Missing large communities.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #7842 from donaldsharp/wait_for_convergence
Donatas Abraitis [Sat, 9 Jan 2021 07:09:25 +0000 (09:09 +0200)]
Merge pull request #7842 from donaldsharp/wait_for_convergence

tests: Wait for bgp convergence *after* we re-add the interfaces

3 years agoMerge pull request #7836 from volta-networks/fix_isis_net
Donald Sharp [Sat, 9 Jan 2021 04:01:58 +0000 (23:01 -0500)]
Merge pull request #7836 from volta-networks/fix_isis_net

isisd: When last area address is removed, resign if we were DR

3 years agozebra: zebra route-map delay-timer is global not per vrf
Donald Sharp [Wed, 6 Jan 2021 16:29:43 +0000 (11:29 -0500)]
zebra: zebra route-map delay-timer is global not per vrf

The zebra route-map delay timer value is a global value
not a per vrf change.  As such we should only print it
out one time.

We are seeing this:

zebra route-map delay-timer 33
 exit-vrf
zebra route-map delay-timer 33

When we have 2 vrf's configured.

Fix the code to only write it out for the default vrf

Ticket: CM-32888
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Remove uncalled function
Donald Sharp [Wed, 6 Jan 2021 16:13:43 +0000 (11:13 -0500)]
zebra: Remove uncalled function

Remove the dead function zebra_route_map_write_delay_timer

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7803 from ton31337/fix/validate_community_list
Donald Sharp [Sat, 9 Jan 2021 02:05:32 +0000 (21:05 -0500)]
Merge pull request #7803 from ton31337/fix/validate_community_list

bgpd: Validate community list if they are not malformed

3 years agotests: Wait for bgp convergence *after* we re-add the interfaces
Donald Sharp [Fri, 8 Jan 2021 21:52:41 +0000 (16:52 -0500)]
tests: Wait for bgp convergence *after* we re-add the interfaces

In test_bgp_mutli_vrf_topo2.py it's clear that we remove then
re-add the vrf interfaces.  Then the test was immediately
checking to ensure that the routes were available.

BGP needs time to reconverge.  Let's ensure that first.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotools: Cleanup some zebra section of the support bundle
Donald Sharp [Fri, 8 Jan 2021 12:44:42 +0000 (07:44 -0500)]
tools: Cleanup some zebra section of the support bundle

a) Add some useful commands
b) Remove `show error all` this just dumps the error codes.  If
we know the version we don't need this.  Additionally this is
rather large.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotools: Cleanup bgp commands in the support bundle
Donald Sharp [Fri, 8 Jan 2021 12:42:08 +0000 (07:42 -0500)]
tools: Cleanup bgp commands in the support bundle

Add some missing commands ( I am sure that there are more useful ones to )
Cleanup to use the modern non-deprecated syntax in case anyone runs across
this.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7816 from pjdruddy/revert_labelmanager_statics
Renato Westphal [Fri, 8 Jan 2021 23:57:25 +0000 (20:57 -0300)]
Merge pull request #7816 from pjdruddy/revert_labelmanager_statics

Revert labelmanager statics

3 years agoMerge pull request #7838 from ton31337/fix/force_updates_on_reset_out
Donald Sharp [Fri, 8 Jan 2021 22:34:37 +0000 (17:34 -0500)]
Merge pull request #7838 from ton31337/fix/force_updates_on_reset_out

bgpd: Force BGP updates when triggering reset out

3 years agobgpd: Force BGP updates when triggering reset out
Donatas Abraitis [Fri, 8 Jan 2021 15:03:39 +0000 (17:03 +0200)]
bgpd: Force BGP updates when triggering reset out

When adding/removing some peer's flag we need to make sure we FORCE updates
to avoid suppressing critical updates.

Like entering `no neighbor x.x.x.x send-community large` would suppress
updates by default and another side will have stale large communities.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoisisd: When last area address is removed, resign if we were DR
Karen Schoener [Tue, 5 Jan 2021 21:27:32 +0000 (16:27 -0500)]
isisd: When last area address is removed, resign if we were DR

When last area address is removed, resign if we were DR.

This fixes an issue where: when the ISIS area address is changed, ISIS fails
to elect a new DR.

Signed-off-by: Karen Schoener <karen@voltanet.io>
3 years agoMerge pull request #7833 from donaldsharp/gr_tests
Donatas Abraitis [Fri, 8 Jan 2021 13:01:45 +0000 (15:01 +0200)]
Merge pull request #7833 from donaldsharp/gr_tests

tests: Fix gr_tests

3 years agopimd : Added the command to clear the pim bsr data.
vdhingra [Mon, 21 Dec 2020 10:24:11 +0000 (02:24 -0800)]
pimd : Added the command to clear the pim bsr data.

This command has been added in the context of
PIM BSM functionality. This command will clear the
data structs having bsr information.

Co-authored-by: Sarita Patra <saritap@vmware.com>
Signed-off-by: vishaldhingra <vdhingra@vmware.com>
3 years agoMerge pull request #7834 from donaldsharp/bgp_announce
Donatas Abraitis [Fri, 8 Jan 2021 12:08:22 +0000 (14:08 +0200)]
Merge pull request #7834 from donaldsharp/bgp_announce

Bgp announce

3 years agobgpd: Move afi indepedent code outside of checks for it
Donald Sharp [Fri, 8 Jan 2021 00:24:13 +0000 (19:24 -0500)]
bgpd: Move afi indepedent code outside of checks for it

In bgp_zebra_announce we do work to apply the table map.
This is the same for both v4 and v6 but we have the code
duplicated in both v4 and v6 if statements.  Move outside
to reduce the duplications.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Combine two subsuquent if (debug..) statements
Donald Sharp [Fri, 8 Jan 2021 00:03:54 +0000 (19:03 -0500)]
bgpd: Combine two subsuquent if (debug..) statements

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Remove redundant checks in bgp_zebra_announce()
Donald Sharp [Thu, 7 Jan 2021 23:54:34 +0000 (18:54 -0500)]
bgpd: Remove redundant checks in bgp_zebra_announce()

BGP has created some redundant checks in bgp_zebra_announce()
Reduce the multiple if statements and consolidate a bit.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Fix gr_tests
Donald Sharp [Thu, 7 Jan 2021 22:30:04 +0000 (17:30 -0500)]
tests: Fix gr_tests

The bgp_gr_functionality_topo1 test was shutting down an
interface on r2 and then trying to bring it up on r1.
Hijinx ensued.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7749 from wesleycoakley/bgpd-large-community-format-fix
Donatas Abraitis [Thu, 7 Jan 2021 08:33:59 +0000 (10:33 +0200)]
Merge pull request #7749 from wesleycoakley/bgpd-large-community-format-fix

bgpd: reject malformed large-communities

3 years agoMerge pull request #7824 from opensourcerouting/snap-libyang1-fix
Donatas Abraitis [Thu, 7 Jan 2021 08:28:19 +0000 (10:28 +0200)]
Merge pull request #7824 from opensourcerouting/snap-libyang1-fix

Snapcraft Fixes

3 years agoMerge pull request #7817 from donaldsharp/random
Donatas Abraitis [Thu, 7 Jan 2021 08:24:11 +0000 (10:24 +0200)]
Merge pull request #7817 from donaldsharp/random

Random cleanup/fixes

3 years agosnapcraft: Update rtrlib to 0.7.0
Martin Winter [Thu, 7 Jan 2021 01:16:19 +0000 (02:16 +0100)]
snapcraft: Update rtrlib to 0.7.0

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agosnapcraft: Fix passthrough path for Libyang 1.x
Martin Winter [Thu, 7 Jan 2021 01:14:52 +0000 (02:14 +0100)]
snapcraft: Fix passthrough path for Libyang 1.x

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agoMerge pull request #7820 from kuldeepkash/topojson_framework
Donald Sharp [Wed, 6 Jan 2021 13:59:34 +0000 (08:59 -0500)]
Merge pull request #7820 from kuldeepkash/topojson_framework

tests: [topojson]Add/Enhance framework to support PIM automation

3 years agobgpd: separate lcommunity validation from tokenizer
Wesley Coakley [Tue, 5 Jan 2021 09:22:57 +0000 (04:22 -0500)]
bgpd: separate lcommunity validation from tokenizer

`lcommunity_gettoken` expects a space-delimeted list of 0 or more large
communities. `lcommunity_list_valid` can perform this check.
`lcommunity_list_valid` now validates large community lists more
accurately based on the following condition: Each quantity in a standard bgp
large community must:

1. Contain at least one digit
2. Fit within 4 octets
3. Contain only digits unless the lcommunity is "expanded"
4. Contain a valid regex if the lcommunity is "expanded"

Moreover we validate that each large community list contains exactly 3
such values separated by a single colon each.

One quirk of our validation which is worth documenting is:

```
bgp large-community-list standard test2 permit 1:c:3
bgp large-community-list expanded test1 permit 1:c:3
```

The first line will throw an error complaining about a "malformed community-list
value". The second line will be accepted because the each value is each treated as
a regex when matching large communities, it simply will never match anything so
it's rather useless.

Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
3 years agoMerge pull request #7815 from ckishimo/pytests
Donatas Abraitis [Wed, 6 Jan 2021 07:08:35 +0000 (09:08 +0200)]
Merge pull request #7815 from ckishimo/pytests

tests: fix typos and remove duplicate output

3 years agotests: [topojson]Enhance lib/topojson.py to support PIM automation
kuldeepkash [Wed, 6 Jan 2021 05:13:05 +0000 (05:13 +0000)]
tests: [topojson]Enhance lib/topojson.py to support PIM automation

1. Enhanced lib/topojson.py for creating topologies with switches and routers
2. Ran it through (black) for expected formatting

Signed-off-by: kuldeepkash <kashyapk@vmware.com>
3 years agotests: [topojson]Enhance lib/common_config.py to support PIM automation
kuldeepkash [Wed, 6 Jan 2021 05:08:31 +0000 (05:08 +0000)]
tests: [topojson]Enhance lib/common_config.py to support PIM automation

1. Enhanced lib/common_config.py for common configuration/verification needed
   for PIM automation
2. Ran it through (black) for expected formatting

Signed-off-by: kuldeepkash <kashyapk@vmware.com>
3 years agotests: [topojson]Add lib/pim.py to support PIM automation
kuldeepkash [Wed, 6 Jan 2021 05:05:30 +0000 (05:05 +0000)]
tests: [topojson]Add lib/pim.py to support PIM automation

1. Added lib/pim.py for PIM configuration/verification
2. Ran it through (black) for expected formatting

Signed-off-by: kuldeepkash <kashyapk@vmware.com>
3 years agobgpd: Cleanup debugs for bgp_zebra_route_notify_owner
Donald Sharp [Tue, 5 Jan 2021 20:22:57 +0000 (15:22 -0500)]
bgpd: Cleanup debugs for bgp_zebra_route_notify_owner

User %pRN as well as add some more debugs for other
interesting cases.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Allow more detailed knowledge of bgp's internal state
Donald Sharp [Tue, 5 Jan 2021 20:03:02 +0000 (15:03 -0500)]
bgpd: Allow more detailed knowledge of bgp's internal state

When bgp is using wait for install semantics it would be nice
to be able to debug it when it is running.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agopathd: Convert to use our internal frr_weak_random
Donald Sharp [Tue, 5 Jan 2021 16:10:19 +0000 (11:10 -0500)]
pathd: Convert to use our internal frr_weak_random

rand() should not be used, we should be using the frr_weak_random()
call instead.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: fix typos
ckishimo [Tue, 5 Jan 2021 15:55:59 +0000 (16:55 +0100)]
tests: fix typos

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
3 years agoMerge pull request #7762 from sworleys/PBR-Ipv4/Ipv6-Match-Fixes
Mark Stapp [Tue, 5 Jan 2021 18:54:06 +0000 (13:54 -0500)]
Merge pull request #7762 from sworleys/PBR-Ipv4/Ipv6-Match-Fixes

pbrd: pbr ipv4/ipv6 match fixes

3 years agotests: add test for labelmanager plugin
Pat Ruddy [Tue, 5 Jan 2021 17:18:39 +0000 (17:18 +0000)]
tests: add test for labelmanager plugin

An external label manager plugin may want to use the following
functions:
    - create_label_chunk
    - assign_label_chunk
    - delete_label_chunk
    - release_label_chunk
This test ensures that they are externally visible.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agozebra: expose label-manager util-funcs
Pat Ruddy [Tue, 5 Jan 2021 12:32:26 +0000 (12:32 +0000)]
zebra: expose label-manager util-funcs

Revert "zebra: unexpose label-manager util-funcs as static"
This reverts commit d3d9639d9a2251aa519b5399706ce816982001a1.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agoMerge pull request #7772 from LabNConsulting/ziemba/tests-lutil-timestamp
Mark Stapp [Tue, 5 Jan 2021 16:29:49 +0000 (11:29 -0500)]
Merge pull request #7772 from LabNConsulting/ziemba/tests-lutil-timestamp

tests: topotests/lib/lutil.py: add timestamp to log of test start

3 years agotests: remove duplicate output
ckishimo [Tue, 5 Jan 2021 15:57:42 +0000 (16:57 +0100)]
tests: remove duplicate output

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
3 years agoMerge pull request #7807 from logbob0401/vrrpd_yang_bug_fix
Russ White [Tue, 5 Jan 2021 15:30:55 +0000 (10:30 -0500)]
Merge pull request #7807 from logbob0401/vrrpd_yang_bug_fix

Fix augment path problem in frr-vrrpd.yang to comply with rfc 7950

3 years agoMerge pull request #7507 from ton31337/fix/bgpd_do_not_send_update_if_path_really_did...
Russ White [Tue, 5 Jan 2021 15:26:18 +0000 (10:26 -0500)]
Merge pull request #7507 from ton31337/fix/bgpd_do_not_send_update_if_path_really_did_not_change

bgpd: Do not send BGP UPDATE if the route actually not changed

3 years agoMerge pull request #6810 from Orange-OpenSource/link_state
Russ White [Tue, 5 Jan 2021 15:25:38 +0000 (10:25 -0500)]
Merge pull request #6810 from Orange-OpenSource/link_state

Lib: Add Link State Database

3 years agoMerge pull request #7722 from AnuradhaKaruppiah/mh-fixes
Patrick Ruddy [Tue, 5 Jan 2021 09:26:17 +0000 (09:26 +0000)]
Merge pull request #7722 from AnuradhaKaruppiah/mh-fixes

bgpd, zebra: evpn mh fixes

3 years agobgpd: Validate community list if they are not malformed
Donatas Abraitis [Wed, 30 Dec 2020 21:02:03 +0000 (23:02 +0200)]
bgpd: Validate community list if they are not malformed

Before fix:
```
root@exit1-debian-9:~/frr# /usr/local/bin/vtysh  -c 'c' -c 'route-map test permit 10' -c 'set community 65535:429496723296'
root@exit1-debian-9:~/frr#

root@exit1-debian-9:~/frr# vtysh -c 'c' -c 'bgp community-list standard test permit 65535:4294967296'
root@exit1-debian-9:~/frr#

root@exit1-debian-9:~/frr# /usr/local/bin/vtysh  -c 'c' -c 'route-map test permit 10' -c 'set community 65535'
root@exit1-debian-9:~/frr# /usr/local/bin/vtysh  -c 'c' -c 'route-map test permit 10' -c 'set community 65535:'
% Malformed communities attribute
```

After fix:
```
root@exit1-debian-9:~/frr# /usr/local/bin/vtysh  -c 'c' -c 'route-map test permit 10' -c 'set community 65535:4294967296'
% Malformed communities attribute

root@exit1-debian-9:~/frr# vtysh -c 'c' -c 'bgp community-list standard test permit 65535:4294967299'
% Malformed community-list value

root@exit1-debian-9:~/frr# /usr/local/bin/vtysh  -c 'c' -c 'route-map test permit 10' -c 'set community 65535:'
% Malformed communities attribute
root@exit1-debian-9:~/frr# /usr/local/bin/vtysh  -c 'c' -c 'route-map test permit 10' -c 'set community 65535'
% Malformed communities attribute
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Fix default-originate clearing from peer-groups.
zyxwvu Shi [Tue, 5 Jan 2021 06:15:07 +0000 (06:15 +0000)]
bgpd: Fix default-originate clearing from peer-groups.

Fix `peer_default_originate_unset` so default route can be withdrawn
when `default-originate` option is being unset from a peer-group.

The loop calling `bgp_default_originate` is clearing default-originate
from the peer-group peer `peer` instead of the peer-group member peer
`member`.

Signed-off-by: zyxwvu Shi <shiyuchen.syc@bytedance.com>
3 years agoMerge pull request #7809 from donaldsharp/m_coverity
Jafar Al-Gharaibeh [Mon, 4 Jan 2021 22:13:21 +0000 (16:13 -0600)]
Merge pull request #7809 from donaldsharp/m_coverity

some coverity fixes

3 years agolib: Add Link State Database
Olivier Dugeon [Tue, 26 May 2020 12:51:02 +0000 (14:51 +0200)]
lib: Add Link State Database

Define new models for Link State Database a.k.a TED
and functions to manipulate the new database as well as exchange Link State
information through ZAPI Opaque message.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
3 years agotests: add BGPLU label sanity test
Pat Ruddy [Wed, 16 Dec 2020 17:02:53 +0000 (17:02 +0000)]
tests: add BGPLU label sanity test

This test checks the interactions between the BGP label requesting
code and the labelpool code to ensure the correct number of labels
and label chunks are requested and those labels are freed back into
the pool when the corresponding prefix is removed.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agobgpd: fix zclient return code damage in labelpool
Pat Ruddy [Wed, 16 Dec 2020 15:06:30 +0000 (15:06 +0000)]
bgpd: fix zclient return code damage in labelpool

The check for the return code for zclient_send_get_label_chunk is
reversed and therefore the pending count does not get incremented
for each successful label chunk request.
This has the effect of requesting a 50 label chunk per label request
from BGP i.e we request 50 times the labels we require.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agobgpd: release label to labelpool on dereg
Pat Ruddy [Thu, 17 Dec 2020 10:49:30 +0000 (10:49 +0000)]
bgpd: release label to labelpool on dereg

when we de-register for a label associated with a prefix then release
it back to the labelpool to clean up the stale reference held in the
ledger and inuse lists.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agobgpd: refactor label allocation code
Pat Ruddy [Thu, 17 Dec 2020 10:41:07 +0000 (10:41 +0000)]
bgpd: refactor label allocation code

To prepare for fixing an issue where labels do not get released back
to the labelpool when the route is deleted some refactoring is
necessary. There are 2 parts to this.
1. restructure the code to remove the circular nature of label
allocations via the labelpool and decouple the label type decision
from the notification fo the FEC.
The code to notify the FEC association to zebra has been split out
into a separate function so that it can be called from the synchronous
path (for registration of index-based labels and de-registration of all
labels), and from the asynchronous path where we need to wait for a
callback from the labelpool code with a label allocation.
The decision about whether we are using an index-based label or an
allocated label is reflected in the state of the BGP_NODE_LABEL_REQUESTED
flag so the checks on the path_info in the labelpool callback code are
no longer required.
2. change the owned of a labelpool allocated label from the path info
structure to the bgp_dest structure. This allows labels to be released
(in a subsequent commit) when the owner (bgp_dest) goes away.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agozebra: labelmanager could return reserved labels
Pat Ruddy [Wed, 9 Dec 2020 10:25:38 +0000 (10:25 +0000)]
zebra: labelmanager could return reserved labels

when checking if there is a "hole" behind the current reservation
marker the calculation of whether the hole is big enough to satisfy
the requested chunk is out by 1. This could result in returning a label
which has already been allocated.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agozebra: label manager should never return a reserved block
Pat Ruddy [Wed, 9 Dec 2020 10:23:44 +0000 (10:23 +0000)]
zebra: label manager should never return a reserved block

if the requested chunk size was less than 16 then a chunk
within the reserved block would be returned. Make sure that
we never return labels that are below MPLS_LABEL_UNRESERVED_MIN

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agobgpd: add missing unlock of path_info
Pat Ruddy [Fri, 4 Dec 2020 12:16:32 +0000 (12:16 +0000)]
bgpd: add missing unlock of path_info

when the path info information is queued on the work queue it
is protected by a lock to avoid the rug being pulled whilst it
resides on the queue add an unlock in the error case where we do
no queue the reference to the workqueue.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agobgpd: add show commands for bgp labelpool
Pat Ruddy [Fri, 4 Dec 2020 12:14:26 +0000 (12:14 +0000)]
bgpd: add show commands for bgp labelpool

These commands allow the bgp labelpool lists and counts to be
viewed for debug purposes.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agobgpd: Prevent null deref
Donald Sharp [Mon, 4 Jan 2021 12:56:47 +0000 (07:56 -0500)]
bgpd: Prevent null deref

There exists a path where we could possibly have a NULL deref
of a pointer.  Prevent this from happening.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agopathd: Fix unlock of non-locked mutex
Donald Sharp [Mon, 4 Jan 2021 12:54:06 +0000 (07:54 -0500)]
pathd: Fix unlock of non-locked mutex

We have several instances of a non-locked mutex being unlocked
in path_zebra_router_id_update.  Clean this up.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agovrrpd.yang bug fix: modify augment path to comply with rfc 7950
Bo Zhang [Sun, 3 Jan 2021 01:31:16 +0000 (17:31 -0800)]
vrrpd.yang bug fix: modify augment path to comply with rfc 7950

Signed-off-by: Bo Zhang <logbob0401@gmail.com>
3 years agoMerge pull request #7791 from mjstapp/fix_pbr_nht_goto
Quentin Young [Tue, 29 Dec 2020 20:54:46 +0000 (15:54 -0500)]
Merge pull request #7791 from mjstapp/fix_pbr_nht_goto

pbrd: clean up possible checkpatch issue

3 years agoMerge pull request #7795 from louis-oui/show-database-vrf
Quentin Young [Tue, 29 Dec 2020 20:53:28 +0000 (15:53 -0500)]
Merge pull request #7795 from louis-oui/show-database-vrf

ospfd: fix no show database output when selecting vrf

3 years agoMerge pull request #7777 from volta-networks/fix_zebra_rib_c++
Quentin Young [Tue, 29 Dec 2020 16:07:12 +0000 (11:07 -0500)]
Merge pull request #7777 from volta-networks/fix_zebra_rib_c++

zebra: avoid c++ reserved keyword

3 years agotests: topotests/lib/lutil.py: add timestamp to log of test start
G. Paul Ziemba [Sat, 19 Dec 2020 19:41:05 +0000 (11:41 -0800)]
tests: topotests/lib/lutil.py: add timestamp to log of test start

    Timestamps in test logs are needed for correlation with messages in
    routing protocol log files. Vox populi indicates preference for
    timestamp at beginning of line.

    OLD:
    (#55) scripts/rip-show.py:61 COMMAND:r1:vtysh -c "show ip rip status": 00:0.* 00:0:wait:RIP Peers:

    NEW:
    Sat Dec 19 08:26:45 2020 (#55) scripts/rip-show.py:61 COMMAND:r1:vtysh -c "show ip rip status": 00:0.* 00:0:wait:RIP Peers:

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
3 years agoMerge pull request #7788 from deastoe/zebra2proto-kernel-connect
Stephen Worley [Mon, 28 Dec 2020 19:57:41 +0000 (14:57 -0500)]
Merge pull request #7788 from deastoe/zebra2proto-kernel-connect

zebra: zebra2proto() handle kernel/connect type

3 years agoMerge pull request #7761 from bisdhdh/local_1
Donatas Abraitis [Mon, 28 Dec 2020 15:09:36 +0000 (17:09 +0200)]
Merge pull request #7761 from bisdhdh/local_1

doc: Add BGP GR command for preserving forwarding state.

3 years agoMerge pull request #7776 from mjstapp/fix_pathd_build
Olivier Dugeon [Mon, 28 Dec 2020 09:45:38 +0000 (10:45 +0100)]
Merge pull request #7776 from mjstapp/fix_pathd_build

pathd: fix compile warning in path_cli

3 years agoospfd: fix no show database output when selecting vrf
Louis Scalbert [Thu, 24 Dec 2020 13:41:31 +0000 (14:41 +0100)]
ospfd: fix no show database output when selecting vrf

No output when selecting a vrf
frr# show ip ospf vrf default database router adv-router 10.125.0.1
VRF Name: default

       OSPF Router with ID (10.125.0.1)

In comparison with:
frr# show ip ospf database router adv-router 10.125.0.1

       OSPF Router with ID (10.125.0.1)

                Router Link States (Area 0.0.0.0)

  LS age: 155
  Options: 0x2  : *|-|-|-|-|-|E|-
(...)

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
3 years agopimd: IGMP conformance 5.10 test case is failing
Mobashshera Rasool [Thu, 17 Dec 2020 11:40:13 +0000 (11:40 +0000)]
pimd: IGMP conformance 5.10 test case is failing

Test case 5.10 sends leave message to unicast address, the leave
packet is accepted and a query message is sent in response to this.
No validation for address is present in the function

Add check for addresses as per RFC. Leave messages are allowed only
sent to either ALL-ROUTERS (224.0.0.2) or group address.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agopbrd: clean up possible checkpatch issue
Mark Stapp [Wed, 23 Dec 2020 19:03:06 +0000 (14:03 -0500)]
pbrd: clean up possible checkpatch issue

PR 7724 triggered a minor style warning (at least in the CI
context). Clean that up.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #7724 from donaldsharp/pbr_zebra_was_wrong
Mark Stapp [Wed, 23 Dec 2020 18:34:18 +0000 (13:34 -0500)]
Merge pull request #7724 from donaldsharp/pbr_zebra_was_wrong

Pbr zebra was wrong

3 years agoMerge pull request #7759 from qlyoung/reformat-tests-again
Mark Stapp [Wed, 23 Dec 2020 13:11:00 +0000 (08:11 -0500)]
Merge pull request #7759 from qlyoung/reformat-tests-again

Reformat tests again

3 years agodoc: Add BGP GR command for preserving forwarding state.
bisdhdh [Thu, 17 Dec 2020 21:57:45 +0000 (03:27 +0530)]
doc: Add BGP GR command for preserving forwarding state.

BGP GR command for preserving forwarding state command is
Added to the docs.

Signed-off-by: Biswajit Sadhu <biswajit.sadhu@gmail.com>
3 years agoMerge pull request #6212 from gpnaveen/static_routes
Martin Winter [Tue, 22 Dec 2020 22:11:37 +0000 (14:11 -0800)]
Merge pull request #6212 from gpnaveen/static_routes

tests: Adding static routing topojson automation suites.

3 years agozebra: zebra2proto() handle kernel/connect type
Duncan Eastoe [Tue, 22 Dec 2020 21:23:43 +0000 (21:23 +0000)]
zebra: zebra2proto() handle kernel/connect type

When dplane_fpm_nl is used the "Please add this protocol(n) to proper
rt_netlink.c handling" debug message is emitted for any route of type
kernel or connected.

This severely reduces performance of dplane_fpm_nl when large numbers
of these routes are present in the RIB.

The messages are not observed when using the original fpm module since
this uses a custom function, netlink_proto_from_route_type().

zebra2proto() now returns RTPROT_KERNEL for ZEBRA_ROUTE_CONNECT and
ZEBRA_ROUTE_KERNEL. This should only impact dplane_fpm_nl's use of
the common netlink routines since these routes generally ignored via
checking of RSYSTEM_ROUTE().

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>