]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
3 years agobgpd: raise privs for SO_BINDTODEVICE
Igor Ryzhov [Tue, 18 May 2021 14:07:06 +0000 (17:07 +0300)]
bgpd: raise privs for SO_BINDTODEVICE

The priv raise was incorrectly dropped in 97896a9.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agodoc: remove redundant index directives
Igor Ryzhov [Tue, 18 May 2021 12:29:59 +0000 (15:29 +0300)]
doc: remove redundant index directives

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agotests: Fix for multicast_pim_sm failure
Kuldeep Kashyap [Tue, 18 May 2021 01:50:49 +0000 (18:50 -0700)]
tests: Fix for multicast_pim_sm failure

Test case test_verify_mroute_when_5_different_receiver_joining_same_sources_p0
is failing intermittently in master. Fixed the issue.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
3 years agoospf6d: fix "default-information originate" in non-existing vrf
Igor Ryzhov [Mon, 17 May 2021 22:24:22 +0000 (01:24 +0300)]
ospf6d: fix "default-information originate" in non-existing vrf

If the default route redistribution is configured in OSPF6 router before
the VRF is created, then this is not currently registered in zebra after
the VRF creation.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospfd: fix "default-information originate" in non-existing vrf
Igor Ryzhov [Mon, 17 May 2021 22:23:35 +0000 (01:23 +0300)]
ospfd: fix "default-information originate" in non-existing vrf

If the default route redistribution is configured in OSPF router before
the VRF is created, then this is not currently registered in zebra after
the VRF creation.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoisisd: fix build warning and simplify code
Igor Ryzhov [Mon, 17 May 2021 10:07:24 +0000 (13:07 +0300)]
isisd: fix build warning and simplify code

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agopimd: Fix rare crash situation
Donald Sharp [Fri, 14 May 2021 13:46:36 +0000 (09:46 -0400)]
pimd: Fix rare crash situation

When running pim on an interface and that interface has
state and we move that interface into a different vrf
there exists a call path where we have not created the pimreg
device yet.  Prevent a crash in this rare situation.

Ticket: #2552763
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agopimd: When bind fails give some extra data
Donald Sharp [Fri, 14 May 2021 13:44:12 +0000 (09:44 -0400)]
pimd: When bind fails give some extra data

When bind to a socket fails, let's give some color so we can
understand and fix the issue.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agopathd: Fix affinity command to exclude options to match implementation.
Javier Garcia [Thu, 13 May 2021 11:38:41 +0000 (13:38 +0200)]
pathd: Fix affinity command to exclude options to match implementation.

Including documentation update.

Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
3 years agopathd: Clean coverity issues after merge pathd link state feature.
Javier Garcia [Thu, 13 May 2021 11:17:44 +0000 (13:17 +0200)]
pathd: Clean coverity issues after merge pathd link state feature.

Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
3 years agotests: fix bgp_l3vpn_to_bgp_vrf
Igor Ryzhov [Wed, 12 May 2021 15:55:40 +0000 (18:55 +0300)]
tests: fix bgp_l3vpn_to_bgp_vrf

Too many arguments for format string.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospf6d: free "default-information originate" config when removing router
Igor Ryzhov [Fri, 7 May 2021 14:53:13 +0000 (17:53 +0300)]
ospf6d: free "default-information originate" config when removing router

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospf6d: fix crash when removing router from vrf that doesn't exist
Igor Ryzhov [Fri, 7 May 2021 14:52:41 +0000 (17:52 +0300)]
ospf6d: fix crash when removing router from vrf that doesn't exist

`listgetdata(listhead(list))` crashes for an empty list.

Reproducible with:
```
router ospf6 vrf doesntexist
 default-information originate always
 exit
no router ospf6 vrf doesntexist
```

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospf6d: always free redistribute config
Igor Ryzhov [Fri, 7 May 2021 14:05:40 +0000 (17:05 +0300)]
ospf6d: always free redistribute config

When the ospf6 instance in unknown VRF is deleted, the redistribution
config is not freed, because it is not registered in zebra. We should
always free the config regardless of zebra registration status.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoisisd: fix dangling instances
Igor Ryzhov [Sun, 9 May 2021 13:43:29 +0000 (16:43 +0300)]
isisd: fix dangling instances

We only need an instance when we have at least one area configured in a
VRF. Currently we have the following issues:
- instance for the default VRF is always created
- instance is not removed after the last area config is removed

This commit fixes both issues.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoisisd: fix memleak when deleting area and instance
Igor Ryzhov [Sun, 9 May 2021 13:09:38 +0000 (16:09 +0300)]
isisd: fix memleak when deleting area and instance

Release memory for all redistributed route info.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoisisd: fix redistribution in vrf
Igor Ryzhov [Tue, 4 May 2021 21:10:31 +0000 (00:10 +0300)]
isisd: fix redistribution in vrf

