]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
4 years agostaticd: fixed memory leak on shudown 7375/head
vdhingra [Fri, 23 Oct 2020 12:09:24 +0000 (05:09 -0700)]
staticd: fixed memory leak on shudown

When shutdown triggered, info pointer pointing to
static_route_info was not getting released for
route_table and srcdest_table.

Signed-off-by: vishaldhingra <vdhingra@vmware.com>
4 years agoMerge pull request #7372 from mjstapp/fix_ntoa_ripd
Donald Sharp [Fri, 23 Oct 2020 00:56:18 +0000 (20:56 -0400)]
Merge pull request #7372 from mjstapp/fix_ntoa_ripd

ripd, staticd, isisd, babeld: replace inet_ntoa

4 years agoMerge pull request #7367 from mjstapp/fix_ntoa_ldpd
Donald Sharp [Thu, 22 Oct 2020 22:40:15 +0000 (18:40 -0400)]
Merge pull request #7367 from mjstapp/fix_ntoa_ldpd

ldpd: replace inet_ntoa

4 years agoMerge pull request #7358 from mjstapp/fix_ntoa
Donald Sharp [Thu, 22 Oct 2020 22:39:04 +0000 (18:39 -0400)]
Merge pull request #7358 from mjstapp/fix_ntoa

ospfd, zebra: Replace use of inet_ntoa

4 years agoMerge pull request #7340 from ton31337/fix/inet_ntoa_to_pI4_lib
Donald Sharp [Thu, 22 Oct 2020 22:34:03 +0000 (18:34 -0400)]
Merge pull request #7340 from ton31337/fix/inet_ntoa_to_pI4_lib

lib: Convert inet_ntoa to %pI4

4 years agoisisd: replace inet_ntoa 7372/head
Mark Stapp [Thu, 22 Oct 2020 18:30:34 +0000 (14:30 -0400)]
isisd: replace inet_ntoa

Replace use of inet_ntoa, using pI4

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agobabeld: replace inet_ntoa
Mark Stapp [Thu, 22 Oct 2020 18:27:38 +0000 (14:27 -0400)]
babeld: replace inet_ntoa

Replace use of inet_ntoa, using pI4, pFX, or inet_pton.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agostaticd: replace inet_ntoa
Mark Stapp [Thu, 22 Oct 2020 18:19:10 +0000 (14:19 -0400)]
staticd: replace inet_ntoa

Replace inet_ntoa with pI4

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoripd: replace inet_ntoa
Mark Stapp [Thu, 22 Oct 2020 18:16:33 +0000 (14:16 -0400)]
ripd: replace inet_ntoa

Replace all uses of inet_ntoa, using pI4, pFX, or inet_pton.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoldpd: replace inet_ntoa 7367/head
Mark Stapp [Thu, 22 Oct 2020 14:46:14 +0000 (10:46 -0400)]
ldpd: replace inet_ntoa

Replace all use of inet_ntoa; use pI4 or inet_ntop instead.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #7369 from eololab/fix-bgp-strings-in-vtsh
Donald Sharp [Thu, 22 Oct 2020 18:41:42 +0000 (14:41 -0400)]
Merge pull request #7369 from eololab/fix-bgp-strings-in-vtsh

bgpd: fix information strings for vtysh

4 years agoMerge pull request #7302 from donaldsharp/eigrp_neighbor_warning
Renato Westphal [Thu, 22 Oct 2020 17:50:54 +0000 (14:50 -0300)]
Merge pull request #7302 from donaldsharp/eigrp_neighbor_warning

eigrpd: Tone down warning when command is not implemented yet

4 years agoospfclient: replace inet_ntoa 7358/head
Mark Stapp [Thu, 22 Oct 2020 17:41:51 +0000 (13:41 -0400)]
ospfclient: replace inet_ntoa

Replace all use of inet_ntoa; use pI4 (and printfrr).

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agozebra: replace inet_ntoa
Mark Stapp [Wed, 21 Oct 2020 17:57:06 +0000 (13:57 -0400)]
zebra: replace inet_ntoa

Stop using inet_ntoa - use %pI4 or inet_ntop instead

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoospfd: replace inet_ntoa
Mark Stapp [Wed, 21 Oct 2020 17:56:26 +0000 (13:56 -0400)]
ospfd: replace inet_ntoa

Stop using inet_ntoa, use %pI4 etc or inet_ntop instead

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agobgpd: fix information strings for vtysh 7369/head
Emanuele Bovisio [Thu, 22 Oct 2020 14:46:47 +0000 (16:46 +0200)]
bgpd: fix information strings for vtysh

set correct information strings for vtysh.

