]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
3 years agobgpd: Actually return the group peer
Donald Sharp [Fri, 6 Nov 2020 01:42:03 +0000 (20:42 -0500)]
bgpd: Actually return the group peer

The code is returning the group peer data structure, which
is what is happening but we should not have assignment statements
in this return statement for a `struct peer *` return.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7227 from chiragshah6/yang_dev
Russ White [Thu, 5 Nov 2020 19:32:39 +0000 (14:32 -0500)]
Merge pull request #7227 from chiragshah6/yang_dev

bgpd, yang : neighbor and peer-group config cmds to transactional clis

3 years agoMerge pull request #7137 from kssoman/ospf
Donald Sharp [Thu, 5 Nov 2020 16:57:50 +0000 (11:57 -0500)]
Merge pull request #7137 from kssoman/ospf

ospf6d : Intra area route for connected prefix not installed

3 years agoMerge pull request #7459 from donaldsharp/clang_more_stuff_to_cleanup
Mark Stapp [Thu, 5 Nov 2020 13:25:40 +0000 (08:25 -0500)]
Merge pull request #7459 from donaldsharp/clang_more_stuff_to_cleanup

Clang more stuff to cleanup

3 years agoMerge pull request #7423 from donaldsharp/route_list
Russ White [Thu, 5 Nov 2020 12:29:54 +0000 (07:29 -0500)]
Merge pull request #7423 from donaldsharp/route_list

bgpd: Remove pointer structure from `struct bgp_dest`

3 years agobgpd: Cleanup memory leaks associated with t_router_timer
Donald Sharp [Thu, 5 Nov 2020 02:02:57 +0000 (21:02 -0500)]
bgpd: Cleanup memory leaks associated with t_router_timer

We are allocating temporary memory for information about
what to process in this thread, which is not being cleaned
up on thread cancelling.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7456 from donaldsharp/flowspec_issues
Russ White [Wed, 4 Nov 2020 20:41:35 +0000 (15:41 -0500)]
Merge pull request #7456 from donaldsharp/flowspec_issues

Rules and why they are made to be broken

3 years agobgpd: Remove pointer structure from `struct bgp_dest`
Donald Sharp [Fri, 30 Oct 2020 17:34:30 +0000 (13:34 -0400)]
bgpd: Remove pointer structure from `struct bgp_dest`

The `struct listnode *rt_node` data structure is adding
8 bytes of size to the `struct bgp_dest`.  This is a large
amount of data for a flag we are already setting on each
node for this.  Just set the flag and use that to figure
out who we are doing graceful restart on.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7443 from opensourcerouting/gcc-10-plugin-ice
Donald Sharp [Wed, 4 Nov 2020 19:40:32 +0000 (14:40 -0500)]
Merge pull request #7443 from opensourcerouting/gcc-10-plugin-ice

tools/gcc-frr-format: fix ICE in gcc-10

3 years agozebra: Rework code to make SA happy
Donald Sharp [Wed, 4 Nov 2020 16:48:49 +0000 (11:48 -0500)]
zebra: Rework code to make SA happy

Clan SA was saying:

./zebra/zebra_vty_clippy.c: In function ‘show_route’:
zebra/zebra_vty.c:1775:4: warning: ‘zvrf’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    do_show_ip_route_all(vty, zvrf, afi, !!fib, !!json, tag,
    ^

I do not see a way that zvrf could ever be uninited in the code path
but rearrange the code a tiny bit to make it happier.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoospfd: Cleanup some clang sa issues
Donald Sharp [Wed, 4 Nov 2020 16:47:57 +0000 (11:47 -0500)]
ospfd: Cleanup some clang sa issues

This commit tells the compiler we are intentionally ignoring
the lsa value returned and not doing anything with ret.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Fix up rule encoding to zebra so it works
Donald Sharp [Wed, 4 Nov 2020 14:11:53 +0000 (09:11 -0500)]
bgpd: Fix up rule encoding to zebra so it works

Recent changes to the rule encoding that were made
did not get reflected in bgpd.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agopbrd: Fix memory leak in json output
Donald Sharp [Wed, 4 Nov 2020 14:11:13 +0000 (09:11 -0500)]
pbrd: Fix memory leak in json output

Fix a memory leak in using some pbr json commands.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7447 from donaldsharp/table_stats
Donatas Abraitis [Wed, 4 Nov 2020 06:46:26 +0000 (08:46 +0200)]
Merge pull request #7447 from donaldsharp/table_stats

bgpd: Allow 1 prefix to generate statistics

3 years agoMerge pull request #7274 from donaldsharp/bgp_best_is_a_path
Lou Berger [Tue, 3 Nov 2020 21:06:48 +0000 (16:06 -0500)]
Merge pull request #7274 from donaldsharp/bgp_best_is_a_path

bgpd: allow bestpath to handle mutliple locally-originated paths

3 years agobgpd: Allow 1 prefix to generate statistics
Donald Sharp [Tue, 3 Nov 2020 20:24:03 +0000 (15:24 -0500)]
bgpd: Allow 1 prefix to generate statistics

When generating a config with 1 prefix:

BGP IPv4 Unicast RIB statistics
Total Advertisements          :            0
Total Prefixes                :            0
Average prefix length         :         0.00
Unaggregateable prefixes      :            0
Maximum aggregateable prefixes:            0
BGP Aggregate advertisements  :            0
Address space advertised      :            0
                  % announced :         0.00
                /8 equivalent :         0.00
               /24 equivalent :         0.00

Advertisements with paths     :            0
Longest AS-Path (hops)        :            0
Average AS-Path length (hops) :         0.00
Largest AS-Path (bytes)       :            0
Average AS-Path size (bytes)  :         0.00
Highest public ASN            :            0
eva# show bgp ipv4 uni summ
BGP router identifier 10.10.3.11, local AS number 329 vrf-id 0
BGP table version 1
RIB entries 1, using 192 bytes of memory
Peers 1, using 23 KiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt
192.168.161.131 4      60000        24        27        0    0    0 00:01:05     (Policy)        1

Total number of neighbors 1

We are not displaying it in the statistics data.  This is because FRR is walking the associated
table and comparing the current dest to the top of the tree.  I have no idea why this is
the case as that when you have 1 prefix you only have 1 node in your tree.  Looking at the
code this is the original code that was imported in 2006.  I cannot think of any reason why
FRR needs to exclude this particular node.

Fixed:
eva# show bgp ipv4 uni summ
BGP router identifier 10.10.3.11, local AS number 329 vrf-id 0
BGP table version 1
RIB entries 1, using 192 bytes of memory
Peers 1, using 23 KiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt
192.168.161.131 4      60000        24        27        0    0    0 00:01:05     (Policy)        1

Total number of neighbors 1
eva# show bgp ipv4 statistics
BGP IPv4 Unicast RIB statistics (VRF default)
Total Advertisements          :            1
Total Prefixes                :            1
Average prefix length         :        32.00
Unaggregateable prefixes      :            1
Maximum aggregateable prefixes:            0
BGP Aggregate advertisements  :            0
Address space advertised      :            1
                  % announced :         0.00
                /8 equivalent :         0.00
               /24 equivalent :         0.00

Advertisements with paths     :            1
Longest AS-Path (hops)        :            0
Average AS-Path length (hops) :         0.00
Largest AS-Path (bytes)       :            0
Average AS-Path size (bytes)  :         0.00
Highest public ASN            :            0
eva#

Fixes: #7422
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7438 from donaldsharp/multipath_no_alloc
Lou Berger [Tue, 3 Nov 2020 15:38:03 +0000 (10:38 -0500)]
Merge pull request #7438 from donaldsharp/multipath_no_alloc

bgpd: Multipath is always being allocated

3 years agoMerge pull request #7261 from Niral-Networks/niral_dev_vrf_ospf6
Rafael Zalamena [Tue, 3 Nov 2020 14:59:38 +0000 (11:59 -0300)]
Merge pull request #7261 from Niral-Networks/niral_dev_vrf_ospf6

ospf6d : Transformation changes for ospf6 vrf support.

3 years agoMerge pull request #6795 from rgirada/ospf_db_json
Olivier Dugeon [Tue, 3 Nov 2020 14:42:03 +0000 (15:42 +0100)]
Merge pull request #6795 from rgirada/ospf_db_json

ospfd: json support for ospf database command.

3 years agoMerge pull request #6922 from rgirada/ospf_summarisation
Olivier Dugeon [Tue, 3 Nov 2020 14:34:36 +0000 (15:34 +0100)]
Merge pull request #6922 from rgirada/ospf_summarisation

ospfd: Implementation of ospf external route summarization.

3 years agoMerge pull request #7427 from mjstapp/dplane_intf_info
Russ White [Tue, 3 Nov 2020 12:44:45 +0000 (07:44 -0500)]
Merge pull request #7427 from mjstapp/dplane_intf_info

zebra: add optional extra data about routes' interfaces

3 years agoMerge pull request #7442 from qlyoung/fix-thread-tracepoint-pointer
Russ White [Tue, 3 Nov 2020 12:39:12 +0000 (07:39 -0500)]
Merge pull request #7442 from qlyoung/fix-thread-tracepoint-pointer

lib: fix missed pointer update

3 years agoMerge pull request #7421 from ton31337/fix/default-originate_attributes
Donald Sharp [Tue, 3 Nov 2020 12:16:31 +0000 (07:16 -0500)]
Merge pull request #7421 from ton31337/fix/default-originate_attributes

bgpd: Respect match operations for default-originate, not only prefixes

3 years agoMerge pull request #7440 from pjdruddy/fix_snmp_doc
Donald Sharp [Tue, 3 Nov 2020 00:56:23 +0000 (19:56 -0500)]
Merge pull request #7440 from pjdruddy/fix_snmp_doc

doc: fix code snippet for net-snmp

3 years agotools/gcc-frr-format: fix ICE in gcc-10
David Lamparter [Mon, 2 Nov 2020 23:53:29 +0000 (00:53 +0100)]
tools/gcc-frr-format: fix ICE in gcc-10

gcc-10 has a more strict internal assert for type checks so the plugin
currently causes an Internal Compiler Error.  Fix.

Signed-off-by: David Lamparter <equinox@diac24.net>
3 years agolib: fix missed pointer update
Quentin Young [Mon, 2 Nov 2020 21:22:54 +0000 (16:22 -0500)]
lib: fix missed pointer update

Function argument changed from thread * to thread ** without updating
the corresponding tracepoint.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agodoc: fix code snippet for net-snmp
Pat Ruddy [Mon, 2 Nov 2020 16:47:58 +0000 (16:47 +0000)]
doc: fix code snippet for net-snmp

incorrect formatting in doc

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agoospf6d : Transformation changes for ospf6 vrf support.
harios_niral [Mon, 2 Nov 2020 16:24:21 +0000 (08:24 -0800)]
ospf6d : Transformation changes for ospf6 vrf support.

1. Reviews comments taken care.

Signed-off-by: harios_niral <hari@niralnetworks.com>
3 years agobgpd: Multipath is always being allocated
Donald Sharp [Mon, 2 Nov 2020 15:14:48 +0000 (10:14 -0500)]
bgpd: Multipath is always being allocated

The multipath arrays are always being allocated, irrelevant
if we actually have multipath information for a prefix.

This is because the link bandwidth code was always adding the
data structure.  We should not be allocated multipath information
unless we actually have multipath information

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7425 from sworleys/Fix-Bgp-Dist-Help
Mark Stapp [Mon, 2 Nov 2020 12:54:00 +0000 (07:54 -0500)]
Merge pull request #7425 from sworleys/Fix-Bgp-Dist-Help

bgpd: fix help for ipv6 under distance src command

3 years agoospfd: OSPF external summarisation documentation
rgirada [Sun, 6 Sep 2020 07:21:23 +0000 (00:21 -0700)]
ospfd: OSPF external summarisation documentation

Description:
Documentation for external summarisation feature support.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
3 years agoospfd: OSPF external summarisation debug support
rgirada [Sat, 5 Sep 2020 16:41:04 +0000 (09:41 -0700)]
ospfd: OSPF external summarisation debug support

Description:
Changes to enable/disable debugs for external
LSA sumarisation.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
3 years agoospfd: OSPF external summarisation scenarios
rgirada [Sat, 5 Sep 2020 15:15:51 +0000 (08:15 -0700)]
ospfd: OSPF external summarisation scenarios

Description:
Aggergation handled in the following scenarios.
1. Route update from Zebra.
2. Refresh external LSA.
3. Processing routemap update.
4. Self originated lsa processing.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
3 years agoospfd: OSPF external LSA summarisation show commands
rgirada [Tue, 1 Sep 2020 11:47:13 +0000 (04:47 -0700)]
ospfd: OSPF external LSA summarisation show commands

Description:
The below show command introduced to diplay all configured
summary addresss information along with matching corresponding
external route information.

show ip ospf [vrf <NAME|all>] summary-address [detail] [json]

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
3 years agoospfd: External LSA summarisation config commands.
rgirada [Tue, 1 Sep 2020 07:58:47 +0000 (00:58 -0700)]
ospfd: External LSA summarisation config commands.

Description:
The following config commands introduced for external route
aggregation.

[no] summary-address A.B.C.D/M [tag (1-4294967295)]
[no] summary-address A.B.C.D/M no-advertise
aggregation timer (5-1800)
no aggregation timer

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
3 years agoospfd: ospf summarisation core handlers
rgirada [Sat, 15 Aug 2020 09:55:40 +0000 (02:55 -0700)]
ospfd: ospf summarisation core handlers

Description:
Apis for creating/deleting aggregate routes.
Origination of summary route on behalf of matched external routes.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
3 years agoospfd: Summarisation init/de-init.
rgirada [Sat, 15 Aug 2020 08:27:40 +0000 (01:27 -0700)]
ospfd: Summarisation init/de-init.

Description:
       Summarisation initilisation and de-init apis.
       summary route table will be created as part of initilisation
       at the time of ospf deamon init.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
3 years agoospfd: summarisation specific data structures.
rgirada [Sat, 15 Aug 2020 07:27:25 +0000 (00:27 -0700)]
ospfd: summarisation specific data structures.

Description:
Data structures definitions for summary route.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
3 years agoospfd: json support for ospf database command.
rgirada [Thu, 23 Jul 2020 23:25:04 +0000 (16:25 -0700)]
ospfd: json support for ospf database command.

Description:
Added json support to ospf lsdb command and its subcommands.
Added json to the following sub commands.
show ip ospf  database json
show ip ospf  database router json
show ip ospf  database network json
show ip ospf  database external json
show ip ospf  database summary json
show ip ospf  database asbr-summary json
show ip ospf  database nssa-external json
show ip ospf  databas max-age json
show ip ospf  database self-originate json

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
3 years agoMerge pull request #7429 from opensourcerouting/rpm-subpkgs
Donald Sharp [Sat, 31 Oct 2020 11:08:47 +0000 (07:08 -0400)]
Merge pull request #7429 from opensourcerouting/rpm-subpkgs

RPM Subpackages for RPKI and SNMP

3 years agoospf6d : Transformation changes for ospf6 vrf support.
harios_niral [Thu, 8 Oct 2020 05:38:43 +0000 (22:38 -0700)]
ospf6d : Transformation changes for ospf6 vrf support.

1. All the changes are related to handle ospf6 with different vrf.
2. The dependancy of global ospf6 is removed.

Co-authored-by: Kaushik <kaushik@niralnetworks.com>
Signed-off-by: harios_niral <hari@niralnetworks.com>
3 years agoredhat: Update changelog in frr.spec.in
Martin Winter [Sat, 31 Oct 2020 01:19:18 +0000 (02:19 +0100)]
redhat: Update changelog in frr.spec.in

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agoredhat: Add snmp as a subpackage
Martin Winter [Sat, 31 Oct 2020 01:11:45 +0000 (02:11 +0100)]
redhat: Add snmp as a subpackage

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agoredhat: Move RPKI to subpackage instead of a RPM build option
Martin Winter [Sat, 31 Oct 2020 00:09:30 +0000 (01:09 +0100)]
redhat: Move RPKI to subpackage instead of a RPM build option

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agobgpd: fix help for ipv6 under distance src command
Stephen Worley [Fri, 30 Oct 2020 20:14:40 +0000 (16:14 -0400)]
bgpd: fix help for ipv6 under distance src command

We were missing the help docstring for IPV6 under the
distance src command in for bgp.

```
[root@alfred frr-2]# /usr/lib/frr/bgpd --log stdout --log-level debug
2020/10/30 16:02:26 BGP: Ran out of docstring while parsing '[no] distance (1-255) <A.B.C.D/M | X:X::X:X/M>$prefix [WORD$acl]'
2020/10/30 16:02:26 BGP: Ran out of docstring while parsing '[no] distance (1-255) <A.B.C.D/M | X:X::X:X/M>$prefix [WORD$acl]'
2020/10/30 16:02:26 BGP: Ran out of docstring while parsing '[no] distance (1-255) <A.B.C.D/M | X:X::X:X/M>$prefix [WORD$acl]'
2020/10/30 16:02:26 BGP: Ran out of docstring while parsing '[no] distance (1-255) <A.B.C.D/M | X:X::X:X/M>$prefix [WORD$acl]'
2020/10/30 16:02:26 BGP: Ran out of docstring while parsing '[no] distance (1-255) <A.B.C.D/M | X:X::X:X/M>$prefix [WORD$acl]'
```

Signed-off-by: Stephen Worley <sworley@nvidia.com>
3 years agotests: Add more tests for BGP default-originate command
Donatas Abraitis [Fri, 30 Oct 2020 10:47:44 +0000 (12:47 +0200)]
tests: Add more tests for BGP default-originate command

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Handle route-maps properly for `default-originate route-map` command
Donatas Abraitis [Thu, 29 Oct 2020 19:41:12 +0000 (21:41 +0200)]
bgpd: Handle route-maps properly for `default-originate route-map` command

The problem is that only prefixes were handled and any other `match`
commands were ignored. Let's do not forget them as well.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agozebra: add optional extra data about routes' interfaces
Mark Stapp [Fri, 30 Oct 2020 14:51:54 +0000 (10:51 -0400)]
zebra: add optional extra data about routes' interfaces

Add extra data about the interfaces used in route updates'
nexthops - some consumers of route updates may want additional
data, but dataplane plugins running in the dplane pthread
cannot safely access the normal zebra data structures. Capturing
this info is optional - a plugin must request it (via an api).

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #7418 from donaldsharp/manuall
Mark Stapp [Fri, 30 Oct 2020 12:16:46 +0000 (08:16 -0400)]
Merge pull request #7418 from donaldsharp/manuall

*: spelling fixes

3 years agoMerge pull request #7415 from mjstapp/fix_sa_strlen
Donald Sharp [Fri, 30 Oct 2020 11:21:45 +0000 (07:21 -0400)]
Merge pull request #7415 from mjstapp/fix_sa_strlen

ospfd, zebra: Fix SA warnings

3 years agoMerge pull request #7414 from donaldsharp/32bitflags
Jafar Al-Gharaibeh [Fri, 30 Oct 2020 02:47:15 +0000 (21:47 -0500)]
Merge pull request #7414 from donaldsharp/32bitflags

zebra: Consolidate on 32 bits as the flag size for route flags

3 years agoMerge pull request #7408 from volta-networks/fix_isis_p2p_passive
Donald Sharp [Fri, 30 Oct 2020 00:21:52 +0000 (20:21 -0400)]
Merge pull request #7408 from volta-networks/fix_isis_p2p_passive

isisd: fix segfault with circuit p2p neighbor

3 years ago*: Correct spelling stuff
Donald Sharp [Thu, 29 Oct 2020 20:06:13 +0000 (16:06 -0400)]
*: Correct spelling stuff

Pretty obvious.  WE R SPELL GOOD

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7412 from donaldsharp/ospf6_stuff
Mark Stapp [Thu, 29 Oct 2020 18:57:27 +0000 (14:57 -0400)]
Merge pull request #7412 from donaldsharp/ospf6_stuff

Ospf6 stuff

3 years agoMerge pull request #7413 from donaldsharp/zebra_string
Patrick Ruddy [Thu, 29 Oct 2020 18:45:36 +0000 (18:45 +0000)]
Merge pull request #7413 from donaldsharp/zebra_string

zebra: Don't do expensive string manip if not in debug

3 years agozebra: clean up zebra_protodown_rc_str()
Mark Stapp [Thu, 29 Oct 2020 16:03:25 +0000 (12:03 -0400)]
zebra: clean up zebra_protodown_rc_str()

Clean up api SA warning, use 'const', and replace snprintf+
pointer math with strlcat.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoospfd: clean up SA warning in ospf_finish_final()
Mark Stapp [Thu, 29 Oct 2020 16:02:40 +0000 (12:02 -0400)]
ospfd: clean up SA warning in ospf_finish_final()

Clean up an SA warning.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agozebra: Consolidate on 32 bits as the flag size for route flags
Donald Sharp [Thu, 15 Oct 2020 17:41:30 +0000 (13:41 -0400)]
zebra: Consolidate on 32 bits as the flag size for route flags

When we get a route for installation via any method we should
consolidate on 32 bits as the flag size, since we have
actually more than 8 bits of data to bass around.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Don't do expensive string manip if not in debug
Donald Sharp [Mon, 26 Oct 2020 13:19:18 +0000 (09:19 -0400)]
zebra: Don't do expensive string manip if not in debug

Modify the code to not load up a string that is only used
in debugging unless we are debugging.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoospf6d: Give a bit more data when sendmsg fails
Donald Sharp [Thu, 29 Oct 2020 12:53:43 +0000 (08:53 -0400)]
ospf6d: Give a bit more data when sendmsg fails

When sendmsg fails add a bit more data in hopes we can
figure out what is going wrong.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoospf6d: ifindex should not be a pointer for ospf6_sendmsg
Donald Sharp [Thu, 29 Oct 2020 10:59:42 +0000 (06:59 -0400)]
ospf6d: ifindex should not be a pointer for ospf6_sendmsg

Let's cleanup the ospf6_sendmsg api and not pass in a pointer
to the ifindex to use.  It's an integer.

Also remove the assert(*ifindex);  We never use ifindex of 0

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoospf6d: Clean up ospf6_network.h header
Donald Sharp [Thu, 29 Oct 2020 10:55:04 +0000 (06:55 -0400)]
ospf6d: Clean up ospf6_network.h header

Make it compliant.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoisisd: fix segfault in the circuit p2p/bcast union
Emanuele Di Pascale [Thu, 29 Oct 2020 08:51:27 +0000 (09:51 +0100)]
isisd: fix segfault in the circuit p2p/bcast union

The fields in the broadcast/p2p union struct in an isis circuit are
initialized when the circuit goes up, but currently this step is
skipped if the interface is passive. This can create problems if the
circuit type (referred to as network type in the config) changes from
broadcast to point-to-point. We can end up with the p2p neighbor
pointer pointing at some garbage left by the broadcast struct in the
union, which would then cause a segfault the first time we would
dereference it - for example when building the lsp, or computing the
SPF tree.

compressed backtrace of a possible crash:
 #0  0x0000555555579a9c in lsp_build at frr/isisd/isis_lsp.c:1114
 #1  0x000055555557a516 in lsp_regenerate at frr/isisd/isis_lsp.c:1301
 #2  0x000055555557aa25 in lsp_refresh at frr/isisd/isis_lsp.c:1381
 #3  0x00007ffff7b2622c in thread_call at frr/lib/thread.c:1549
 #4  0x00007ffff7ad6df4 in frr_run at frr/lib/libfrr.c:1098
 #5  0x000055555556b67f in main at frr/isisd/isis_main.c:272

isis_lsp.c:
1112 case CIRCUIT_T_P2P: {
1113 struct isis_adjacency *nei = circuit->u.p2p.neighbor;
1114 if (nei && nei->adj_state == ISIS_ADJ_UP

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
3 years agoMerge pull request #7045 from mjstapp/fix_signals
Donald Sharp [Wed, 28 Oct 2020 23:29:29 +0000 (19:29 -0400)]
Merge pull request #7045 from mjstapp/fix_signals

lib: Resolve signal handling race in event loop

3 years agolib: avoid signal-handling race with event loop poll call
Mark Stapp [Mon, 21 Sep 2020 19:57:59 +0000 (15:57 -0400)]
lib: avoid signal-handling race with event loop poll call

Manage the main pthread's signal mask to avoid a signal-handling
race. Before entering poll, check for pending signals that the
application needs to handle. Use ppoll() to re-enable those
signals during the poll call.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agolib: add debug output for signal mask
Mark Stapp [Mon, 21 Sep 2020 20:02:06 +0000 (16:02 -0400)]
lib: add debug output for signal mask

Add an api that debugs the signals in a sigset.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #7378 from donaldsharp/pbr_ifp_leak
Jafar Al-Gharaibeh [Wed, 28 Oct 2020 18:57:11 +0000 (13:57 -0500)]
Merge pull request #7378 from donaldsharp/pbr_ifp_leak

pbrd: Fix memory leak

3 years agoMerge pull request #7396 from AnuradhaKaruppiah/es-docs
Russ White [Wed, 28 Oct 2020 17:52:52 +0000 (13:52 -0400)]
Merge pull request #7396 from AnuradhaKaruppiah/es-docs

doc: Add documentation for EVPN Multihoming

3 years agoMerge pull request #7371 from AnuradhaKaruppiah/mh-uplink-tracking-1
Russ White [Wed, 28 Oct 2020 16:13:57 +0000 (12:13 -0400)]
Merge pull request #7371 from AnuradhaKaruppiah/mh-uplink-tracking-1

evpn-mh: uplink tracking and startup delay

3 years agoMerge pull request #7301 from idryzhov/ospf-fixes
Santosh P K [Wed, 28 Oct 2020 14:56:02 +0000 (20:26 +0530)]
Merge pull request #7301 from idryzhov/ospf-fixes

many ospfd fixes

3 years agoMerge pull request #7394 from donaldsharp/isis_uninited
Olivier Dugeon [Wed, 28 Oct 2020 08:11:53 +0000 (09:11 +0100)]
Merge pull request #7394 from donaldsharp/isis_uninited

isisd: Fix usage of uninited memory

3 years agoMerge pull request #7397 from donaldsharp/bgp_ecomm_leak
Donatas Abraitis [Wed, 28 Oct 2020 04:52:34 +0000 (06:52 +0200)]
Merge pull request #7397 from donaldsharp/bgp_ecomm_leak

bgpd: Prevent ecomm memory leak

3 years agoMerge pull request #7366 from eololab/add-disable-rpath-option-in-configure
Donald Sharp [Wed, 28 Oct 2020 00:20:24 +0000 (20:20 -0400)]
Merge pull request #7366 from eololab/add-disable-rpath-option-in-configure

build: add --disable-rpath option in configure

3 years agoMerge pull request #7398 from pjdruddy/fix-evpn-show-interface-test
Donald Sharp [Wed, 28 Oct 2020 00:08:10 +0000 (20:08 -0400)]
Merge pull request #7398 from pjdruddy/fix-evpn-show-interface-test

tests: do not rely on fixed indices in show output

3 years agoMerge pull request #7352 from mjstapp/fix_rt_netlink_indent
Donald Sharp [Wed, 28 Oct 2020 00:07:15 +0000 (20:07 -0400)]
Merge pull request #7352 from mjstapp/fix_rt_netlink_indent

zebra: fix strange indentation

3 years agoMerge pull request #7395 from donaldsharp/isis_rv_leak
Mark Stapp [Tue, 27 Oct 2020 20:26:09 +0000 (16:26 -0400)]
Merge pull request #7395 from donaldsharp/isis_rv_leak

isisd: Fix memory leak in copy_tlv_router_cap

3 years agotests: do not rely on fixed indices in show output
Pat Ruddy [Tue, 27 Oct 2020 19:25:55 +0000 (19:25 +0000)]
tests: do not rely on fixed indices in show output

Make tests more robust to changing show outputs by searching for
item of interest rather than using a fixed index.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agobgpd: Prevent ecomm memory leak
Donald Sharp [Tue, 27 Oct 2020 19:16:32 +0000 (15:16 -0400)]
bgpd: Prevent ecomm memory leak

There are some situations where we create a ecommunity for
comparing to internal state when we are deleting, but in the
failure cases we would not free up the created memory.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: default originate transactional callbacks
Chirag Shah [Sun, 25 Oct 2020 18:04:32 +0000 (11:04 -0700)]
bgpd: default originate transactional callbacks

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 years agobgpd: shorten names for default originate nb callbacks
Chirag Shah [Sun, 25 Oct 2020 00:49:46 +0000 (17:49 -0700)]
bgpd: shorten names for default originate nb callbacks

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 years agobgpd: convert neighbor peer config to transactional
Chirag Shah [Sat, 24 Oct 2020 05:42:00 +0000 (22:42 -0700)]
bgpd: convert neighbor peer config to transactional

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 years agobgpd: convert max prefix clis to transactional
Chirag Shah [Thu, 22 Oct 2020 20:43:14 +0000 (13:43 -0700)]
bgpd: convert max prefix clis to transactional

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 years ago*: shorten name of prefix-limit options
Chirag Shah [Wed, 21 Oct 2020 05:35:48 +0000 (22:35 -0700)]
*: shorten name of prefix-limit options

shorten prefix-limit's option name in yang model.
change restart timer to uint16.
Stubbed northbound callbacks with above changes.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 years agobgpd: neighbor peergrp config to transactional cli
Chirag Shah [Wed, 16 Sep 2020 04:56:10 +0000 (21:56 -0700)]
bgpd: neighbor peergrp config to transactional cli

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 years agolib: add flowspec safi to identitiy ref parsing
Chirag Shah [Tue, 29 Sep 2020 19:25:01 +0000 (12:25 -0700)]
lib: add flowspec safi to identitiy ref parsing

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 years agodoc: Add documentation for EVPN Multihoming
Anuradha Karuppiah [Tue, 27 Oct 2020 16:51:31 +0000 (09:51 -0700)]
doc: Add documentation for EVPN Multihoming

Added description and config commands for the various sub-features
introduced as a part of EVPN Multihoming.

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
3 years agoisisd: Fix memory leak in copy_tlv_router_cap
Donald Sharp [Tue, 27 Oct 2020 16:40:46 +0000 (12:40 -0400)]
isisd: Fix memory leak in copy_tlv_router_cap

There exists a code path where we would allocate memory
then test a variable and then immediately return NULL.
Prevent memory from leaking in this situation.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: add a topotest to validate uplink tracking
Anuradha Karuppiah [Thu, 22 Oct 2020 19:04:32 +0000 (12:04 -0700)]
tests: add a topotest to validate uplink tracking

When all the uplinks are disabled the access ports used for multihoming
are error-disabled/protodowned.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agotopotests: bgp-evpn-mh: configure uplinks and change the startup-delay
Anuradha Karuppiah [Wed, 23 Sep 2020 20:15:57 +0000 (13:15 -0700)]
topotests: bgp-evpn-mh: configure uplinks and change the startup-delay

1. The default startup-delay for multihomed devices is three minutes. While
that is necessary/reasonable for a real network it is not needed for a
test env. Lower the startup-delay to 1s to keep the test run time low.
2. Configure uplinks for mh uplink-tracking

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: uplink tracking and startup delay for EVPN-MH
Anuradha Karuppiah [Sat, 9 May 2020 02:11:13 +0000 (19:11 -0700)]
zebra: uplink tracking and startup delay for EVPN-MH

Local ethernet segments are held in a protodown or error-disabled state
if access to the VxLAN overlay is not ready -
1. When FRR comes up the local-ESs/access-port are kept protodown
for the startup-delay duration. During this time the underlay and
EVPN routes via it are expected to converge.
2. When all the uplinks/core-links attached to the underlay go down
the access-ports are similarly protodowned.

The ES-bond protodown state is propagated to each ES-bond member
and programmed in the dataplane/kernel (per-bond-member).

Configuring uplinks -
vtysh -c "conf t" vtysh -c "interface swp4" vtysh -c "evpn mh uplink"

Configuring startup delay -
vtysh -c "conf t" vtysh -c "evpn mh startup-delay 100"

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
EVPN protodown display -
========================
root@torm-11:mgmt:~# vtysh -c "show evpn"
L2 VNIs: 10
L3 VNIs: 3
Advertise gateway mac-ip: No
Advertise svi mac-ip: No
Duplicate address detection: Disable
  Detection max-moves 5, time 180
EVPN MH:
  mac-holdtime: 60s, neigh-holdtime: 60s
  startup-delay: 180s, start-delay-timer: 00:01:14 <<<<<<<<<<<<
  uplink-cfg-cnt: 4, uplink-active-cnt: 4
  protodown: startup-delay <<<<<<<<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
ES-bond protodown display -
===========================
root@torm-11:mgmt:~# vtysh -c "show interface hostbond1"
Interface hostbond1 is up, line protocol is down
  Link ups:       0    last: (never)
  Link downs:     1    last: 2020/04/26 20:38:03.53
  PTM status: disabled
  vrf: default
  OS Description: Local Node/s torm-11 and Ports swp5 <==> Remote  Node/s hostd-11 and Ports swp1
  index 58 metric 0 mtu 9152 speed 4294967295
  flags: <UP,BROADCAST,MULTICAST>
  Type: Ethernet
  HWaddr: 00:02:00:00:00:35
  Interface Type bond
  Master interface: bridge
  EVPN-MH: ES id 1 ES sysmac 00:00:00:00:01:11
  protodown: off rc: startup-delay  <<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
ES-bond member protodown display -
==================================
root@torm-11:mgmt:~# vtysh -c "show interface swp5"
Interface swp5 is up, line protocol is down
  Link ups:       0    last: (never)
  Link downs:     3    last: 2020/04/26 20:38:03.52
  PTM status: disabled
  vrf: default
  index 7 metric 0 mtu 9152 speed 10000
  flags: <UP,BROADCAST,MULTICAST>
  Type: Ethernet
  HWaddr: 00:02:00:00:00:35
  Interface Type Other
  Master interface: hostbond1
  protodown: on rc: startup-delay <<<<<<<<<<<<<<<<
root@torm-11:mgmt:~#
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agoMerge pull request #7158 from AnuradhaKaruppiah/mh-df-election
Patrick Ruddy [Tue, 27 Oct 2020 16:09:45 +0000 (16:09 +0000)]
Merge pull request #7158 from AnuradhaKaruppiah/mh-df-election

evpn-mh: support for DF election

3 years agozebra: fix strange indentation
Mark Stapp [Tue, 20 Oct 2020 18:04:48 +0000 (14:04 -0400)]
zebra: fix strange indentation

Fix some odd indentation in rt_netlink.c - merge damage, maybe?

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #7381 from sworleys/NHG-Show-Proto-Filter
Mark Stapp [Tue, 27 Oct 2020 15:33:00 +0000 (11:33 -0400)]
Merge pull request #7381 from sworleys/NHG-Show-Proto-Filter

zebra: add type specifier to show nexthop-group

3 years agoMerge pull request #7390 from donaldsharp/evpn_uptime
Russ White [Tue, 27 Oct 2020 15:32:17 +0000 (11:32 -0400)]
Merge pull request #7390 from donaldsharp/evpn_uptime

Evpn uptime

3 years agoMerge pull request #7370 from eololab/add-missing-daemon-in-watchfrr-conf-file
Donald Sharp [Tue, 27 Oct 2020 15:29:26 +0000 (11:29 -0400)]
Merge pull request #7370 from eololab/add-missing-daemon-in-watchfrr-conf-file

tools: add staticd line in daemon config file

3 years agoMerge pull request #7329 from idryzhov/fix-ip-route-table
Stephen Worley [Tue, 27 Oct 2020 15:27:39 +0000 (11:27 -0400)]
Merge pull request #7329 from idryzhov/fix-ip-route-table

staticd: fix checks for table param in "ip route" commands

3 years agoMerge pull request #7189 from maduri111/bgpd-conditional-adv
Rafael Zalamena [Tue, 27 Oct 2020 15:24:24 +0000 (12:24 -0300)]
Merge pull request #7189 from maduri111/bgpd-conditional-adv

bgpd: conditional advertisement

3 years agoMerge pull request #7173 from ckishimo/force
Donald Sharp [Tue, 27 Oct 2020 15:22:23 +0000 (11:22 -0400)]
Merge pull request #7173 from ckishimo/force

ospfd: fix lsa type-7 continuously refreshed

3 years agoMerge pull request #7026 from chiragshah6/yang_nb5
Donald Sharp [Tue, 27 Oct 2020 15:18:43 +0000 (11:18 -0400)]
Merge pull request #7026 from chiragshah6/yang_nb5

*: Convert bgp afi-safis configurations to transactional clis

3 years agoMerge pull request #7341 from kssoman/nssa_fix
Olivier Dugeon [Tue, 27 Oct 2020 14:30:31 +0000 (15:30 +0100)]
Merge pull request #7341 from kssoman/nssa_fix

ospfd: External LSA not flushed when area is configured as NSSA