When the redistribution is configured in non-default VRF, isisd should
redistribute routes from this VRF instead of default.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoisisd: fix "default-information originate always"
Igor Ryzhov [Sun, 9 May 2021 14:07:39 +0000 (17:07 +0300)]
isisd: fix "default-information originate always"

We don't need to register for default routes from zebra, when the
origination type is set to "always".

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoisisd: deregister vrf from zebra when vrf is disabled
Igor Ryzhov [Tue, 4 May 2021 18:58:23 +0000 (21:58 +0300)]
isisd: deregister vrf from zebra when vrf is disabled

Currently the VRF is deregistered only when it is re-enabled again.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agopimd: Remove pim->vrf_id and use pim->vrf->vrf_id
Donald Sharp [Wed, 12 May 2021 18:31:45 +0000 (14:31 -0400)]
pimd: Remove pim->vrf_id and use pim->vrf->vrf_id

VRF creation can happen from either cli or from
knowledged about the vrf learned from zebra.
In the case where we learn about the vrf from
the cli, the vrf id is UNKNOWN.  Upon actual
creation of the vrf, lib/vrf.c touches up the vrf_id
and calls pim_vrf_enable to turn it on properly.
At this point in time we have a pim->vrf_id of
UNKNOWN and the vrf->vrf_id of the right value.

There is no point in duplicating this data.  So just
remove all pim->vrf_id and use the vrf->vrf_id instead
since we keep a copy of the pim->vrf pointer.

This will remove some crashes where we expect the
pim->vrf_id to be usable and it's not.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agopimd: There exists a path where on vrf bringup we do not create the pimreg
Donald Sharp [Mon, 3 May 2021 18:39:47 +0000 (14:39 -0400)]
pimd: There exists a path where on vrf bringup we do not create the pimreg

When creating configuration for a vrf *Before* the vrf has been
created, pim will not properly create the pimreg device and
we will promptly crash when we try to pass data.

Put some code checks in place to ensure that the pimreg is
created for vrf's.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoospfd: Correct Coverity defects
Olivier Dugeon [Tue, 6 Apr 2021 10:09:25 +0000 (12:09 +0200)]
ospfd: Correct Coverity defects

When browsing or parsing OSPF LSA TLVs, we need to use the LSA length which is
part of the LSA header. This length, encoded in 16 bits, must be first
converted to host byte order with ntohs() function. However, Coverity Scan
considers that ntohs() function return TAINTED data. Thus, when the length is
used to control for() loop, Coverity Scan marks this part of the code as defect
with "Untrusted Loop Bound" due to the usage of Tainted variable. Similar
problems occur when browsing sub-TLV where length is extracted with ntohs().

To overcome this limitation, a size attribute has been added to the ospf_lsa
structure. The size is set when lsa->data buffer is allocated. In addition,
when an OSPF packet is received, the size of the payload is controlled before
contains is processed. For OSPF LSA, this allow a secure buffer allocation.
Thus, new size attribute contains the exact buffer allocation allowing a
strict control during TLV browsing.

This patch adds extra control to bound for() loop during TLV browsing to
avoid potential problem as suggested by Coverity Scan. Controls are based
on new size attribute of the ospf_lsa structure to avoid any ambiguity.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
3 years agoMerge pull request #8743 from taspelund/fix_pfx-tree_default_8.0
Igor Ryzhov [Thu, 27 May 2021 07:14:09 +0000 (10:14 +0300)]
Merge pull request #8743 from taspelund/fix_pfx-tree_default_8.0

[8.0] lib: fix handling of rmap prefix-tree default node

3 years agolib: fix handling of rmap prefix-tree default node
Trey Aspelund [Fri, 21 May 2021 22:04:15 +0000 (22:04 +0000)]
lib: fix handling of rmap prefix-tree default node

Prior to this commit, updating a prefix-list that is referenced by a
route-map clause will unconditionally delete the root node of that
route-map's prefix-tree (used with route-map optimization).
This is problematic because routes not matching a more specific node
in the tree (i.e. other prefix-list sequences) will not fall-back to
the default node, thus they will not hit any route-map sequences.
This commit ensures that an update to a prefix-list will only delete
the default node while adding the first/only seq to the list.

Example config:
========
ip prefix-list peer475-out-pfxlist seq 45 permit 2.138.0.0/16
ip prefix-list peer475-out-pfxlist seq 50 permit 0.0.0.0/0
!
route-map peer475-out permit 5
 match ip address prefix-list peer475-out-pfxlist

Before:
========
ub20# do show route-map peer475-out prefix-table
ZEBRA:

IPv4 Prefix                                           Route-map Index List
_______________                                       ____________________
    0.0.0.0/0 (2)