Signed-off-by: Emanuele Bovisio <emanuele.bovisio@eolo.it>
4 years agoeigrpd: Tone down warning when command is not implemented yet 7302/head
Donald Sharp [Wed, 14 Oct 2020 11:23:02 +0000 (07:23 -0400)]
eigrpd: Tone down warning when command is not implemented yet

Currently eigrp has a bunch of commands that are not fully
implemented yet.  Tone down the yang code change of making
these in your face errors to zlog_warns, so the end-user
can not be freaked out by the message.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agolib: Convert inet_ntoa to %pI4 7340/head
Donatas Abraitis [Sun, 18 Oct 2020 11:21:26 +0000 (14:21 +0300)]
lib: Convert inet_ntoa to %pI4

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #7343 from ton31337/fix/prefix2str_to_pFX
Donald Sharp [Thu, 22 Oct 2020 12:07:57 +0000 (08:07 -0400)]
Merge pull request #7343 from ton31337/fix/prefix2str_to_pFX

:* Convert prefix2str to %pFX

4 years ago:* Convert prefix2str to %pFX 7343/head
Donatas Abraitis [Sun, 18 Oct 2020 11:33:54 +0000 (14:33 +0300)]
:* Convert prefix2str to %pFX

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #7360 from donaldsharp/eigrp_printing
Donatas Abraitis [Thu, 22 Oct 2020 05:52:13 +0000 (08:52 +0300)]
Merge pull request #7360 from donaldsharp/eigrp_printing

eigrpd: Replace inet_ntoa with %pI4

4 years agoMerge pull request #7337 from donaldsharp/bgp_process_workqueue
Russ White [Wed, 21 Oct 2020 23:02:19 +0000 (19:02 -0400)]
Merge pull request #7337 from donaldsharp/bgp_process_workqueue

bgpd: Make the process_queue per bgp process

4 years agoeigrpd: Replace inet_ntoa with %pI4 7360/head
Donald Sharp [Wed, 21 Oct 2020 22:55:09 +0000 (18:55 -0400)]
eigrpd: Replace inet_ntoa with %pI4

Search and destroy the inet_ntoa usage in eigrp

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agobgpd: Make the process_queue per bgp process 7337/head
Donald Sharp [Sat, 17 Oct 2020 13:43:14 +0000 (09:43 -0400)]
bgpd: Make the process_queue per bgp process

We currently have a global process queue for handling route
updates in bgp.  This is fine, in general, except there are
places and times where we plug the queue for no new work
during certain peer states of bgp update delay.  If we
happen to be processing multiple bgp instances on startup
why do we want to stop processing in vrf A when vrf B
is in a bit of a pickle?

Also this separation will allow us to start forward thinking
about how to fully integrate pthreads into route processing
in bgp.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7353 from AnuradhaKaruppiah/mh-cleanup-fix-1
Donatas Abraitis [Wed, 21 Oct 2020 19:06:36 +0000 (22:06 +0300)]
Merge pull request #7353 from AnuradhaKaruppiah/mh-cleanup-fix-1

bgpd: fix crash in the MH cleanup handling

4 years agoMerge pull request #7350 from qlyoung/improve-bug-report-template
Mark Stapp [Wed, 21 Oct 2020 17:52:41 +0000 (13:52 -0400)]
Merge pull request #7350 from qlyoung/improve-bug-report-template

.github: improve bug report template

4 years agobgpd: fix crash in the MH cleanup handling 7353/head
Anuradha Karuppiah [Tue, 20 Oct 2020 16:26:51 +0000 (09:26 -0700)]
bgpd: fix crash in the MH cleanup handling

The MH datastructures were being released before the paths that were
referencing them. Fix is to do the MH cleanup last.

The MH finish function has also been stripped down to only do a
datastructure cleanup i.e. avoid sending route updates etc.

Ticket: 31376

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agoMerge pull request #7276 from donaldsharp/speedup_isis_topotests
Martin Winter [Wed, 21 Oct 2020 11:30:51 +0000 (13:30 +0200)]
Merge pull request #7276 from donaldsharp/speedup_isis_topotests

tests: add `lsp-gen-interval 2` to isis configuration

4 years agoMerge pull request #7356 from sworleys/Revert-NHG-Dependents
Donatas Abraitis [Wed, 21 Oct 2020 03:57:57 +0000 (06:57 +0300)]
Merge pull request #7356 from sworleys/Revert-NHG-Dependents

Revert "zebra: fix NHE dependents backpointer relationship"

4 years agoRevert "zebra: fix NHE dependents backpointer relationship" 7356/head
Stephen Worley [Tue, 20 Oct 2020 21:11:35 +0000 (17:11 -0400)]
Revert "zebra: fix NHE dependents backpointer relationship"

