]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
2 years agodoc: Add docs for 'bgp default <afi>-<safi>' cmds
Trey Aspelund [Mon, 5 Apr 2021 03:34:15 +0000 (03:34 +0000)]
doc: Add docs for 'bgp default <afi>-<safi>' cmds

Adds climd definitions and explanations for expanded
'bgp default <afi>-<safi>' definitions.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2 years agobgpd: Convert to default_af[afi][safi]
Trey Aspelund [Sat, 3 Apr 2021 05:22:17 +0000 (05:22 +0000)]
bgpd: Convert to default_af[afi][safi]

Introduces bgp->default_af to selectively enable various default
afi/safis to be inherited by new peers.
Makes default_af flag logic consistent for all address-families, i.e.
instead of a "no default" flag for ipv4 and a "default" flag for ipv6,
just use "default" for both and make it true for ipv4 by default.
Removes old BGP_FLAG_NO_DEFAULT_IPV4 and BGP_FLAG_DEFAULT_IPV6, and
cleans up bgp->flags bit definitions to avoid gaps for unused bits.
Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2 years agoMerge pull request #8932 from anlancs/fix-some-doc-warnings
Mark Stapp [Mon, 28 Jun 2021 14:30:34 +0000 (10:30 -0400)]
Merge pull request #8932 from anlancs/fix-some-doc-warnings

doc: fix some compile warning

2 years agoMerge pull request #8925 from idryzhov/ospf6-duplicated-read
Donald Sharp [Mon, 28 Jun 2021 11:44:33 +0000 (07:44 -0400)]
Merge pull request #8925 from idryzhov/ospf6-duplicated-read

ospf6d: fix duplicated packet read

2 years agoMerge pull request #8931 from anlancs/master-fix-doc-ospf-instances
Donald Sharp [Mon, 28 Jun 2021 11:37:28 +0000 (07:37 -0400)]
Merge pull request #8931 from anlancs/master-fix-doc-ospf-instances

doc: add a note for ospfd instances

2 years agodoc: fix some compile warning
anlancs [Mon, 28 Jun 2021 06:36:26 +0000 (14:36 +0800)]
doc: fix some compile warning

domainname is a merge conflict: it is duplicated, so delete it.
bgp content is a compille warning and wrongly display, so fix it.

Signed-off-by: anlancs <anlan_cs@tom.com>
2 years agodoc: add a note for ospfd instances
anlancs [Sun, 27 Jun 2021 05:52:26 +0000 (13:52 +0800)]
doc: add a note for ospfd instances

Multiple instances of ospfd don't support vrf henceforth.

Signed-off-by: anlancs <anlan_cs@tom.com>
2 years agoospf6d: fix duplicated packet read
Igor Ryzhov [Fri, 25 Jun 2021 11:59:28 +0000 (14:59 +0300)]
ospf6d: fix duplicated packet read

When OSPFv3 router is configured in both default and non-default VRFs,
every packet destined to a non-default VRF is read twice. This makes it
impossible to establish neighborship because every DbDesc packet is
treated as duplicated and we end up infinitely exchanging DbDescs.

We should drop packets received in the default VRF if an interface we
received it on is bound to another VRF.

Same thing was done for OSPFv2 in 555691e.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agoMerge pull request #8909 from idryzhov/isis-conf
Donald Sharp [Fri, 25 Jun 2021 23:34:41 +0000 (19:34 -0400)]
Merge pull request #8909 from idryzhov/isis-conf

isisd: fix extra space in the mpls-te config output

2 years agoMerge pull request #8926 from opensourcerouting/ospfv3-nssa-typo
Donald Sharp [Fri, 25 Jun 2021 23:33:58 +0000 (19:33 -0400)]
Merge pull request #8926 from opensourcerouting/ospfv3-nssa-typo

doc: fix typo in OSPFv3 NSSA

2 years agoMerge pull request #8924 from volta-networks/fix_pcinit_coverity
Donald Sharp [Fri, 25 Jun 2021 23:15:30 +0000 (19:15 -0400)]
Merge pull request #8924 from volta-networks/fix_pcinit_coverity

pathd: coverity msg , frr_weak_random instead rand.

2 years agoMerge pull request #8920 from mjstapp/fix_bgp_adv_sa
Donald Sharp [Fri, 25 Jun 2021 23:13:25 +0000 (19:13 -0400)]
Merge pull request #8920 from mjstapp/fix_bgp_adv_sa

bgpd: Fix SA warning about freeing an aspath

2 years agodoc: fix typo in OSPFv3 NSSA
Rafael Zalamena [Fri, 25 Jun 2021 19:10:33 +0000 (16:10 -0300)]
doc: fix typo in OSPFv3 NSSA