(P)
                                                      peer475-out seq 5

    2.138.0.0/16 (2)
(P) 0.0.0.0/0

                                                      peer475-out seq 5
IPv6 Prefix                                           Route-map Index List
_______________                                       ____________________
BGP:
IPv4 Prefix                                           Route-map Index List
_______________                                       ____________________
    0.0.0.0/0 (2)
(P)
                                                      peer475-out seq 5
    2.138.0.0/16 (2)
(P) 0.0.0.0/0
                                                      peer475-out seq 5
IPv6 Prefix                                           Route-map Index List
_______________                                       ____________________
ub20# conf t
ub20(config)# ip prefix-list peer475-out-pfxlist seq 45 permit 2.138.0.0/16 le 32
ub20(config)# do show route-map peer475-out prefix-table
ZEBRA:
IPv4 Prefix                                           Route-map Index List
_______________                                       ____________________
    2.138.0.0/16 (2)
(P)
                                                      peer475-out seq 5
IPv6 Prefix                                           Route-map Index List
_______________                                       ____________________
BGP:
IPv4 Prefix                                           Route-map Index List
_______________                                       ____________________
    2.138.0.0/16 (2)
(P)
                                                      peer475-out seq 5
IPv6 Prefix                                           Route-map Index List
_______________                                       ____________________
ub20(config)#

After:
========
ub20(config)# do show route-map peer475-out prefix-table
ZEBRA:

IPv4 Prefix                                           Route-map Index List
_______________                                       ____________________
    0.0.0.0/0 (2)
(P)
                                                      peer475-out seq 5

    2.138.0.0/16 (2)
(P) 0.0.0.0/0

                                                      peer475-out seq 5

IPv6 Prefix                                           Route-map Index List
_______________                                       ____________________

BGP:

IPv4 Prefix                                           Route-map Index List
_______________                                       ____________________
    0.0.0.0/0 (2)
(P)
                                                      peer475-out seq 5

    2.138.0.0/16 (2)
(P) 0.0.0.0/0

                                                      peer475-out seq 5

IPv6 Prefix                                           Route-map Index List
_______________                                       ____________________

ub20(config)# ip prefix-list peer475-out-pfxlist seq 45 permit 2.138.0.0/16 le 32
ub20(config)# do show route-map peer475-out prefix-table
ZEBRA:

IPv4 Prefix                                           Route-map Index List
_______________                                       ____________________
    0.0.0.0/0 (2)
(P)
                                                      peer475-out seq 5

    2.138.0.0/16 (2)
(P) 0.0.0.0/0

                                                      peer475-out seq 5

IPv6 Prefix                                           Route-map Index List
_______________                                       ____________________

BGP:

IPv4 Prefix                                           Route-map Index List
_______________                                       ____________________
    0.0.0.0/0 (2)
(P)
                                                      peer475-out seq 5

    2.138.0.0/16 (2)
(P) 0.0.0.0/0

                                                      peer475-out seq 5

IPv6 Prefix                                           Route-map Index List
_______________                                       ____________________

ub20(config)#

Fixes: 8410
Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
(cherry picked from commit 4718791c8f7101379f99fa7174e8ccaf80573433)

3 years agoMerge pull request #8717 from idryzhov/8.0-fix-missing-commands
Donald Sharp [Mon, 24 May 2021 10:47:32 +0000 (06:47 -0400)]
Merge pull request #8717 from idryzhov/8.0-fix-missing-commands

[8.0] bgpd: fix missing command installations

3 years agobgpd: fix missing command installations
Igor Ryzhov [Fri, 21 May 2021 17:11:41 +0000 (20:11 +0300)]
bgpd: fix missing command installations

They were missed during BGP NB revert.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8670 from idryzhov/bgp-nb-revert
Donald Sharp [Thu, 20 May 2021 15:26:32 +0000 (11:26 -0400)]
Merge pull request #8670 from idryzhov/bgp-nb-revert

[8.0] BGP NB revert

3 years agoMerge pull request #8702 from donaldsharp/dc_80
Donatas Abraitis [Thu, 20 May 2021 06:29:01 +0000 (09:29 +0300)]
Merge pull request #8702 from donaldsharp/dc_80

bgpd: recalc peer's sort after changing confed peers

3 years agobgpd: recalc peer's sort after changing confed peers
Alexander Chernavin [Mon, 17 May 2021 09:34:03 +0000 (05:34 -0400)]
bgpd: recalc peer's sort after changing confed peers

Currently, when AS number of an existing BGP neighbor is added in a BGP
confederation, AS_CONFED_SEQUENCE segment attribute will be missing in
prefixes advertised to the neighbor. Also, receiving prefixes from the
neighbor will be withdrawn because of "Malformed AS path from A.B.C.D".

    neighbor 10.100.200.3 remote-as 123
    bgp confederation identifier 65001
    bgp confederation peers 123