This reverts commit f9f9466e04ae9625d8bd8dd3346a221e6430b231.

4 years ago.github: improve bug report template 7350/head
Quentin Young [Tue, 20 Oct 2020 15:42:03 +0000 (11:42 -0400)]
.github: improve bug report template

- Enclose template help text in HTML comments so that it does not show
up in issues
- Add more help text explaining what is requested
- Yell to increase visibility

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agoMerge pull request #7348 from mjstapp/fix_router_id_lists
Donald Sharp [Tue, 20 Oct 2020 19:53:52 +0000 (15:53 -0400)]
Merge pull request #7348 from mjstapp/fix_router_id_lists

zebra: clean up all router id lists

4 years agoMerge pull request #7206 from ckishimo/fix7086
Russ White [Tue, 20 Oct 2020 13:28:13 +0000 (09:28 -0400)]
Merge pull request #7206 from ckishimo/fix7086

ospfd: flush type 5 when type 7 is removed

4 years agoMerge pull request #7323 from ton31337/fix/inet_ntoa_to_pFX_master
Donald Sharp [Tue, 20 Oct 2020 13:10:24 +0000 (09:10 -0400)]
Merge pull request #7323 from ton31337/fix/inet_ntoa_to_pFX_master

bgpd: Convert inet_ntoa to %pI4

4 years agoMerge pull request #7311 from donaldsharp/table_lock_count
Donatas Abraitis [Tue, 20 Oct 2020 13:04:15 +0000 (16:04 +0300)]
Merge pull request #7311 from donaldsharp/table_lock_count

Abstract rn->lock accessing and cleanup usage to %pFX and %pRN

4 years agozebra: clean up all router id lists 7348/head
Mark Stapp [Tue, 20 Oct 2020 12:48:12 +0000 (08:48 -0400)]
zebra: clean up all router id lists

Clean up the ipv6 router-id lists associated with a zvrf - these
were being leaked.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #7289 from sworleys/NHG-Crash-Start
Mark Stapp [Tue, 20 Oct 2020 12:41:36 +0000 (08:41 -0400)]
Merge pull request #7289 from sworleys/NHG-Crash-Start

zebra: a couple NHG fixes

4 years agoMerge pull request #7344 from sworleys/Show-IP-Ro
Russ White [Tue, 20 Oct 2020 11:31:24 +0000 (07:31 -0400)]
Merge pull request #7344 from sworleys/Show-IP-Ro

zebra: add alias for "show ip/ipv6 ro"

4 years agoMerge pull request #7346 from opensourcerouting/leafref-circular-chain
Russ White [Tue, 20 Oct 2020 11:22:39 +0000 (07:22 -0400)]
Merge pull request #7346 from opensourcerouting/leafref-circular-chain

yang: fix circular chain of leafrefs

4 years agoMerge pull request #7300 from sworleys/EVPN-RType-NUMs
Patrick Ruddy [Tue, 20 Oct 2020 10:05:31 +0000 (11:05 +0100)]
Merge pull request #7300 from sworleys/EVPN-RType-NUMs

lib,bgpd: more evpn route-type numerical command versions

4 years agoyang: fix circular chain of leafrefs 7346/head
Renato Westphal [Tue, 20 Oct 2020 02:46:19 +0000 (23:46 -0300)]
yang: fix circular chain of leafrefs

Fix the following libyang error when trying to load the "frr-nexthop"
module explicitly (e.g. using the 'gen_northbound_callbacks' tool):

libyang: A circular chain of leafrefs detected. (/frr-nexthop:frr-nexthop-group/nexthop-groups/name)
libyang: Invalid value "frr-nexthop-grouping" of "uses". (/frr-nexthop:frr-nexthop-group/frr-nexthop-grouping)
libyang: Copying data from grouping failed. (/frr-nexthop:frr-nexthop-group/frr-nexthop-grouping)
libyang: Module "frr-nexthop" parsing failed.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agozebra: add alias for "show ip/ipv6 ro" 7344/head
Stephen Worley [Mon, 19 Oct 2020 18:08:18 +0000 (14:08 -0400)]
zebra: add alias for "show ip/ipv6 ro"

Add an alias so people can still type `show ip ro`.

It became ambigious in a recent release.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: fix NHE dependents backpointer relationship 7289/head
Stephen Worley [Mon, 12 Oct 2020 21:39:19 +0000 (17:39 -0400)]
zebra: fix NHE dependents backpointer relationship

Apparantly the dependents backpointer trees for singletons
got broken at some point and we never noticed. There is
not really any code making use of this right now so not
suprising but let's go ahead and fix it for zebra and proto
NHGs.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agoMerge pull request #7333 from mjstapp/fix_multi_connected
Donald Sharp [Sun, 18 Oct 2020 12:29:19 +0000 (08:29 -0400)]
Merge pull request #7333 from mjstapp/fix_multi_connected