Also change the command font to highlight it.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agoMerge pull request #8907 from idryzhov/isis-batching
Christian Hopps [Fri, 25 Jun 2021 14:32:28 +0000 (10:32 -0400)]
Merge pull request #8907 from idryzhov/isis-batching

Fix ISIS config batching

3 years agoMerge pull request #8463 from opensourcerouting/build-assorted-20210413
Donald Sharp [Fri, 25 Jun 2021 14:32:05 +0000 (10:32 -0400)]
Merge pull request #8463 from opensourcerouting/build-assorted-20210413

build system housekeeping

3 years agoMerge pull request #8923 from kuldeepkash/bgp_convergence_test
Donald Sharp [Fri, 25 Jun 2021 12:18:32 +0000 (08:18 -0400)]
Merge pull request #8923 from kuldeepkash/bgp_convergence_test

tests: Fix generate support bundle issue for test_route_map_topo1

3 years agopathd: coverity msg , frr_weak_random instead rand.
Javier Garcia [Fri, 25 Jun 2021 09:52:02 +0000 (11:52 +0200)]
pathd: coverity msg , frr_weak_random instead rand.

Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
3 years agotests: Fix generate support bundle issue for test_route_map_topo1
Kuldeep Kashyap [Thu, 24 Jun 2021 22:16:27 +0000 (15:16 -0700)]
tests: Fix generate support bundle issue for test_route_map_topo1

1. There was a false condition, which was causing support bundle to be generated.
Issue is fixed.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
3 years agoMerge pull request #8912 from gpnaveen/ospf_asbr_summary
Russ White [Thu, 24 Jun 2021 20:19:22 +0000 (16:19 -0400)]
Merge pull request #8912 from gpnaveen/ospf_asbr_summary

tests: Adding ospfv2 summarisation test cases.

3 years agoMerge pull request #8731 from mjstapp/fix_pw_backups
Stephen Worley [Thu, 24 Jun 2021 16:46:31 +0000 (12:46 -0400)]
Merge pull request #8731 from mjstapp/fix_pw_backups

zebra: Fix pseudowires with backup nexthops

3 years agodoc: mark deprecated ./configure options
David Lamparter [Wed, 23 Jun 2021 13:10:08 +0000 (15:10 +0200)]
doc: mark deprecated ./configure options

These aren't compile-time settings anymore.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agodoc: explain the new `service cputime...` commands
David Lamparter [Thu, 15 Apr 2021 20:46:30 +0000 (22:46 +0200)]
doc: explain the new `service cputime...` commands

These are user tunable, even though most users hopefully don't need to
touch them.

Signed-off-by: David Lamparter <equinox@diac24.net>
3 years agobuild: add `-Werror` to xrelfo log format warnings
David Lamparter [Tue, 13 Apr 2021 18:57:25 +0000 (20:57 +0200)]
build: add `-Werror` to xrelfo log format warnings