With this change, update peer's sort after adding or removing its AS
number in a BGP confederation.

Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
3 years agoRevert "tests/bgpd: initialized candidate_config to vtysh"
Igor Ryzhov [Fri, 14 May 2021 12:36:24 +0000 (15:36 +0300)]
Revert "tests/bgpd: initialized candidate_config to vtysh"

This reverts commit 64fb3f86661c0f5ac2f9017a7b6b999dbcb8e2e4.

3 years agoRevert "tests: add bgp yang module registery to attr test"
Igor Ryzhov [Fri, 14 May 2021 00:06:04 +0000 (03:06 +0300)]
Revert "tests: add bgp yang module registery to attr test"

This reverts commit 15cbc382061ee8807dbe79827c96ae94a4aa90c6.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoRevert "bgpd: register northbound callbacks to bootstrap"
Igor Ryzhov [Thu, 13 May 2021 23:57:30 +0000 (02:57 +0300)]
Revert "bgpd: register northbound callbacks to bootstrap"

This reverts commit e4a464160dee2b53f2851879b2c736139061e74c.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoRevert "bgpd: bgp northbound callbacks prototypes"
Igor Ryzhov [Thu, 13 May 2021 23:21:54 +0000 (02:21 +0300)]
Revert "bgpd: bgp northbound callbacks prototypes"

This reverts commit a1950c80a570e721503de4cf86de7a247e900781.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoRevert "bgpd: convert global config to transactional cli"
Igor Ryzhov [Thu, 13 May 2021 23:20:04 +0000 (02:20 +0300)]
Revert "bgpd: convert global config to transactional cli"

This reverts commit ff8a8a7ac10b3211d5586c29dfcc5a3b32841029.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoRevert "bgpd: register nb routing hook"
Igor Ryzhov [Thu, 13 May 2021 23:16:29 +0000 (02:16 +0300)]
Revert "bgpd: register nb routing hook"

This reverts commit 374069da83f5f00f53156e1886372391c3f00b3f.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoRevert "bgpd: shorten northbound callback names"
Igor Ryzhov [Thu, 13 May 2021 23:15:46 +0000 (02:15 +0300)]
Revert "bgpd: shorten northbound callback names"

This reverts commit 906ebeec9800d3aef0eddb70ce74b48e370cb5ce.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoRevert "bgpd: correct bgp global context"
Igor Ryzhov [Thu, 13 May 2021 23:13:40 +0000 (02:13 +0300)]
Revert "bgpd: correct bgp global context"

This reverts commit 87ce25646be36bb9a27e75d177615e3d19a07df0.

3 years agoRevert "bgpd: move router bgp nb callback"
Igor Ryzhov [Thu, 13 May 2021 23:13:20 +0000 (02:13 +0300)]
Revert "bgpd: move router bgp nb callback"

This reverts commit 5e42cb2fb088a28202e60ec57a4116f3d1f0afd5.

3 years agoRevert "bgpd: no router bgp check candidate config"
Igor Ryzhov [Thu, 13 May 2021 23:13:15 +0000 (02:13 +0300)]
Revert "bgpd: no router bgp check candidate config"

This reverts commit 4b63e358bc213bfa9d1baeda6fbbdfa39df60d2e.

3 years agoRevert "bgpd: fix SA warnings in bgp northbound"
Igor Ryzhov [Thu, 13 May 2021 23:12:55 +0000 (02:12 +0300)]
Revert "bgpd: fix SA warnings in bgp northbound"

This reverts commit 082de39e7155e958416564f65286d4b57434ce4a.

3 years agoRevert "bgpd: Use default VRF name if using `router bgp` command"
Igor Ryzhov [Thu, 13 May 2021 23:12:49 +0000 (02:12 +0300)]
Revert "bgpd: Use default VRF name if using `router bgp` command"

This reverts commit 5ce106b72bac1c45567159c4dfcc9276164bd18b.

3 years agoRevert "bgpd: rename router bgp callbacks"
Igor Ryzhov [Thu, 13 May 2021 23:12:33 +0000 (02:12 +0300)]
Revert "bgpd: rename router bgp callbacks"

This reverts commit feded4118b89eba5a1629f45cfe623277612e404.

3 years agoRevert "bgpd: fix crash in bgp instance creation"
Igor Ryzhov [Thu, 13 May 2021 23:12:29 +0000 (02:12 +0300)]
Revert "bgpd: fix crash in bgp instance creation"

This reverts commit a5ab756f2483594a19837e0c30f6184cd966940f.

3 years agoRevert "bgpd: use common api in bgp_get"
Igor Ryzhov [Thu, 13 May 2021 23:12:24 +0000 (02:12 +0300)]
Revert "bgpd: use common api in bgp_get"