zebra: support multiple connected subnets on an interface

4 years agobgpd: Convert inet_ntoa to %pI4/inet_ntop 7323/head
Donatas Abraitis [Thu, 15 Oct 2020 19:33:09 +0000 (22:33 +0300)]
bgpd: Convert inet_ntoa to %pI4/inet_ntop

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #7267 from donaldsharp/plist_relaxer
Donatas Abraitis [Sun, 18 Oct 2020 06:30:58 +0000 (09:30 +0300)]
Merge pull request #7267 from donaldsharp/plist_relaxer

lib: Relax usage of `ip prefix-list A.B.C.D/M ge Y`

4 years agoospf6d: Convert to using %pFX 7311/head
Donald Sharp [Wed, 14 Oct 2020 17:17:36 +0000 (13:17 -0400)]
ospf6d: Convert to using %pFX

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoospfd: Convert to using %pFX
Donald Sharp [Wed, 14 Oct 2020 17:17:14 +0000 (13:17 -0400)]
ospfd: Convert to using %pFX

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoripd: Convert to using %pFX
Donald Sharp [Wed, 14 Oct 2020 17:16:46 +0000 (13:16 -0400)]
ripd: Convert to using %pFX

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoripngd: Convert to using %pFX
Donald Sharp [Wed, 14 Oct 2020 17:16:23 +0000 (13:16 -0400)]
ripngd: Convert to using %pFX

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agolib: Convert usage of strings to %pFX and %pRN
Donald Sharp [Wed, 14 Oct 2020 16:57:14 +0000 (12:57 -0400)]
lib: Convert usage of strings to %pFX and %pRN

Convert over to using the %pFX and %pRN modifiers
to output strings to allow us to consolidate on
one standard for printing prefixes.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years ago*: Create/Use accessor functions for lock count
Donald Sharp [Wed, 14 Oct 2020 16:44:23 +0000 (12:44 -0400)]
*: Create/Use accessor functions for lock count

Create appropriate accessor functions for the rn->lock
data.  We should be accessing this data through accessor
functions since it is private data to the data structure.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agolib: Relax usage of `ip prefix-list A.B.C.D/M ge Y` 7267/head
Donald Sharp [Fri, 9 Oct 2020 00:36:22 +0000 (20:36 -0400)]
lib: Relax usage of `ip prefix-list A.B.C.D/M ge Y`

Currently the prefix length M must be less than Y.
Relax this restriction to allow M to be less than or equal
to Y.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7336 from donaldsharp/sharp_one_one
Donatas Abraitis [Sat, 17 Oct 2020 17:31:22 +0000 (20:31 +0300)]
Merge pull request #7336 from donaldsharp/sharp_one_one

sharpd: Fix nexthop group name collision

4 years agoMerge pull request #7330 from donaldsharp/zebra_use_after_free
Donatas Abraitis [Sat, 17 Oct 2020 17:24:11 +0000 (20:24 +0300)]
Merge pull request #7330 from donaldsharp/zebra_use_after_free

zebra: Fix use after free in debug path

4 years agoMerge pull request #7306 from donaldsharp/bgp_dest_print
Donatas Abraitis [Sat, 17 Oct 2020 17:21:52 +0000 (20:21 +0300)]
Merge pull request #7306 from donaldsharp/bgp_dest_print

Bgp dest print

4 years agoMerge pull request #7322 from Orange-OpenSource/ospf-sr
Donald Sharp [Sat, 17 Oct 2020 17:17:50 +0000 (13:17 -0400)]
Merge pull request #7322 from Orange-OpenSource/ospf-sr

ospfd: Store neighbor Adjacency SID in SR database

4 years agoMerge pull request #7317 from pjdruddy/pr-fix-evpn-prefix2string
Donald Sharp [Sat, 17 Oct 2020 17:16:21 +0000 (13:16 -0400)]
Merge pull request #7317 from pjdruddy/pr-fix-evpn-prefix2string

Pr fix evpn prefix2string

4 years agozebra: Fix use after free in debug path 7330/head
Donald Sharp [Fri, 16 Oct 2020 17:51:52 +0000 (13:51 -0400)]
zebra: Fix use after free in debug path

When zebra is running with debugs turned on there
is a use after free reported by the address sanitizer:

2020/10/16 12:58:02 ZEBRA: rib_delnode: (0:254):4.5.6.16/32: rn 0x60b000026f20, re 0x6080000131a0, removing
2020/10/16 12:58:02 ZEBRA: rib_meta_queue_add: (0:254):4.5.6.16/32: queued rn 0x60b000026f20 into sub-queue 3
=================================================================
==3101430==ERROR: AddressSanitizer: heap-use-after-free on address 0x608000011d28 at pc 0x555555705ab6 bp 0x7fffffffdab0 sp 0x7fffffffdaa8
READ of size 8 at 0x608000011d28 thread T0
    #0 0x555555705ab5 in re_list_const_first zebra/rib.h:222
    #1 0x555555705b54 in re_list_first zebra/rib.h:222
    #2 0x555555711a4f in process_subq_route zebra/zebra_rib.c:2248
    #3 0x555555711d2e in process_subq zebra/zebra_rib.c:2286
    #4 0x555555711ec7 in meta_queue_process zebra/zebra_rib.c:2320
    #5 0x7ffff74701f7 in work_queue_run lib/workqueue.c:291
    #6 0x7ffff7450e9c in thread_call lib/thread.c:1581
    #7 0x7ffff738eaf7 in frr_run lib/libfrr.c:1099
    #8 0x55555561a578 in main zebra/main.c:455
    #9 0x7ffff7079cc9 in __libc_start_main ../csu/libc-start.c:308
    #10 0x5555555e3429 in _start (/usr/lib/frr/zebra+0x8f429)
0x608000011d28 is located 8 bytes inside of 88-byte region [0x608000011d20,0x608000011d78)
freed by thread T0 here:
    #0 0x7ffff768bb6f in __interceptor_free (/lib/x86_64-linux-gnu/libasan.so.6+0xa9b6f)
    #1 0x7ffff739ccad in qfree lib/memory.c:129
    #2 0x555555709ee4 in rib_gc_dest zebra/zebra_rib.c:746
    #3 0x55555570ca76 in rib_process zebra/zebra_rib.c:1240
    #4 0x555555711a05 in process_subq_route zebra/zebra_rib.c:2245
    #5 0x555555711d2e in process_subq zebra/zebra_rib.c:2286
    #6 0x555555711ec7 in meta_queue_process zebra/zebra_rib.c:2320
    #7 0x7ffff74701f7 in work_queue_run lib/workqueue.c:291
    #8 0x7ffff7450e9c in thread_call lib/thread.c:1581
    #9 0x7ffff738eaf7 in frr_run lib/libfrr.c:1099
    #10 0x55555561a578 in main zebra/main.c:455
    #11 0x7ffff7079cc9 in __libc_start_main ../csu/libc-start.c:308
previously allocated by thread T0 here:
    #0 0x7ffff768c037 in calloc (/lib/x86_64-linux-gnu/libasan.so.6+0xaa037)
    #1 0x7ffff739cb98 in qcalloc lib/memory.c:110
    #2 0x555555712ace in zebra_rib_create_dest zebra/zebra_rib.c:2515
    #3 0x555555712c6c in rib_link zebra/zebra_rib.c:2576
    #4 0x555555712faa in rib_addnode zebra/zebra_rib.c:2607
    #5 0x555555715bf0 in rib_add_multipath_nhe zebra/zebra_rib.c:3012
    #6 0x555555715f56 in rib_add_multipath zebra/zebra_rib.c:3049
    #7 0x55555571788b in rib_add zebra/zebra_rib.c:3327
    #8 0x5555555e584a in connected_up zebra/connected.c:254
    #9 0x5555555e42ff in connected_announce zebra/connected.c:94
    #10 0x5555555e4fd3 in connected_update zebra/connected.c:195
    #11 0x5555555e61ad in connected_add_ipv4 zebra/connected.c:340
    #12 0x5555555f26f5 in netlink_interface_addr zebra/if_netlink.c:1213
    #13 0x55555560f756 in netlink_information_fetch zebra/kernel_netlink.c:350
    #14 0x555555612e49 in netlink_parse_info zebra/kernel_netlink.c:941
    #15 0x55555560f9f1 in kernel_read zebra/kernel_netlink.c:402
    #16 0x7ffff7450e9c in thread_call lib/thread.c:1581
    #17 0x7ffff738eaf7 in frr_run lib/libfrr.c:1099
    #18 0x55555561a578 in main zebra/main.c:455
    #19 0x7ffff7079cc9 in __libc_start_main ../csu/libc-start.c:308
SUMMARY: AddressSanitizer: heap-use-after-free zebra/rib.h:222 in re_list_const_first