Adding a `\n' should now produce a warning.  Controlled by `-Werror` so
if you're doing a dev build and it's warning about some `prefix2str`
that should be converted to `%pFX`, you can turn off `-Werror` to fix it
later like with all other warnings.

Signed-off-by: David Lamparter <equinox@diac24.net>
3 years agolib: try CLOCK_THREAD_CPUTIME_ID
David Lamparter [Tue, 13 Apr 2021 18:49:26 +0000 (20:49 +0200)]
lib: try CLOCK_THREAD_CPUTIME_ID

This might be faster if at some point in the future the Linux vDSO
supports CLOCK_THREAD_CPUTIME_ID without making a syscall.  (Same
applies for other OSes.)

Signed-off-by: David Lamparter <equinox@diac24.net>
3 years agolib: make cputime checks runtime options (v2)
David Lamparter [Tue, 13 Apr 2021 18:38:09 +0000 (20:38 +0200)]
lib: make cputime checks runtime options (v2)

...really no reason to force this into a compile time decision.  The
only point is avoiding the getrusage() syscall, which can easily be a
runtime decision.

[v2: also split cputime & walltime limits]

Signed-off-by: David Lamparter <equinox@diac24.net>
3 years agobuild: remove unused --disable-rusage
David Lamparter [Tue, 13 Apr 2021 17:48:36 +0000 (19:48 +0200)]
build: remove unused --disable-rusage

This option does literally nothing.  Not sure since when, but the value
is not used anywhere at all.

Signed-off-by: David Lamparter <equinox@diac24.net>
3 years agobuild: remove --enable-exampledir
David Lamparter [Tue, 13 Apr 2021 17:44:44 +0000 (19:44 +0200)]
build: remove --enable-exampledir

This is no longer used with the recent config example removal.

Signed-off-by: David Lamparter <equinox@diac24.net>
3 years agoMerge pull request #8337 from donaldsharp/reload_with_routemaps
Mark Stapp [Thu, 24 Jun 2021 12:19:29 +0000 (08:19 -0400)]
Merge pull request #8337 from donaldsharp/reload_with_routemaps

Reload with routemaps

3 years agobgpd: Fix SA warning about freeing an aspath
Mark Stapp [Thu, 24 Jun 2021 11:50:23 +0000 (07:50 -0400)]
bgpd: Fix SA warning about freeing an aspath

Fix coverity warning CID 1505589

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #8800 from donaldsharp/sr_vtysh_fix
Igor Ryzhov [Wed, 23 Jun 2021 21:07:45 +0000 (00:07 +0300)]
Merge pull request #8800 from donaldsharp/sr_vtysh_fix

vtysh: Expose SR node for non pathd use cases

3 years agotests: Adding ospfv2 summarisation test cases.
nguggarigoud [Wed, 23 Jun 2021 12:44:42 +0000 (05:44 -0700)]
tests: Adding ospfv2 summarisation test cases.

Total cases 6.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
3 years agoMerge pull request #8904 from rameshabhinay/ospf6_show
Igor Ryzhov [Wed, 23 Jun 2021 15:35:13 +0000 (18:35 +0300)]
Merge pull request #8904 from rameshabhinay/ospf6_show

ospf6d: Show neighbor displays twice for every neighbor.

3 years agotools: limit bgp route-maps to direct changes only
Donald Sharp [Tue, 23 Mar 2021 12:48:54 +0000 (08:48 -0400)]
tools: limit bgp route-maps to direct changes only

When using frr-reload.py to modify a bgp neighbors route-map
the code was doing this:

a) deleting the previous route-map: `no neighbor XX route-map YY (in|out)`
b) Adding the new route-map back in `neighbor XX route-may ZZ (in|out)`

Now imagine that we have an outgoing route-map that we are changing
and the reload is large because of a large number of lines in frr.conf

Item (a) will happen.  BGP will immediately start sending all local
routes.  At some point in time in the future (b) will be applied.
This of course causes a withdraw but for a short amount of time we
are leaking unintended routes.  This is bad for several reasons
not 1) route churn upstream, 2) we might influence traffic to go the
wrong way. 3) if upstream has a maximum-prefix command the routes
being sent might trip its circuitry and shutdown the peer entirely
not even allowing you to get to (b).

Ticket: #2589685
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #8860 from ton31337/fix/aspath_prepend_default-originate
Donald Sharp [Wed, 23 Jun 2021 14:13:29 +0000 (10:13 -0400)]
Merge pull request #8860 from ton31337/fix/aspath_prepend_default-originate

bgpd: Allow aspath prepending for default-originate with route-maps

3 years agoMerge pull request #8842 from volta-networks/feat_pc_initiated
Olivier Dugeon [Wed, 23 Jun 2021 13:14:01 +0000 (15:14 +0200)]
Merge pull request #8842 from volta-networks/feat_pc_initiated

pathd: Feat pc initiated

3 years agoisisd: fix interface ldp-sync configuration
Igor Ryzhov [Tue, 22 Jun 2021 21:27:55 +0000 (00:27 +0300)]
isisd: fix interface ldp-sync configuration

There are two checks done when configuring ldp-sync on an interface:
- interface is not a loopback
- interface is in the default VRF
Both checks are incorrectly done using the operational data.

The second check can be done using only config data - do that.

The first check can't be done using only configurational data, but it's
not necessary. LDP sync code doesn't operate on loopback interfaces
already. There's no harm in allowing this to be configured.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoisisd: fix instance ldp-sync configuration
Igor Ryzhov [Tue, 22 Jun 2021 21:23:18 +0000 (00:23 +0300)]
isisd: fix instance ldp-sync configuration

Don't rely on operational data to validate that configuration is applied
to the default VRF. The VRF name is stored in the config - use it instead.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoisisd: fix NET NB configuration
Igor Ryzhov [Tue, 22 Jun 2021 21:21:24 +0000 (00:21 +0300)]
isisd: fix NET NB configuration

Don't rely on operational data to check for system ID consistency. This
is purely configurational data thing.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoisisd: fix extra space in the mpls-te config output
Igor Ryzhov [Wed, 23 Jun 2021 12:39:56 +0000 (15:39 +0300)]
isisd: fix extra space in the mpls-te config output

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agovtysh: Expose SR node for non pathd use cases
Donald Sharp [Sat, 5 Jun 2021 16:34:46 +0000 (12:34 -0400)]
vtysh: Expose SR node for non pathd use cases

The SR node is hidden by a `--enable-pathd` configuration option.
But the recent commit of SRv6 uses this node as well.  Let's expose
this node and let things work.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #8853 from ton31337/fix/bgp_dest_lock_unlock
Donald Sharp [Wed, 23 Jun 2021 11:59:32 +0000 (07:59 -0400)]
Merge pull request #8853 from ton31337/fix/bgp_dest_lock_unlock

bgpd: Make sure we don't miss to unlock for bgp_dest before returning

3 years agoMerge pull request #8901 from ton31337/feature/bgp_default_route_originate_match
Donald Sharp [Wed, 23 Jun 2021 11:53:39 +0000 (07:53 -0400)]
Merge pull request #8901 from ton31337/feature/bgp_default_route_originate_match

tests: Add an additional conditional BGP default route advertisement

3 years agoMerge pull request #8899 from idryzhov/ospf6-asbr
Rafael Zalamena [Wed, 23 Jun 2021 10:15:12 +0000 (07:15 -0300)]
Merge pull request #8899 from idryzhov/ospf6-asbr

ospf6 redistribution fixes

3 years agoMerge pull request #8656 from opensourcerouting/xref-5424-prep-2
Donald Sharp [Wed, 23 Jun 2021 10:08:41 +0000 (06:08 -0400)]
Merge pull request #8656 from opensourcerouting/xref-5424-prep-2

lib: preparations for RFC5424 syslog support

3 years agoospf6d: Show neighbor displays twice for every neighbor.
Abhinay Ramesh [Tue, 22 Jun 2021 16:41:25 +0000 (16:41 +0000)]
ospf6d: Show neighbor displays twice for every neighbor.

Problem Statement:
=================
When show ipv6 ospf6 neighbor is executed each neighbor gets
displayed twice.

frr# show ipv6 ospf6 neighbor
Neighbor ID     Pri    DeadTime    State/IfState         Duration I/F[State]
1.1.1.1           1    00:00:39     Full/DR              00:00:10 ens192[BDR]
1.1.1.1           1    00:00:39     Full/DR              00:00:10 ens192[BDR]

RCA:
====
Since ospf6_interface gets added twice to if_list we see multiple
display output.

Fix:
====
add ospf6_interface to if_list only when newly area gets attached
to the interface. If its already added no need to add it again.

Risk:
=====
Low

Tests Executed:
===============
Have tested the defect scenario.

frr# show ipv6 ospf6 neighbor
Neighbor ID     Pri    DeadTime    State/IfState         Duration I/F[State]
1.1.1.1           1    00:00:35     Full/DR              00:36:04 ens192[BDR]
frr#

Signed-off-by: Abhinay Ramesh <rabhinay@vmware.com>
3 years agoMerge pull request #6695 from adharkar/frr-master-gateway_ip
Patrick Ruddy [Wed, 23 Jun 2021 08:23:54 +0000 (09:23 +0100)]
Merge pull request #6695 from adharkar/frr-master-gateway_ip

EVPN route type-5 gateway IP overlay Index

3 years agoospf6d: fix NSSA status update
Igor Ryzhov [Tue, 22 Jun 2021 13:15:29 +0000 (16:15 +0300)]
ospf6d: fix NSSA status update

We should update ASBR status only when the NSSA status is actually changed.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospf6d: fix redistribute configuration
Igor Ryzhov [Tue, 22 Jun 2021 13:12:41 +0000 (16:12 +0300)]
ospf6d: fix redistribute configuration

ospf6_asbr_redistribute_unset must not be called if the redistribution
is not yet configured, because it decrements redistribution counter and
makes it negative in this case.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospf6d: small ospf6_asbr_redistribute_set improvement
Igor Ryzhov [Tue, 22 Jun 2021 13:09:28 +0000 (16:09 +0300)]
ospf6d: small ospf6_asbr_redistribute_set improvement

We always have a pointer to the ospf6 instance when the function is called.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: Make sure we don't miss to unlock for bgp_dest before returning
Donatas Abraitis [Tue, 22 Jun 2021 20:14:47 +0000 (23:14 +0300)]
bgpd: Make sure we don't miss to unlock for bgp_dest before returning

bgp_node_lookup() increases `lock` which is not decreased on return.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #8905 from donaldsharp/isis_argv
Russ White [Tue, 22 Jun 2021 18:22:55 +0000 (14:22 -0400)]
Merge pull request #8905 from donaldsharp/isis_argv

Isis argv

3 years agoMerge pull request #8902 from idryzhov/isis-lsp-for-arg
Quentin Young [Tue, 22 Jun 2021 18:22:44 +0000 (18:22 +0000)]
Merge pull request #8902 from idryzhov/isis-lsp-for-arg

isisd: fix uninitialized variable when searching for LSP

3 years agoisisd: using argv as a string name is categorically wrong
Donald Sharp [Tue, 22 Jun 2021 16:44:24 +0000 (12:44 -0400)]
isisd: using argv as a string name is categorically wrong

We are passing around the system id using the variable name
of `argv`.  Let's name the variable correctly and pass it around
correctly named.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoisisd: already checked for NULL
Donald Sharp [Tue, 22 Jun 2021 16:36:16 +0000 (12:36 -0400)]
isisd: already checked for NULL

in lsp_for_arg we have already checked for NULL and returned
if argv is null.  We do not need to check for it again.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #8878 from idryzhov/fix-ospf6-neighbor-detail
Russ White [Tue, 22 Jun 2021 15:27:17 +0000 (11:27 -0400)]
Merge pull request #8878 from idryzhov/fix-ospf6-neighbor-detail

ospf6d: fix "show ipv6 ospf6 neighbor" command

3 years agoMerge pull request #8725 from pjdruddy/ospfv3_fair_socket
Russ White [Tue, 22 Jun 2021 14:58:33 +0000 (10:58 -0400)]
Merge pull request #8725 from pjdruddy/ospfv3_fair_socket

OSPFv3 socket rework

3 years agoisisd: fix uninitialized variable when searching for LSP
Igor Ryzhov [Tue, 22 Jun 2021 14:53:26 +0000 (17:53 +0300)]
isisd: fix uninitialized variable when searching for LSP

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agotests: Add an additional conditional BGP default route advertisement
Donatas Abraitis [Tue, 22 Jun 2021 13:44:30 +0000 (16:44 +0300)]
tests: Add an additional conditional BGP default route advertisement

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #8820 from anlancs/master-vtysh-hostname
Russ White [Tue, 22 Jun 2021 14:06:05 +0000 (10:06 -0400)]
Merge pull request #8820 from anlancs/master-vtysh-hostname

doc: add a note of hostname/domainname for vtysh

3 years agoMerge pull request #8869 from leonshaw/master
Russ White [Tue, 22 Jun 2021 13:57:06 +0000 (09:57 -0400)]
Merge pull request #8869 from leonshaw/master

bgpd: Force process networks on VRF creation

3 years agoMerge pull request #8891 from idryzhov/no-vrf-interface
Russ White [Tue, 22 Jun 2021 13:55:11 +0000 (09:55 -0400)]
Merge pull request #8891 from idryzhov/no-vrf-interface

lib: remove vrf-interface config when removing the VRF

3 years agoMerge pull request #8557 from rgirada/ospf_type5_fix
Russ White [Tue, 22 Jun 2021 13:45:27 +0000 (09:45 -0400)]
Merge pull request #8557 from rgirada/ospf_type5_fix

ospfd: External lsa handling in opaque capabilities enable/disable

3 years agoMerge pull request #8334 from ranjanyash54/last_dbdesc
Russ White [Tue, 22 Jun 2021 13:38:21 +0000 (09:38 -0400)]
Merge pull request #8334 from ranjanyash54/last_dbdesc

ospf6d: Release last dbdesc packet after router dead interval

3 years agoMerge pull request #8867 from wesleycoakley/pbr-table-range-single-line
Mark Stapp [Tue, 22 Jun 2021 13:12:02 +0000 (09:12 -0400)]
Merge pull request #8867 from wesleycoakley/pbr-table-range-single-line

tools: make frr-reload recognize `pbr table range` lines as single-line contexts

3 years agotests: Check if as-path prepends work with route-maps and default-originate
Donatas Abraitis [Tue, 15 Jun 2021 12:49:24 +0000 (15:49 +0300)]
tests: Check if as-path prepends work with route-maps and default-originate

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Allow aspath prepending for default-originate with route-maps
Donatas Abraitis [Tue, 15 Jun 2021 11:55:17 +0000 (14:55 +0300)]
bgpd: Allow aspath prepending for default-originate with route-maps

The initial idea was to deny prepending and just use _self_.

This patch at least allows prepending aspath with route-maps, but drops
all non-self ASNs in the path.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #8892 from idryzhov/fabric-no-instance
Donald Sharp [Tue, 22 Jun 2021 12:09:05 +0000 (08:09 -0400)]
Merge pull request #8892 from idryzhov/fabric-no-instance

fabricd: fix running config

3 years agopathd: Sanity checks. (4/4)
Javier Garcia [Wed, 9 Jun 2021 07:37:11 +0000 (09:37 +0200)]
pathd: Sanity checks. (4/4)

Co-authored-by: Javier Garcia <javier.garcia@voltanet.io>
Signed-off-by: Sebastien Merle <sebastien@netdef.org>
3 years agopathd: Handle PCInitiated configuration, main thread. (3/4)
Javier Garcia [Fri, 21 May 2021 07:17:22 +0000 (09:17 +0200)]
pathd: Handle PCInitiated configuration, main thread. (3/4)

Co-authored-by: Javier Garcia <javier.garcia@voltanet.io>
Signed-off-by: Sebastien Merle <sebastien@netdef.org>
3 years agopathd: Handle PCInitiated messages, thread controller. (2/4)
Javier Garcia [Fri, 21 May 2021 07:15:52 +0000 (09:15 +0200)]
pathd: Handle PCInitiated messages, thread controller. (2/4)

Co-authored-by: Javier Garcia <javier.garcia@voltanet.io>
Signed-off-by: Sebastien Merle <sebastien@netdef.org>
Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
3 years agopceplib: Extract fields needed for PcInitiated with Cisco pce. (1/4)
Javier Garcia [Fri, 21 May 2021 07:07:41 +0000 (09:07 +0200)]
pceplib: Extract fields needed for PcInitiated with Cisco pce. (1/4)

1.- Unknown/non-standard tlv where cisco sends BSID.
2.- Non-standard Vendor Info object where cisco sends color.

Co-authored-by: Javier Garcia <javier.garcia@voltanet.io>
Signed-off-by: Sebastien Merle <sebastien@netdef.org>
Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
3 years agoospf6d: fix "show ipv6 ospf6 neighbor" command
Igor Ryzhov [Fri, 18 Jun 2021 19:42:49 +0000 (22:42 +0300)]
ospf6d: fix "show ipv6 ospf6 neighbor" command

Simplify the logic and fix processing of "detail" and "drchoice"
arguments.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agofabricd: fix running config
Igor Ryzhov [Mon, 21 Jun 2021 15:12:45 +0000 (18:12 +0300)]
fabricd: fix running config

Daemons should not output warnings into the running config.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agolib: remove vrf-interface config when removing the VRF
Igor Ryzhov [Mon, 21 Jun 2021 15:04:46 +0000 (18:04 +0300)]
lib: remove vrf-interface config when removing the VRF

If we have the following configuration:
```
vrf red
 smth
 exit-vrf