This reverts commit bdaadb91e8adc103197d8f57a6a3358ff313a23c.

3 years agoRevert "yang: update bgp module afi-safi parameters"
Igor Ryzhov [Thu, 13 May 2021 23:11:51 +0000 (02:11 +0300)]
Revert "yang: update bgp module afi-safi parameters"

This reverts commit 3b66fcef5833da4eeb2dd19922778b108a1c63c1.

3 years agoRevert "bgpd: convert addr-family clis to transactional clis"
Igor Ryzhov [Thu, 13 May 2021 23:11:43 +0000 (02:11 +0300)]
Revert "bgpd: convert addr-family clis to transactional clis"

This reverts commit 37a87b8f9865fe17a235b9a76a0dc47f03aae3df.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoRevert "bgpd: add match-med nb support in aggregate cmd"
Igor Ryzhov [Thu, 13 May 2021 23:08:17 +0000 (02:08 +0300)]
Revert "bgpd: add match-med nb support in aggregate cmd"

This reverts commit fa423774ff303ffc62db91f8aa09995711e81d50.

3 years agoRevert "bgpd: add nb support for suppress-map in aggregate cmd"
Igor Ryzhov [Thu, 13 May 2021 23:08:11 +0000 (02:08 +0300)]
Revert "bgpd: add nb support for suppress-map in aggregate cmd"

This reverts commit 90e21f3535ff2d887cbb52f0e4e6fe4907095d70.

3 years agoRevert "bgpd: neighbor peergrp config to transactional cli"
Igor Ryzhov [Thu, 13 May 2021 23:06:27 +0000 (02:06 +0300)]
Revert "bgpd: neighbor peergrp config to transactional cli"

This reverts commit f4b8ec07219cce13c8627efe311247ee06f3a8ab.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoRevert "*: shorten name of prefix-limit options"
Igor Ryzhov [Thu, 13 May 2021 22:52:29 +0000 (01:52 +0300)]
Revert "*: shorten name of prefix-limit options"

This reverts commit afe03f6094656c9f96150223c1ed5ee8e9a4ba93.

3 years agoRevert "bgpd: convert max prefix clis to transactional"
Igor Ryzhov [Thu, 13 May 2021 22:52:25 +0000 (01:52 +0300)]
Revert "bgpd: convert max prefix clis to transactional"

This reverts commit 04261decb9901c931f1800f27c459f3a0483776c.

3 years agoRevert "bgpd: convert neighbor peer config to transactional"
Igor Ryzhov [Thu, 13 May 2021 22:52:20 +0000 (01:52 +0300)]
Revert "bgpd: convert neighbor peer config to transactional"

This reverts commit 8611c7f3b6f33cb5ef8687bc126354d06eadbfcf.

3 years agoRevert "bgpd: shorten names for default originate nb callbacks"
Igor Ryzhov [Thu, 13 May 2021 22:52:15 +0000 (01:52 +0300)]
Revert "bgpd: shorten names for default originate nb callbacks"

This reverts commit cc4440c3177f312294ec0cec836f41e453b367fb.

3 years agoRevert "bgpd: default originate transactional callbacks"
Igor Ryzhov [Thu, 13 May 2021 22:52:10 +0000 (01:52 +0300)]
Revert "bgpd: default originate transactional callbacks"

This reverts commit 7c54def2926e85d760a7ab42f879a6545630878f.

3 years agoRevert "bgpd: Actually return the group peer"
Igor Ryzhov [Thu, 13 May 2021 22:51:34 +0000 (01:51 +0300)]
Revert "bgpd: Actually return the group peer"

This reverts commit e5209541f2f425c25ef016be2cade323b327ea17.

3 years agoRevert "bgpd: Check if peer is not NULL before calling peer_as_change()"
Igor Ryzhov [Thu, 13 May 2021 22:50:56 +0000 (01:50 +0300)]
Revert "bgpd: Check if peer is not NULL before calling peer_as_change()"

This reverts commit 7a68370285ed4d64e1ed9dcab60b17bfb26a0ba4.

3 years agoRevert "bgpd: Respect `-e X` value for multipath"
Igor Ryzhov [Thu, 13 May 2021 22:50:05 +0000 (01:50 +0300)]
Revert "bgpd: Respect `-e X` value for multipath"

This reverts commit 76bd07b6881add1fbeafa5dc11c48d9ad6a00f14.

3 years agoRevert "bgpd: fix compiler warnings in nbr cmd"
Igor Ryzhov [Thu, 13 May 2021 22:49:37 +0000 (01:49 +0300)]
Revert "bgpd: fix compiler warnings in nbr cmd"

This reverts commit 555c8ab7ad7a9f60c8d6cc9dd48705f0ee364797.