This is happening because we are using the dest pointer after a call into
rib_gc_dest.  In process_subq_route, we call rib_process() and if the
dest is deleted dest pointer is now garbage.  We must reload the
dest pointer in this case.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agodoc: Add %pBD print formatter to doc 7306/head
Donald Sharp [Fri, 16 Oct 2020 11:44:26 +0000 (07:44 -0400)]
doc: Add %pBD print formatter to doc

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agobgpd: Use bgp_dest_get_prefix accessor function
Donald Sharp [Wed, 14 Oct 2020 15:39:27 +0000 (11:39 -0400)]
bgpd: Use bgp_dest_get_prefix accessor function

Use the appropriate bgp_dest_get_prefix accessor function

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agobgpd: More bgp_node -> bgp_dest cleanup
Donald Sharp [Wed, 14 Oct 2020 15:19:45 +0000 (11:19 -0400)]
bgpd: More bgp_node -> bgp_dest cleanup

Some more of the bgp_node usage snuck in from big commits in
the past month or so from feature work.  Do some work
to put it back to bgp_dest for incoming future work.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agobgpd: Convert to %pFX or %pBD where possible
Donald Sharp [Wed, 14 Oct 2020 15:07:57 +0000 (11:07 -0400)]
bgpd: Convert to %pFX or %pBD where possible

Search and destroy places where we used prefix2str
that could be replaced with %pFX or %pBD in bgpd.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agobgpd: add `%pBD` for printing `struct bgp_dest *`
David Lamparter [Tue, 23 Jun 2020 14:00:41 +0000 (16:00 +0200)]
bgpd: add `%pBD` for printing `struct bgp_dest *`

`%pRN` is not appropriate anymore.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agoMerge pull request #7335 from opensourcerouting/fix-ti-lfa-topotest
Donald Sharp [Sat, 17 Oct 2020 12:07:17 +0000 (08:07 -0400)]
Merge pull request #7335 from opensourcerouting/fix-ti-lfa-topotest

tests: fix spurious failures in the TI-LFA topotest

4 years agosharpd: Fix nexthop group name collision 7336/head
Donald Sharp [Sat, 17 Oct 2020 01:44:29 +0000 (21:44 -0400)]
sharpd: Fix nexthop group name collision

If you have two nexthop groups named
one
oneone

then the sharp daemon will treat them as the same nexthop
group.  This is because we are doign this:

static int sharp_nhg_compare_func(const struct sharp_nhg *a,
                                  const struct sharp_nhg *b)
{
        return strncmp(a->name, b->name, strlen(a->name));
}

The strlen should be the size of the array of name.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agotests: fix spurious failures in the TI-LFA topotest 7335/head
Renato Westphal [Fri, 16 Oct 2020 23:40:11 +0000 (20:40 -0300)]
tests: fix spurious failures in the TI-LFA topotest

Skip comparing neighbor-extended-circuit-id in yang output. They
are not consistent.

This is similar to commit ecc11c93b7eace which fixed the same
problem in the IS-IS SR topotest.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agozebra: support multiple connected subnets on an interface 7333/head
Mark Stapp [Fri, 16 Oct 2020 20:46:33 +0000 (16:46 -0400)]
zebra: support multiple connected subnets on an interface

We support configuration of multiple addresses in the same
subnet on a single interface: make sure that zebra supports
multiple instances of the corresponding connected route.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #7235 from opensourcerouting/acl-wildcard-fix
Santosh P K [Fri, 16 Oct 2020 15:58:39 +0000 (21:28 +0530)]
Merge pull request #7235 from opensourcerouting/acl-wildcard-fix

lib,yang: cisco acl network wildcard fixes

4 years agobgpd: replace bgp_evpn_route2str with prefix2str 7317/head
Pat Ruddy [Thu, 15 Oct 2020 13:25:26 +0000 (14:25 +0100)]
bgpd: replace bgp_evpn_route2str with prefix2str

Remove bgp_evpn_route2str and replace calls with prefix2str

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agoMerge pull request #7011 from opensourcerouting/isis-ti-lfa
Olivier Dugeon [Fri, 16 Oct 2020 10:04:37 +0000 (12:04 +0200)]
Merge pull request #7011 from opensourcerouting/isis-ti-lfa

isisd: add support for Topology Independent LFA (TI-LFA)

4 years agoMerge pull request #7290 from eololab/small-fix-for-frrcommon-in-tools
Quentin Young [Thu, 15 Oct 2020 19:53:42 +0000 (15:53 -0400)]
Merge pull request #7290 from eololab/small-fix-for-frrcommon-in-tools

tools: use function chownfrr everywhere

4 years agoMerge pull request #7320 from pjdruddy/pr-prefix-string
Quentin Young [Thu, 15 Oct 2020 18:30:47 +0000 (14:30 -0400)]
Merge pull request #7320 from pjdruddy/pr-prefix-string

vrrpd: Convert to using %pFX