!
interface red vrf red
 smth
```
And we delete the VRF using "no vrf red" command, we end up with:
```
interface red
 smth
```
Interface config is preserved but moved to the default VRF.

This is not an expected behavior. We should remove the interface config
when the VRF is deleted.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospfd: External lsa handling in opaque capabilities enable/disable
rgirada [Sun, 25 Apr 2021 05:40:33 +0000 (22:40 -0700)]
ospfd: External lsa handling in opaque capabilities enable/disable

Description:
When opaque capability disabled/enabled , all the self-originated lsa will be
flushed and it will make the neighbours to renegotiate.
But here, external lsas are not being re-originated after negotiation
Fix:
Refresh/re-originate external lsas(Type-5 and Type-7) explicitly after
re-negotiation.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
3 years agoospf6d: Release last dbdesc packet after router dead interval
Yash Ranjan [Tue, 16 Mar 2021 07:45:23 +0000 (00:45 -0700)]
ospf6d: Release last dbdesc packet after router dead interval

During the database description exchange process, the slave
releases the last dbdesc packet after router_dead_interval.
This was not implemented in the code.
I have written the function ospf6_neighbor_last_dbdesc_release,
which releases the last dbdesc packet after router_dead_interval.
This change was required as per the conformance test 13.11:

In state Full reception of a Database Description packet from
the master after this interval (RouterDeadInterval) will
generate a SeqNumberMismatch neighbor event.

Associated Parameters
  ICMPv6 Packet Listen Time
  ICMPv6 Packet Tolerance Factor
  ICMPv6 Packet Tolerance Time
  OSPFV3 DUT Interface Transmit Delay
  OSPF Reset Adjacencies Timeout
Test Actions
1.
2. 3.
ANVL: Establish full adjacency with DUT for neighbor Rtr-0-A on DIface-0, with DUT as slave.
ANVL: Wait (for <RouterDeadInterval> seconds).
ANVL: Send <OSPF-DD> packet from neighbor Rtr-0-A to DIface-0 con- taining:
• •
I-bit field not set M-bit field not set
MS-bit field set
DD sequence number same as the one last sent by ANVL.

. ANVL: Listen (for upto 2 * <RxmtInterval> seconds) on DIface-0.
5. DUT: Trigger the event SeqNumberMismatch and set the neighbor state for neighbor Rtr-0-A to ExStart.
6. DUT: Send <OSPF-DD> packet.
7. ANVL: Verify that the received <OSPF-DD> packet contains:
• I-bit field set
• M-bit field set
• MS-bit field set.

Test Reference
• RFC 5340, s4.2.1.2 p19 Sending Database Description Packets
  RFC 2328, s10.8 p104 Sending Database Description Packets.

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
3 years agoMerge pull request #8841 from volta-networks/fix_ospf6_bad_seqnum
Donald Sharp [Sat, 19 Jun 2021 16:21:26 +0000 (12:21 -0400)]
Merge pull request #8841 from volta-networks/fix_ospf6_bad_seqnum

ospf6: Drop LSA with bad seqnumber

3 years agoMerge pull request #8868 from ranjanyash54/redistribute_fix
Donald Sharp [Sat, 19 Jun 2021 16:20:04 +0000 (12:20 -0400)]
Merge pull request #8868 from ranjanyash54/redistribute_fix

ospf6d: redistribute command minor fixes

3 years agoMerge pull request #8749 from pjdruddy/bitfield_mtype
Renato Westphal [Sat, 19 Jun 2021 15:16:48 +0000 (12:16 -0300)]
Merge pull request #8749 from pjdruddy/bitfield_mtype

lib: add an MTYPE for bitfields

3 years agoMerge pull request #8822 from dslicenc/frr-reload-mac-acl
Renato Westphal [Sat, 19 Jun 2021 15:16:25 +0000 (12:16 -0300)]
Merge pull request #8822 from dslicenc/frr-reload-mac-acl

tools: add mac access-list context to frr-reload.py

3 years agoMerge pull request #8864 from idryzhov/fix-vtysh-vrf-change
Renato Westphal [Sat, 19 Jun 2021 15:15:40 +0000 (12:15 -0300)]
Merge pull request #8864 from idryzhov/fix-vtysh-vrf-change

lib: fix interface configuration after vrf change

3 years agoMerge pull request #8876 from idryzhov/remove-pure
David Lamparter [Sat, 19 Jun 2021 12:32:43 +0000 (14:32 +0200)]
Merge pull request #8876 from idryzhov/remove-pure

lib: remove pure attribute from functions that modify memory

3 years agobgpd: Force process networks on VRF creation
Xiao Liang [Thu, 17 Jun 2021 04:33:59 +0000 (12:33 +0800)]
bgpd: Force process networks on VRF creation

Force the processing of existing network configurations when VRF is
created, otherwise will be skipped in bgp_static_update().

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
3 years agoMerge pull request #8829 from donaldsharp/last_command
Mark Stapp [Fri, 18 Jun 2021 21:38:44 +0000 (17:38 -0400)]
Merge pull request #8829 from donaldsharp/last_command

zebra: We already store the last command as part of zserv_write

3 years agolib: fix printf format on NetBSD
David Lamparter [Mon, 12 Apr 2021 22:52:55 +0000 (00:52 +0200)]
lib: fix printf format on NetBSD

*sigh*.  It doesn't accept `%m` otherwise.

Signed-off-by: David Lamparter <equinox@diac24.net>
3 years agolib: make a few log symbols accessible
David Lamparter [Sun, 11 Apr 2021 16:23:16 +0000 (18:23 +0200)]
lib: make a few log symbols accessible

Might've made a few things too many `static` there.

Signed-off-by: David Lamparter <equinox@diac24.net>
3 years agolib: save instance number in zlog
David Lamparter [Sun, 11 Apr 2021 02:00:08 +0000 (04:00 +0200)]
lib: save instance number in zlog

Signed-off-by: David Lamparter <equinox@diac24.net>
3 years agolib: cache PID & TID in zlog code
David Lamparter [Sun, 11 Apr 2021 01:59:25 +0000 (03:59 +0200)]
lib: cache PID & TID in zlog code

glibc removed its pid cache a while back, and grabbing this from TLS is
faster than repeatedly calling the kernel...

Also use `intmax_t` which is more appropriate for both PID & TID.

Signed-off-by: David Lamparter <equinox@diac24.net>
3 years agolib: include `\n` in zlog_msg_text()
David Lamparter [Sat, 10 Apr 2021 19:51:48 +0000 (21:51 +0200)]
lib: include `\n` in zlog_msg_text()

Since the file targets append one anyway, save them some extra work.
syslog can use `%.*s` since it's "forced" printf by API anyway.

Signed-off-by: David Lamparter <equinox@diac24.net>
3 years agolib: add RFC3164 logging timestamps
David Lamparter [Thu, 8 Apr 2021 12:28:43 +0000 (14:28 +0200)]
lib: add RFC3164 logging timestamps

This is old-style syslog, used among other things for /dev/log.

Signed-off-by: David Lamparter <equinox@diac24.net>
3 years agolib: use fbuf for zlog_msg_ts()
David Lamparter [Sat, 10 Apr 2021 19:36:50 +0000 (21:36 +0200)]
lib: use fbuf for zlog_msg_ts()

Signed-off-by: David Lamparter <equinox@diac24.net>
3 years agolib: record output argument positions in zlog
David Lamparter [Mon, 22 Mar 2021 12:45:20 +0000 (13:45 +0100)]
lib: record output argument positions in zlog

printfrr() recently acquired the capability to record start/end of
formatting outputs.  Make use of this in the zlog code so logging
targets have access to this information.

(This also records how long the `[XXXXX-XXXXX][EC 9999999]` prefix was
so log targets can choose to skip over it.)

Signed-off-by: David Lamparter <equinox@diac24.net>
3 years agolib: add hook for `show logging` CLI
David Lamparter [Thu, 8 Apr 2021 12:29:18 +0000 (14:29 +0200)]
lib: add hook for `show logging` CLI

... so additional targets can print their state.

Signed-off-by: David Lamparter <equinox@diac24.net>
3 years agolib: de-conflict `log-filter` CLI command
David Lamparter [Thu, 8 Apr 2021 10:57:58 +0000 (12:57 +0200)]
lib: de-conflict `log-filter` CLI command

`log-filter WORD` was giving me a serious headache since it also matches
`log WORD` due to the way the CLI token handling works.  This meant that
a mistyped `log something` command would silently be interpreted as a
filter string, causing me serious headscratching and WTFs until I
figured what was going on.

Remove this UX pitfall so noone else falls into it.  (Since the command
was never saved to config, renaming it shouldn't cause trouble.)

[Also I apparently forgot to update the docs when I transferred this
over to the new zlog bits...]

TODO for a rainy day:  since we collect all the CLI commands anyway, we
should warn somewhere for "2nd level ambiguous" commands like this.

Signed-off-by: David Lamparter <equinox@diac24.net>
3 years agolib: remove pure attribute from functions that modify memory
Igor Ryzhov [Fri, 18 Jun 2021 10:06:13 +0000 (13:06 +0300)]
lib: remove pure attribute from functions that modify memory

Almost all functions currently marked with pure attribute acquire a
route_node lock. By marking them pure we allow compiler to optimize the
code and not call them when it already knows the return value. This is
completely incorrect.

Only two of eleven functions can be marked as pure. And they still won't
be optimized because they are never called from the same function twice.
Let's remove the ext_pure macro completely to reduce the chance of
repeating this mistake in the future.

Fixes #8866, #8809, #8595, #6992.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospf6: Drop LSA with bad seqnumber
lynne [Fri, 11 Jun 2021 14:38:42 +0000 (10:38 -0400)]
ospf6: Drop LSA with bad seqnumber

In RFC 2328 seqnumber 0x80000000 is reserved and not used.   If an LSA
is received with seqnumber the LSA is now dropped and a debug error log
is printed.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
3 years agotools: add mac access-list context to frr-reload.py
Don Slice [Wed, 9 Jun 2021 21:17:21 +0000 (14:17 -0700)]
tools: add mac access-list context to frr-reload.py

Problem reported that frr-reload.py didn't handle the mac access-list
command correctly, causing reloads to fail.  This fix adds the
support for the command as a single line context.

Signed-off-by: Don Slice <dslice@nvidia.com>
3 years agotests: use correct metric type and value for OSPFv3 redistributed routes
Igor Ryzhov [Fri, 18 Jun 2021 13:05:01 +0000 (16:05 +0300)]
tests: use correct metric type and value for OSPFv3 redistributed routes

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8478 from mjstapp/fix_nb_grpc_shutdown
Donald Sharp [Fri, 18 Jun 2021 12:52:44 +0000 (08:52 -0400)]
Merge pull request #8478 from mjstapp/fix_nb_grpc_shutdown

lib: stop grpc pthread at shutdown

3 years agozebra: We already store the last command as part of zserv_write
Donald Sharp [Thu, 10 Jun 2021 15:05:26 +0000 (11:05 -0400)]
zebra: We already store the last command as part of zserv_write

when sending nexthop information.  We do not need to reset the
last_write_cmd since that is taken care of in the send routine.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>