3 years agoRevert "bgpd: convert to yang modeled nbr cmds"
Igor Ryzhov [Thu, 13 May 2021 22:49:19 +0000 (01:49 +0300)]
Revert "bgpd: convert to yang modeled nbr cmds"

This reverts commit 232c75cd032a0ff8a6540f03a10cb1ae3143af06.

3 years agoRevert "bgpd: Prevent null deref"
Igor Ryzhov [Thu, 13 May 2021 22:44:16 +0000 (01:44 +0300)]
Revert "bgpd: Prevent null deref"

This reverts commit e80bc08944be7cbe4085c03653818139ccd616d1.

3 years agoRevert "bgpd: convert neighbor plist to transactional cli"
Igor Ryzhov [Thu, 13 May 2021 22:43:32 +0000 (01:43 +0300)]
Revert "bgpd: convert neighbor plist to transactional cli"

This reverts commit d9986d26c0a48f9cc2afeaa15fe304b094c041e4.

3 years agoRevert "yang: nbr plist nb conversion for more afi-safis"
Igor Ryzhov [Thu, 13 May 2021 22:43:28 +0000 (01:43 +0300)]
Revert "yang: nbr plist nb conversion for more afi-safis"

This reverts commit f4eac84c5ac136bc7dd37f2c950d375e94616bc4.

3 years agoRevert "bgpd: convert nbr rmap transactional cli"
Igor Ryzhov [Thu, 13 May 2021 22:43:23 +0000 (01:43 +0300)]
Revert "bgpd: convert nbr rmap transactional cli"

This reverts commit c6685575336566680aeb537e8ed5abb164be0268.

3 years agoRevert "bgpd: fix unsetting of multipath as-set"
Igor Ryzhov [Thu, 13 May 2021 22:42:38 +0000 (01:42 +0300)]
Revert "bgpd: fix unsetting of multipath as-set"

This reverts commit 174c5be33c433b9cc586d3aeee178407d282d97f.

3 years agoRevert "bgpd: fix removal of rd vpn export"
Igor Ryzhov [Thu, 13 May 2021 22:42:33 +0000 (01:42 +0300)]
Revert "bgpd: fix removal of rd vpn export"

This reverts commit c576dc6a4f5c62aeeb5e77e41c0f8efbf7f5797f.

3 years agoRevert "bgpd: Temp fix to allow numbered peers to be part of a peer group"
Igor Ryzhov [Thu, 13 May 2021 22:42:19 +0000 (01:42 +0300)]
Revert "bgpd: Temp fix to allow numbered peers to be part of a peer group"

This reverts commit 2a059a5448c37699eabd8802b44427978ec645ac.

3 years agoRevert "bgpd: Remove hidden `neighbor X route-map Y <in|out>` command"
Igor Ryzhov [Thu, 13 May 2021 22:42:07 +0000 (01:42 +0300)]
Revert "bgpd: Remove hidden `neighbor X route-map Y <in|out>` command"

This reverts commit 4c3e9f072a415aa02f367aaff1cc90dd6fda5d06.

3 years agoRevert "bgpd: When deleting a neighbor from a peer-group the PGNAME is optional"
Igor Ryzhov [Thu, 13 May 2021 22:41:55 +0000 (01:41 +0300)]
Revert "bgpd: When deleting a neighbor from a peer-group the PGNAME is optional"

This reverts commit 2cbd181ac99801f2fb6b5b820ad66626c0f7168a.

3 years agoRevert "bgpd: fix 'neighbor X prefix-list Y in' SAFI VPN"
Igor Ryzhov [Thu, 13 May 2021 22:41:40 +0000 (01:41 +0300)]
Revert "bgpd: fix 'neighbor X prefix-list Y in' SAFI VPN"

This reverts commit 9fa7a8bf3769914620225826e4ca8ef3f8182106.

3 years agoRevert "bgpd: don't rely on northbound control plane protocol vrf pointer"
Igor Ryzhov [Thu, 13 May 2021 22:41:27 +0000 (01:41 +0300)]
Revert "bgpd: don't rely on northbound control plane protocol vrf pointer"

This reverts commit 3fa607bebacd4881053414d641e8376b4e4f6e83.

3 years agoRevert "bgpd: convert send-community to transactional cli"
Igor Ryzhov [Thu, 13 May 2021 22:40:02 +0000 (01:40 +0300)]
Revert "bgpd: convert send-community to transactional cli"

This reverts commit e48a9a90e07ccdeae8f6bcdff9c433f5d6ea0b39.

3 years agoRevert "bgpd: remove duplicated checks from CLI"
Igor Ryzhov [Thu, 13 May 2021 22:39:29 +0000 (01:39 +0300)]
Revert "bgpd: remove duplicated checks from CLI"