4 years agovrrpd: Convert to using %pFX 7320/head
Pat Ruddy [Thu, 15 Oct 2020 15:40:36 +0000 (16:40 +0100)]
vrrpd: Convert to using %pFX

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agoMerge pull request #7304 from volta-networks/fix_vs_1811
Donald Sharp [Thu, 15 Oct 2020 15:17:10 +0000 (11:17 -0400)]
Merge pull request #7304 from volta-networks/fix_vs_1811

ospfd: fix invocation of ospfTrapNbrStateChange

4 years agolib: align prefixevpn2str output with bgp_evpn_route2str
Pat Ruddy [Thu, 15 Oct 2020 11:24:51 +0000 (12:24 +0100)]
lib: align prefixevpn2str output with bgp_evpn_route2str

We have 2 different routines to turn an evpn route into a string.
This commit aligns the two to the latest maintained version as a
first step in removing one of them.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agoMerge pull request #7312 from idryzhov/fix-ip-router-isis
Donald Sharp [Thu, 15 Oct 2020 11:09:39 +0000 (07:09 -0400)]
Merge pull request #7312 from idryzhov/fix-ip-router-isis

isisd: fix check for area-tag modification

4 years agoospfd: fix invocation of ospfTrapNbrStateChange 7304/head
Babis Chalios [Thu, 1 Oct 2020 09:07:54 +0000 (11:07 +0200)]
ospfd: fix invocation of ospfTrapNbrStateChange

ospfNbrStateChange is generated when the state of neighbor regresses or
it progresses to a terminal state. When transitioning to or from Full
state on non-broadcast multi-access and broadcast networks the trap
should be sent by the designated router. This last condition was not
taken into account when checking for the conditions of generating the
trap.

Fixes volta/volta-stack#1811

Signed-off-by: Babis Chalios <mail@bchalios.io>
4 years agoisisd: fix check for area-tag modification 7312/head
Igor Ryzhov [Wed, 14 Oct 2020 20:01:49 +0000 (23:01 +0300)]
isisd: fix check for area-tag modification

Interface area-tag is not supposed to be modified once defined, but the
necessary check is currently broken, because the circuit is never in
init_circ_list if the area-tag is already configured for the interface.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoMerge pull request #6016 from sarav511/ppend
Donald Sharp [Thu, 15 Oct 2020 00:27:17 +0000 (20:27 -0400)]
Merge pull request #6016 from sarav511/ppend

pimd: Handling prune received during join state and join received during prune pending

4 years agoMerge pull request #5895 from patrasar/2404618
Donald Sharp [Thu, 15 Oct 2020 00:13:31 +0000 (20:13 -0400)]
Merge pull request #5895 from patrasar/2404618

pimd: Clear (s,g,rpt) ifchannel on (*, G) prune received

4 years agoMerge pull request #7309 from mjstapp/fix_ospf_gr_reasons
Donald Sharp [Wed, 14 Oct 2020 23:19:39 +0000 (19:19 -0400)]
Merge pull request #7309 from mjstapp/fix_ospf_gr_reasons

ospfd: make GR reason string production safer

4 years agoMerge pull request #7308 from mjstapp/fix_ospf_gr_sa
Donald Sharp [Wed, 14 Oct 2020 23:18:24 +0000 (19:18 -0400)]
Merge pull request #7308 from mjstapp/fix_ospf_gr_sa

ospfd: fix SA warnings in ospfd, ospfclient

4 years agoMerge pull request #7310 from idryzhov/fix-no-bgp-as-path
Donald Sharp [Wed, 14 Oct 2020 23:15:49 +0000 (19:15 -0400)]
Merge pull request #7310 from idryzhov/fix-no-bgp-as-path

bgpd: print error when as-path filter doesn't exist

4 years agobgpd: print error when as-path filter doesn't exist 7310/head
Igor Ryzhov [Wed, 14 Oct 2020 16:56:18 +0000 (19:56 +0300)]
bgpd: print error when as-path filter doesn't exist

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoisisd: change debug messages to use uppercase SPF 7011/head
Renato Westphal [Sun, 20 Sep 2020 16:21:53 +0000 (13:21 -0300)]
isisd: change debug messages to use uppercase SPF

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agodoc: document new IS-IS TI-LFA commands and options
Renato Westphal [Mon, 31 Aug 2020 18:10:50 +0000 (15:10 -0300)]
doc: document new IS-IS TI-LFA commands and options

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agotests: add IS-IS TI-LFA topotest
Renato Westphal [Thu, 20 Aug 2020 22:53:47 +0000 (19:53 -0300)]
tests: add IS-IS TI-LFA topotest

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agotests: add IS-IS TI-LFA unit tests
Renato Westphal [Mon, 31 Aug 2020 17:18:58 +0000 (14:18 -0300)]
tests: add IS-IS TI-LFA unit tests

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoisisd: implement TI-LFA protection for Adj-SIDs
Renato Westphal [Mon, 31 Aug 2020 18:24:02 +0000 (15:24 -0300)]
isisd: implement TI-LFA protection for Adj-SIDs

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoisisd: add support for Topology Independent LFA (TI-LFA)
Renato Westphal [Thu, 20 Aug 2020 22:55:42 +0000 (19:55 -0300)]
isisd: add support for Topology Independent LFA (TI-LFA)