This reverts commit 45d1d7c9a2b7b41125e565af566e10d470349122.

3 years agoRevert "bgpd: don't use operational state in "router bgp" command"
Igor Ryzhov [Thu, 13 May 2021 22:39:24 +0000 (01:39 +0300)]
Revert "bgpd: don't use operational state in "router bgp" command"

This reverts commit 4062b455a6eacfe3f5107daa68351b18cc0ca7e7.

3 years agoRevert "bgpd: convert l2vpn evpn nbr route-map to nb"
Igor Ryzhov [Thu, 13 May 2021 22:39:10 +0000 (01:39 +0300)]
Revert "bgpd: convert l2vpn evpn nbr route-map to nb"

This reverts commit 8be861e60b7f6069c8a1c2aab75bbbbed3b57829.

3 years agoRevert "bgpd: prefix-list and route-map nb fixes"
Igor Ryzhov [Thu, 13 May 2021 22:39:03 +0000 (01:39 +0300)]
Revert "bgpd: prefix-list and route-map nb fixes"

This reverts commit 68a57089122b22414b04ebc28bd0db81051fdcbd.

3 years agoRevert "bgpd: vrf route leaking, fix the bgp instance delete and re-add"
Igor Ryzhov [Thu, 13 May 2021 22:38:33 +0000 (01:38 +0300)]
Revert "bgpd: vrf route leaking, fix the bgp instance delete and re-add"

This reverts commit ef7c53e244d5d0cd7c0ba2536fc931abf28df656.

3 years agoRevert "bgpd: fix pending commit check"
Igor Ryzhov [Thu, 13 May 2021 22:38:26 +0000 (01:38 +0300)]
Revert "bgpd: fix pending commit check"

This reverts commit ea1a5c00df70d7204ccf8716222dc355e2501723.

3 years agoRevert "bgpd: fix bgp_get_vty return values"
Igor Ryzhov [Thu, 13 May 2021 22:38:09 +0000 (01:38 +0300)]
Revert "bgpd: fix bgp_get_vty return values"

This reverts commit d09328e5991c9f657758921264492825e7081175.

3 years agoRevert "bgpd: fix crash when as/type mismatches in config"
Igor Ryzhov [Thu, 13 May 2021 22:37:44 +0000 (01:37 +0300)]
Revert "bgpd: fix crash when as/type mismatches in config"

This reverts commit 0d6d0208a55c786513f472ad690bae1788e173fa.

3 years agoRevert "bgpd: simplify bgp_global_local_as_modify code"
Igor Ryzhov [Thu, 13 May 2021 22:37:38 +0000 (01:37 +0300)]
Revert "bgpd: simplify bgp_global_local_as_modify code"

This reverts commit debb7b1931cdf5b3e06ca244bf09bb009b5a8677.

3 years agoRevert "bgpd: forbid modification of bgp instance type"
Igor Ryzhov [Thu, 13 May 2021 22:37:27 +0000 (01:37 +0300)]
Revert "bgpd: forbid modification of bgp instance type"

This reverts commit d3e3677096e5cf30116ca63879caf44e25b080ad.

3 years agoRevert "bgpd: don't return error for GR no-op commands"
Igor Ryzhov [Thu, 13 May 2021 22:37:06 +0000 (01:37 +0300)]
Revert "bgpd: don't return error for GR no-op commands"

This reverts commit 895b0d0ad6e39ad54e82e5c3d9060aa390c8bdd8.

3 years agobuild: Update configure.ac to reflect proper version 8.0-dev
Donald Sharp [Tue, 18 May 2021 18:40:35 +0000 (14:40 -0400)]
build: Update configure.ac to reflect proper version

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #8608 from Fredi-raspall/pr_isis_sr_anycast base_8.0
Renato Westphal [Tue, 18 May 2021 14:35:58 +0000 (11:35 -0300)]
Merge pull request #8608 from Fredi-raspall/pr_isis_sr_anycast

isisd: clear the N-flag in ext. reachability TLVs

3 years agoMerge pull request #8133 from gpnaveen/ospf_basic_testcases
Olivier Dugeon [Tue, 18 May 2021 14:26:12 +0000 (16:26 +0200)]
Merge pull request #8133 from gpnaveen/ospf_basic_testcases

tests: adding ospf basic 2 testcases.

3 years agoMerge pull request #8673 from LabNConsulting/chopps/ly2-again
Donald Sharp [Tue, 18 May 2021 14:21:51 +0000 (10:21 -0400)]
Merge pull request #8673 from LabNConsulting/chopps/ly2-again

lib: libyang2 add missed conversion

3 years agoMerge pull request #8646 from chiragshah6/mdev
Patrick Ruddy [Tue, 18 May 2021 10:45:56 +0000 (11:45 +0100)]
Merge pull request #8646 from chiragshah6/mdev

zebra: evpn check vni oper state in svi up/down event

3 years agoisisd: simplify node Sid handling
Fredi Raspall [Tue, 18 May 2021 08:37:28 +0000 (10:37 +0200)]
isisd: simplify node Sid handling

Centralize the n-flag-clear processing to a single point.

Signed-off-by: Fredi Raspall <fredi@voltanet.io>
3 years agoisisd: clear the N-flag in ext. reachability TLVs
Fredi Raspall [Sun, 2 May 2021 15:13:11 +0000 (17:13 +0200)]
isisd: clear the N-flag in ext. reachability TLVs

If the n-flag-clear option is set in the configuration of a prefix
segment, clear the flag in the extended ip reachability TLVs.

RFCs 7794 and 8667 are not too strict on the setting / clearing the
N-flag in prefix SIDs. However, if there exists a cmd line option
to clear it, it should be cleared in the TLVs announced, as other
vendors do.

Signed-off-by: Fredi Raspall <fredi@voltanet.io>
3 years agoMerge pull request #8535 from opensourcerouting/zlog-rnode
Donatas Abraitis [Tue, 18 May 2021 06:50:42 +0000 (09:50 +0300)]
Merge pull request #8535 from opensourcerouting/zlog-rnode

zebra: replace _rnode_zlog with %pZN ext

3 years agotests: adding ospf basic 2 testcases.
nguggarigoud [Tue, 23 Feb 2021 05:04:28 +0000 (10:34 +0530)]
tests: adding ospf basic 2  testcases.

Test cases included are 1 ospf cost, 1 ospf mtu.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
3 years agolib: libyang2 add missed conversion
Christian Hopps [Mon, 17 May 2021 21:16:28 +0000 (21:16 +0000)]
lib: libyang2 add missed conversion

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agoMerge pull request #8680 from idryzhov/rip-ripng-fix-crash
Renato Westphal [Tue, 18 May 2021 01:47:27 +0000 (22:47 -0300)]
Merge pull request #8680 from idryzhov/rip-ripng-fix-crash

ripd, ripngd: fix interface wakeup after shutdown

3 years agoMerge pull request #8643 from icosahedral/master
Sri Mohana Singamsetty [Mon, 17 May 2021 18:43:35 +0000 (11:43 -0700)]
Merge pull request #8643 from icosahedral/master

bgpd: modify path selection for EVPN type-5 routes

3 years agoMerge pull request #8676 from idryzhov/test-gitignore
Mark Stapp [Mon, 17 May 2021 16:44:13 +0000 (12:44 -0400)]
Merge pull request #8676 from idryzhov/test-gitignore

tests: fix missing gitignore entry

3 years agoripngd: fix interface wakeup after shutdown
Igor Ryzhov [Mon, 17 May 2021 16:35:57 +0000 (19:35 +0300)]
ripngd: fix interface wakeup after shutdown

RIPNG schedules a call to `ripng_interface_wakeup` in 1 second after
receiving the interface UP event from zebra. The function is called even
if the interface was shut down during this interval.

This is incorrect and also leads to a crash in the following scenario:
```
vtysh -c "conf" -c "router ripng vrf red" -c "network enp2s0"
ip link add red type vrf table 1
ip link set enp2s0 vrf red
ip link set enp2s0 down
ip link set enp2s0 up && sleep 2 && ip link del red
```

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoripd: fix interface wakeup after shutdown
Igor Ryzhov [Mon, 17 May 2021 16:34:02 +0000 (19:34 +0300)]
ripd: fix interface wakeup after shutdown

RIP schedules a call to `rip_interface_wakeup` in 1 second after
receiving the interface UP event from zebra. The function is called even
if the interface was shut down during this interval.

This is incorrect and also leads to a crash in the following scenario:
```
vtysh -c "conf" -c "router rip vrf red" -c "network enp2s0"
ip link add red type vrf table 1
ip link set enp2s0 vrf red
ip link set enp2s0 down
ip link set enp2s0 up && ip link del red
```

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agotests: fix missing gitignore entry
Igor Ryzhov [Mon, 17 May 2021 10:01:55 +0000 (13:01 +0300)]
tests: fix missing gitignore entry

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8672 from qlyoung/fix-bgp-timer-display
Igor Ryzhov [Sat, 15 May 2021 11:18:50 +0000 (14:18 +0300)]
Merge pull request #8672 from qlyoung/fix-bgp-timer-display

3 years agobgpd: fix display of timers when only 1 is changed
Quentin Young [Fri, 14 May 2021 18:59:16 +0000 (14:59 -0400)]
bgpd: fix display of timers when only 1 is changed

When only one of the keepalive or hold timers is changed from the
default, bgp won't print the timers command in the config.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>