TI-LFA is a modern fast-reroute (FRR) solution that leverages Segment
Routing to pre-compute backup nexthops for all destinations in the
network, helping to reduce traffic restoration times whenever a
failure occurs. The backup nexthops are expected to be installed
in the FIB so that they can be activated as soon as a failure
is detected, making sub-50ms recovery possible (assuming an
hierarchical FIB).

TI-LFA is a huge step forward compared to prior IP-FRR solutions,
like classic LFA and Remote LFA, as it guarantees 100% coverage
for all destinations. This is possible thanks to the source routing
capabilities of SR, which allows the backup nexthops to steer traffic
around the failures (using as many SIDs as necessary). In addition
to that, the repair paths always follow the post-convergence SPF
tree, which prevents transient congestions and suboptimal routing
from happening.

Deploying TI-LFA is very simple as it only requires a single
configuration command for each interface that needs to be protected
(both link protection and node protection are available). In addition
to IPv4 and IPv6 routes, SR Prefix-SIDs and Adj-SIDs are also
protected by the backup nexthops computed by the TI-LFA algorithms.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoyang, isisd: add TI-LFA YANG nodes and corresponding skeleton callbacks
Renato Westphal [Mon, 31 Aug 2020 18:34:06 +0000 (15:34 -0300)]
yang, isisd: add TI-LFA YANG nodes and corresponding skeleton callbacks

Add CLI wrapper commands as well...

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoospfd: fix SA warnings in ospfd, ospfclient 7308/head
Mark Stapp [Wed, 14 Oct 2020 16:30:01 +0000 (12:30 -0400)]
ospfd: fix SA warnings in ospfd, ospfclient

Fix some SA warnings in ospf GR and ospfclient code.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoospfd: make reason string production safer 7309/head
Mark Stapp [Wed, 14 Oct 2020 16:51:52 +0000 (12:51 -0400)]
ospfd: make reason string production safer

Use to-string functions for GR message codes instead of raw
string array indexing; the values used can come in packets
and are not validated.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #7180 from kuldeepkash/bgp-communities
Donald Sharp [Wed, 14 Oct 2020 13:14:10 +0000 (09:14 -0400)]
Merge pull request #7180 from kuldeepkash/bgp-communities

tests: Add bgp_communities_topo1 test suite

4 years agoMerge pull request #7244 from donaldsharp/mlag_backout_and_fix
Mark Stapp [Wed, 14 Oct 2020 12:30:54 +0000 (08:30 -0400)]
Merge pull request #7244 from donaldsharp/mlag_backout_and_fix

Mlag backout and fix

4 years agoospfd: Store neighbor Adjacency SID in SR database 7322/head
Olivier Dugeon [Wed, 14 Oct 2020 12:17:58 +0000 (14:17 +0200)]
ospfd: Store neighbor Adjacency SID in SR database

For TI-LFA, it is necessay to known the Adjacency SID advetise by the nieghbor
routers. However, the current Segment Routing code skip neighbor Adjacency SID
and thus, don't store them into the Segment Routing database.

This PR takes care of neighbor Adjacency SID by allowing to store them in the
Segment Routing database. Corresponding MPLS table entry is only configured if
the advertised Adjacency SID is global i.e. with L-Flag unset.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
4 years agoMerge pull request #7283 from donaldsharp/thread_off_semantics
Donatas Abraitis [Wed, 14 Oct 2020 11:50:08 +0000 (14:50 +0300)]
Merge pull request #7283 from donaldsharp/thread_off_semantics

*: Use proper semantics for turning off thread

4 years agoMerge pull request #7298 from mjstapp/quiet_opaque_debugs
Donald Sharp [Wed, 14 Oct 2020 11:27:27 +0000 (07:27 -0400)]
Merge pull request #7298 from mjstapp/quiet_opaque_debugs

zebra: quiet the zebra opaque message debugs

4 years agoMerge pull request #7278 from donaldsharp/fix_blame_code
Donatas Abraitis [Wed, 14 Oct 2020 06:21:50 +0000 (09:21 +0300)]
Merge pull request #7278 from donaldsharp/fix_blame_code

*: Consolidate on first git blame ignore revs