]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 years agodoc: Add a couple of missed `show zebra ...` comamnds to doc
Donald Sharp [Tue, 7 May 2019 02:51:45 +0000 (22:51 -0400)]
doc: Add a couple of missed `show zebra ...` comamnds to doc

Noticed that a couple of the `show zebra ...` commands are missing
from the zebra documentation that I use a bunch.  Let's add them
in.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4266 from vishaldhingra/lcomm_dyn
Donald Sharp [Tue, 7 May 2019 02:16:28 +0000 (22:16 -0400)]
Merge pull request #4266 from vishaldhingra/lcomm_dyn

bgpd : dynamic modification in lcomm-list is not taking effect.

5 years agoMerge pull request #4268 from qlyoung/frrstr-replace
Renato Westphal [Tue, 7 May 2019 02:14:38 +0000 (23:14 -0300)]
Merge pull request #4268 from qlyoung/frrstr-replace

lib: add string replace function

5 years agoMerge pull request #4244 from donaldsharp/pim_single_interface
Renato Westphal [Tue, 7 May 2019 02:10:03 +0000 (23:10 -0300)]
Merge pull request #4244 from donaldsharp/pim_single_interface

pimd: Stop crash in show of single interface

5 years agoMerge pull request #4264 from pguibert6WIND/trace_bfd
Donald Sharp [Tue, 7 May 2019 01:42:18 +0000 (21:42 -0400)]
Merge pull request #4264 from pguibert6WIND/trace_bfd

More traces for BFD clients

5 years agolib: add string replace function
Quentin Young [Mon, 6 May 2019 22:38:10 +0000 (22:38 +0000)]
lib: add string replace function

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #4256 from donaldsharp/zebra_table
Renato Westphal [Mon, 6 May 2019 22:08:17 +0000 (19:08 -0300)]
Merge pull request #4256 from donaldsharp/zebra_table

doc, zebra: Remove "table X" command

5 years agoMerge pull request #4253 from qlyoung/zapi-handler-args-macro
Renato Westphal [Mon, 6 May 2019 20:50:41 +0000 (17:50 -0300)]
Merge pull request #4253 from qlyoung/zapi-handler-args-macro

ZAPI callback args macro

5 years agoMerge pull request #4234 from donaldsharp/flood_the_vtep
Renato Westphal [Mon, 6 May 2019 20:33:34 +0000 (17:33 -0300)]
Merge pull request #4234 from donaldsharp/flood_the_vtep

zebra: Fix incorrect reading of REMOTE_VTEP_[ADD|DEL]

5 years agodoc, zebra: Remove "table X" command
Donald Sharp [Sat, 4 May 2019 00:54:20 +0000 (20:54 -0400)]
doc, zebra: Remove "table X" command

This command is broken and has been broken since the introduction
of vrf's.  Since no-one has complained it is safe to assume that
there is no call for this specialized linux command.  Remove
from the system with extreme prejudice.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Be consistent in how we call rib_add( and rib_delete( with tableid
Donald Sharp [Mon, 6 May 2019 14:41:40 +0000 (10:41 -0400)]
zebra: Be consistent in how we call rib_add( and rib_delete( with tableid

The rib_add( and rib_delete( functions are there to allow
kernel interactions with the creation of routes.  Fixup the
code to be consistent in the passup of the tableid.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd : dynamic modification in lcomm-list is not taking effect.
vishaldhingra [Mon, 6 May 2019 12:32:58 +0000 (05:32 -0700)]
bgpd : dynamic modification in lcomm-list is not taking effect.

lcomm-list is configured and attached to route-map via match clause.
If you modify the lcomm-list then it is not taking into effect via routemap.

Signed-off-by: vishaldhingra <vdhingra@vmware.com>
5 years agoospfd: add bfd up event trace
Philippe Guibert [Thu, 2 May 2019 07:36:06 +0000 (09:36 +0200)]
ospfd: add bfd up event trace

that bfd trace is visible when using 'debug ospf nsm event' command.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobgpd: add bfd event trace
Philippe Guibert [Thu, 2 May 2019 07:35:29 +0000 (09:35 +0200)]
bgpd: add bfd event trace

that bfd event trace is visible when 'debug bgp neighbor-event' is
enabled.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agoMerge pull request #4255 from donaldsharp/coverity_stole_my_sanity
Rafael Zalamena [Sun, 5 May 2019 11:48:40 +0000 (08:48 -0300)]
Merge pull request #4255 from donaldsharp/coverity_stole_my_sanity

Coverity stole my sanity

5 years agoMerge pull request #4233 from qlyoung/fix-zapi-msg-debugs
Mark Stapp [Fri, 3 May 2019 21:42:30 +0000 (17:42 -0400)]
Merge pull request #4233 from qlyoung/fix-zapi-msg-debugs

zebra: fix zapi msg debugging dumps

5 years ago*: use ZAPI_CALLBACK_ARGS macro for zapi handlers
Quentin Young [Fri, 3 May 2019 19:42:59 +0000 (19:42 +0000)]
*: use ZAPI_CALLBACK_ARGS macro for zapi handlers

This macro:
- Marks ZAPI callbacks for readability
- Standardizes argument names
- Makes it simple to add ZAPI arguments in the future
- Ensures proper types
- Looks better
- Shortens function declarations

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agozebra: fix zapi msg debugging dumps
Quentin Young [Wed, 1 May 2019 00:49:13 +0000 (00:49 +0000)]
zebra: fix zapi msg debugging dumps

When we switched to a pthread per client, we lost the ability to
correlate zapi message debugs with their handlers in zlog, because the
message was logged when it was read off the zapi socket and not right
before it was processed. Move the zapi msg hexdump to happen right
before we call the message handler.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #4252 from pogojotz/master
Quentin Young [Fri, 3 May 2019 19:54:41 +0000 (15:54 -0400)]
Merge pull request #4252 from pogojotz/master

doc: Fix failing `make doc`

5 years agolib: define ZAPI_CALLBACK_ARGS macro
Quentin Young [Fri, 3 May 2019 18:41:00 +0000 (18:41 +0000)]
lib: define ZAPI_CALLBACK_ARGS macro

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agodoc: Fix failing `make doc`
Juergen Werner [Fri, 3 May 2019 18:17:08 +0000 (20:17 +0200)]
doc: Fix failing `make doc`

This build system bug was introduced with 9251d1f596.

Signed-off-by: Juergen Werner <pogojotz@gmx.net>
5 years agozebra: Memory allocations do not fail
Donald Sharp [Sat, 4 May 2019 00:32:02 +0000 (20:32 -0400)]
zebra: Memory allocations do not fail

If a memory allocation fails then we *know* we assert
and core the program.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Remove functionally dead code.
Donald Sharp [Sat, 4 May 2019 00:28:38 +0000 (20:28 -0400)]
lib: Remove functionally dead code.

The vrf_with_default_name vrf variable is set to NULL
and then tested to see if it is valid.  Removing the
dead code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoospfd: continue statement is redundant
Donald Sharp [Sat, 4 May 2019 00:21:14 +0000 (20:21 -0400)]
ospfd: continue statement is redundant

The continue statement is redundant because DISCARD_LSA
has one in it already.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: The vpn variable must be non-null
Donald Sharp [Sat, 4 May 2019 00:18:58 +0000 (20:18 -0400)]
bgpd: The vpn variable must be non-null

The vpn variable in bgp_evpn_advertise_svi_ip_vni must
be non-null as such it is impossible to ever need the
!vpn test case.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Add some extra safety for route_info
Donald Sharp [Sat, 4 May 2019 00:14:39 +0000 (20:14 -0400)]
zebra: Add some extra safety for route_info

The route_info[X].meta_q_map *must* be less than MQ_SIZE
or we will do some strange stuff, so assert on it at startup.

The distance in route_info is a uint8_t so let's keep the data
structure the same.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Remove logically dead code assignment
Donald Sharp [Sat, 4 May 2019 00:09:54 +0000 (20:09 -0400)]
bgpd: Remove logically dead code assignment

The label value is set to MPLS_LABEL_NONE at the start
of the function and we never modify it, testing it for
BGP_PREVENT_VRF_2_VRF_LEAK equality will never be true

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: ifp must be a real pointer sometimes
Donald Sharp [Sat, 4 May 2019 00:06:55 +0000 (20:06 -0400)]
zebra: ifp must be a real pointer sometimes

The ifp pointer must be pointing at a real location
in memory since right above us in this loop we
return if it is.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopbrd: Prevent usage of c if it is null
Donald Sharp [Sat, 4 May 2019 00:02:53 +0000 (20:02 -0400)]
pbrd: Prevent usage of c if it is null

It is possible, that a connected lookup from
zebra_interface_address_read is null.  Protect and Serve

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4247 from mjstapp/fix_topotest_topo_only
Donald Sharp [Thu, 2 May 2019 22:48:28 +0000 (18:48 -0400)]
Merge pull request #4247 from mjstapp/fix_topotest_topo_only

topotest: fix pytest deprecation warning

5 years agotopotest: fix pytest deprecation warning
Mark Stapp [Thu, 2 May 2019 18:43:18 +0000 (14:43 -0400)]
topotest: fix pytest deprecation warning

As of pytest 4.something, a pattern we were using in conftest.py
was deprecated. Also make a new-ish test script executable (all
the rest appear to be?)

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #4243 from mjstapp/fix_dplane_strlcpy
Donald Sharp [Thu, 2 May 2019 14:58:47 +0000 (10:58 -0400)]
Merge pull request #4243 from mjstapp/fix_dplane_strlcpy

zebra: replace strncpy with strlcpy in dplane

5 years agopimd: Stop crash in show of single interface
Donald Sharp [Thu, 2 May 2019 14:37:04 +0000 (10:37 -0400)]
pimd: Stop crash in show of single interface

There exists a possiblity that we have upstream data but
at this point in time the rpf failed because there is no
path.  As such the rpf interface will be NULL and we
should not necessarily trust it.  Prevent a crash

Ticket: CM-24857
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: replace strncpy with strlcpy in dplane
Mark Stapp [Thu, 2 May 2019 13:52:48 +0000 (09:52 -0400)]
zebra: replace strncpy with strlcpy in dplane

The dataplane module picked up a couple of strncpys; replace
them.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #4238 from LabNConsulting/working/lb/master/tt-clear-nves
Donald Sharp [Thu, 2 May 2019 11:25:16 +0000 (07:25 -0400)]
Merge pull request #4238 from LabNConsulting/working/lb/master/tt-clear-nves

topotests/bgp_rfapi_basic_sanity: cleanup rfapi using non-debug command

5 years agoMerge pull request #4241 from FRRouting/revert-4192-biswajitfrr_4
Donald Sharp [Thu, 2 May 2019 11:15:51 +0000 (07:15 -0400)]
Merge pull request #4241 from FRRouting/revert-4192-biswajitfrr_4

Revert "bgpd: Prevent IPv6 routes received via a ibgp session with own ip as nexthop "

5 years agoRevert "bgpd: Prevent IPv6 routes received via a ibgp session with own ip as nexthop "
Donald Sharp [Thu, 2 May 2019 11:15:39 +0000 (07:15 -0400)]
Revert "bgpd: Prevent IPv6 routes received via a ibgp session with own ip as nexthop "

5 years agoMerge pull request #4240 from FRRouting/revert-4236-zebra_diet
Pascal Mathis [Thu, 2 May 2019 11:07:02 +0000 (13:07 +0200)]
Merge pull request #4240 from FRRouting/revert-4236-zebra_diet

Revert "Zebra diet"

5 years agoRevert "Zebra diet"
Lou Berger [Thu, 2 May 2019 10:54:59 +0000 (06:54 -0400)]
Revert "Zebra diet"

5 years agoMerge pull request #4236 from donaldsharp/zebra_diet
Lou Berger [Thu, 2 May 2019 10:34:17 +0000 (06:34 -0400)]
Merge pull request #4236 from donaldsharp/zebra_diet

Zebra diet

5 years agotopotests/bgp_rfapi_basic_sanity: cleanup rfapi using non-debug command
Lou Berger [Wed, 1 May 2019 21:16:14 +0000 (21:16 +0000)]
topotests/bgp_rfapi_basic_sanity: cleanup rfapi using non-debug command

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agolib: Convert table code to use new hash type
Donald Sharp [Wed, 1 May 2019 00:23:52 +0000 (20:23 -0400)]
lib: Convert table code to use new hash type

This converts the new table code to use the new hash
type provided by David.

The following test is 1 million routes installed and how
much memory we are using:

Old mem usage:
Memory statistics for zebra:
System allocator statistics:
  Total heap allocated:  574 MiB
  Holding block headers: 0 bytes
  Used small blocks:     0 bytes
  Used ordinary blocks:  536 MiB
  Free small blocks:     33 MiB
  Free ordinary blocks:  4600 KiB
  Ordinary blocks:       0
  Small blocks:          0
  Holding blocks:        0

New Memory usage:
Memory statistics for zebra:
System allocator statistics:
  Total heap allocated:  542 MiB
  Holding block headers: 0 bytes
  Used small blocks:     0 bytes
  Used ordinary blocks:  506 MiB
  Free small blocks:     3374 KiB
  Free ordinary blocks:  33 MiB
  Ordinary blocks:       0
  Small blocks:          0
  Holding blocks:        0

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Make prefix_hash_key accept a const
Donald Sharp [Tue, 30 Apr 2019 23:40:11 +0000 (19:40 -0400)]
lib: Make prefix_hash_key accept a const

We should not be modifying the pointer for the prefix_hash_key
function, make it a const so that we can use it elsewhere.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Make _find functions treat the head as const
Donald Sharp [Tue, 30 Apr 2019 23:38:15 +0000 (19:38 -0400)]
lib: Make _find functions treat the head as const

The head of a list should not change for find functions.  Probably
are others that should be considered but these changes can come
in as needed I believe.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Remove linked list and replace with new LIST
Donald Sharp [Tue, 30 Apr 2019 22:04:57 +0000 (18:04 -0400)]
zebra: Remove linked list and replace with new LIST

The `struct rib_dest_t` was being used to store the linked
list of rnh's associated with the node.  This was taking up
a bunch of memory.  Replace with new data structure supplied
by David and see the memory reductions associated with 1 million
routes in the zebra rib:

Old:
Memory statistics for zebra:
System allocator statistics:
  Total heap allocated:  675 MiB
  Holding block headers: 0 bytes
  Used small blocks:     0 bytes
  Used ordinary blocks:  567 MiB
  Free small blocks:     39 MiB
  Free ordinary blocks:  69 MiB
  Ordinary blocks:       0
  Small blocks:          0
  Holding blocks:        0

New:
Memory statistics for zebra:
System allocator statistics:
  Total heap allocated:  574 MiB
  Holding block headers: 0 bytes
  Used small blocks:     0 bytes
  Used ordinary blocks:  536 MiB
  Free small blocks:     33 MiB
  Free ordinary blocks:  4600 KiB
  Ordinary blocks:       0
  Small blocks:          0
  Holding blocks:        0

`struct rnh` was moved to rib.h because of the tangled web
of structure dependancies.  This data structure is used
in numerous places so it should be ok for the moment.
Future work might be needed to do a better job of splitting
up data structures and function definitions.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agodoc: Some minor doc cleanup for new data structures
Donald Sharp [Tue, 30 Apr 2019 21:56:05 +0000 (17:56 -0400)]
doc: Some minor doc cleanup for new data structures

Noticed during attempts at usage that the documentation
needed a couple small updates:

1) Tell the user which header to include
2) Some functions want the address of the data structure

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4230 from sworleys/Route-Info-Check
Russ White [Wed, 1 May 2019 22:14:25 +0000 (18:14 -0400)]
Merge pull request #4230 from sworleys/Route-Info-Check

zebra: Check on startup route_info has all types

5 years agoMerge pull request #4220 from donaldsharp/fix_linux_alias
Russ White [Wed, 1 May 2019 22:13:48 +0000 (18:13 -0400)]
Merge pull request #4220 from donaldsharp/fix_linux_alias

zebra: Modify how we display/store os description

5 years agoMerge pull request #4192 from bisdhdh/biswajitfrr_4
Russ White [Wed, 1 May 2019 22:12:07 +0000 (18:12 -0400)]
Merge pull request #4192 from bisdhdh/biswajitfrr_4

bgpd: Prevent IPv6 routes received via a ibgp session with own ip as nexthop

5 years agotopotests/bgp_rfapi_basic_sanity: cleanup rfapi using non-debug command
Lou Berger [Wed, 1 May 2019 21:16:14 +0000 (21:16 +0000)]
topotests/bgp_rfapi_basic_sanity: cleanup rfapi using non-debug command

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agozebra: Check on startup route_info has all types
Stephen Worley [Tue, 30 Apr 2019 14:43:16 +0000 (10:43 -0400)]
zebra: Check on startup route_info has all types

Add a function to check if the route_info array
has all types specified with data in it. Specifically,
test the 'key' attribute for non-zero data. Ignore
ZEBRA_ROUTE_SYSTEM as it should be zero key anyway.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agozebra: suppress unused variable warning
Quentin Young [Wed, 1 May 2019 19:29:24 +0000 (19:29 +0000)]
zebra: suppress unused variable warning

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #4226 from sworleys/PBR-BFD-OF-route_info
Mark Stapp [Wed, 1 May 2019 15:22:54 +0000 (11:22 -0400)]
Merge pull request #4226 from sworleys/PBR-BFD-OF-route_info

zebra: Add PBR, BFD, OpenFabric to route_info

5 years agozebra: Fix incorrect reading of REMOTE_VTEP_[ADD|DEL]
Donald Sharp [Wed, 1 May 2019 01:29:03 +0000 (21:29 -0400)]
zebra: Fix incorrect reading of REMOTE_VTEP_[ADD|DEL]

With flooding control added recently we were not properly handling
the new flood control parameter in zebra_vxlan.c handler functions.
The error message that was being repeatedly seen:

2019/05/01 00:47:32 ZEBRA: [EC 100663311] stream_get2: Attempt to get out of bounds
2019/05/01 00:47:32 ZEBRA: [EC 100663311] &(struct stream): 0x7f0f04001740, size: 22, getp: 22, endp: 22

The fix was to ensure that both the _add and _del functions kept proper
sizing of amount of data read *and* the _del function was not
reading the flood_control data from the stream.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4232 from mjstapp/fix_topotests_py3
Donald Sharp [Tue, 30 Apr 2019 19:47:17 +0000 (15:47 -0400)]
Merge pull request #4232 from mjstapp/fix_topotests_py3

topotest: fixes to support python3

5 years agotopotest: fixes to support python3
Mark Stapp [Tue, 30 Apr 2019 15:31:02 +0000 (11:31 -0400)]
topotest: fixes to support python3

Make some small changes to support both python 2 and 3.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #3045 from opensourcerouting/atoms
Lou Berger [Tue, 30 Apr 2019 14:26:35 +0000 (10:26 -0400)]
Merge pull request #3045 from opensourcerouting/atoms

READY: lists/skiplists/rb-trees new API & sequence lock & atomic lists

5 years agozebra: Comment to ensure types added to route_info
Stephen Worley [Tue, 30 Apr 2019 14:07:45 +0000 (10:07 -0400)]
zebra: Comment to ensure types added to route_info

Add a comment to indicate that route types added to
Zebra, should also be present in the route_info array.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agoMerge pull request #4227 from faickermo/fix_show_ip_bgp_json
Donald Sharp [Tue, 30 Apr 2019 12:32:44 +0000 (08:32 -0400)]
Merge pull request #4227 from faickermo/fix_show_ip_bgp_json

bpgd: Add the end of newline of show bgp table json output

5 years agozebra: Add OpenFabric to route_info array
Stephen Worley [Mon, 29 Apr 2019 23:28:15 +0000 (19:28 -0400)]
zebra: Add OpenFabric to route_info array

Add OpenFabric to the route_info array for handling processing
of the OpenFabric route type.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agozebra: Add BFD to route_info array
Stephen Worley [Mon, 29 Apr 2019 23:26:11 +0000 (19:26 -0400)]
zebra: Add BFD to route_info array

Add BFD to the route_info array for handling processing
of the BFD route type.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agozebra: Add PBR to route_info array
Stephen Worley [Mon, 29 Apr 2019 23:24:26 +0000 (19:24 -0400)]
zebra: Add PBR to route_info array

Add PBR to the route_info array for handling processing
of the PBR route type.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agoRevert "lib: use DECLARE_SKIPLIST for timers instead of pqueue"
David Lamparter [Mon, 29 Apr 2019 19:18:55 +0000 (21:18 +0200)]
Revert "lib: use DECLARE_SKIPLIST for timers instead of pqueue"

This reverts commit 7c198e4e1ac07c043ecfc573aed9f1d107f87234.

5 years agoRevert "lib: remove pqueue_*"
David Lamparter [Mon, 29 Apr 2019 19:18:48 +0000 (21:18 +0200)]
Revert "lib: remove pqueue_*"

This reverts commit 798ac49d06b6619adb4c5ac765b092397bc50a6c.

5 years agoMerge pull request #4216 from donaldsharp/nhg_sharpd_fixup
Mark Stapp [Mon, 29 Apr 2019 18:09:50 +0000 (14:09 -0400)]
Merge pull request #4216 from donaldsharp/nhg_sharpd_fixup

vtysh: Fixup exit nexthop-group to include sharpd

5 years agobpgd: Add the end of newline of show bgp table json output
Faicker Mo [Mon, 29 Apr 2019 09:28:42 +0000 (17:28 +0800)]
bpgd: Add the end of newline of show bgp table json output

Signed-off-by: Faicker Mo <faicker.mo@ucloud.cn>
5 years agoMerge pull request #4159 from sworleys/WQ-ErrFunc-Fix
David Lamparter [Sun, 28 Apr 2019 14:19:55 +0000 (16:19 +0200)]
Merge pull request #4159 from sworleys/WQ-ErrFunc-Fix

lib: Fix workqueue error function callback

5 years agolib: remove fifo implementation
David Lamparter [Sun, 21 Apr 2019 16:28:01 +0000 (18:28 +0200)]
lib: remove fifo implementation

5 years agobgpd: replace label pool fifo with DECLARE_LIST
David Lamparter [Sun, 21 Apr 2019 16:27:08 +0000 (18:27 +0200)]
bgpd: replace label pool fifo with DECLARE_LIST

Again, the FIFO_* stuff in lib/fifo.h is no different from a simple
unsorted list.  Just use DECLARE_LIST here so we can get rid of FIFO_*.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agobgpd: replace ADV_FIFO with DECLARE_LIST
David Lamparter [Sun, 21 Apr 2019 16:17:45 +0000 (18:17 +0200)]
bgpd: replace ADV_FIFO with DECLARE_LIST

The FIFO_* stuff in lib/fifo.h is no different from a simple unsorted
list.  Just use DECLARE_LIST here so we can get rid of FIFO_*.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agoisisd: replace dict_* with DECLARE_RBTREE
David Lamparter [Mon, 4 Feb 2019 00:22:03 +0000 (01:22 +0100)]
isisd: replace dict_* with DECLARE_RBTREE

Historically, isisd has been carrying around its own red-black tree to
manage its LSP DB in.  This replaces that with the newly-added
DECLARE_RBTREE_*.  This allows completely removing the dict_* code.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: remove pqueue_*
David Lamparter [Thu, 31 Jan 2019 02:09:45 +0000 (03:09 +0100)]
lib: remove pqueue_*

All users of the pqueue_* implementations have been migrated to use
TYPEDSKIP_* skiplists.  Remove.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoospfd: replace pqueue_* with DECLARE_SKIPLIST
David Lamparter [Thu, 31 Jan 2019 01:58:52 +0000 (02:58 +0100)]
ospfd: replace pqueue_* with DECLARE_SKIPLIST

This replaces the SPF pqueue_* with a DECLARE_SKIPLIST_* skiplist.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoospf6d: replace pqueue_* with DECLARE_SKIPLIST
David Lamparter [Thu, 31 Jan 2019 02:09:21 +0000 (03:09 +0100)]
ospf6d: replace pqueue_* with DECLARE_SKIPLIST

As the previous commit, this replaces ospf6d's pqueue_* usage in SPF
calculations with a DECLARE_SKIPLIST_* skiplist.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: use DECLARE_SKIPLIST for timers instead of pqueue
David Lamparter [Thu, 31 Jan 2019 01:30:35 +0000 (02:30 +0100)]
lib: use DECLARE_SKIPLIST for timers instead of pqueue

Replaces the use of pqueue_* for the thread_master's timer list with an
instance of DECLARE_SKIPLIST_*.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: use DECLARE_LIST for thread_list
David Lamparter [Thu, 31 Jan 2019 01:12:38 +0000 (02:12 +0100)]
lib: use DECLARE_LIST for thread_list

Replaces the open-coded thread_list with a DECLARE_LIST instantiation.
Some function prototypes are actually identical to what was previously
open-coded.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: use DECLARE_HASH for qobj hash
David Lamparter [Thu, 31 Jan 2019 00:27:02 +0000 (01:27 +0100)]
lib: use DECLARE_HASH for qobj hash

This changes the qobj node ID hash to use the new typed hash instead of
the old hash_* code.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agotests: exercise the typesafe list wrappers
David Lamparter [Mon, 18 Feb 2019 20:17:22 +0000 (21:17 +0100)]
tests: exercise the typesafe list wrappers

Since all of these list implementations provide almost the same API, we
can run and validate them against the same test code.  9 tests for the
price of one!

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agodoc: add developer docs for type-safe lists
David Lamparter [Tue, 13 Nov 2018 15:02:47 +0000 (16:02 +0100)]
doc: add developer docs for type-safe lists

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: atomlist & atomsort
David Lamparter [Tue, 8 Nov 2016 17:11:20 +0000 (18:11 +0100)]
lib: atomlist & atomsort

These two are lock-free linked list implementations, the plain one is
primarily intended for queues while the sorted one is for general data
storage.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: typesafe rb-tree
David Lamparter [Thu, 31 Jan 2019 03:25:38 +0000 (04:25 +0100)]
lib: typesafe rb-tree

Typesafe red-black tree, built out of the OpenBSD implementation and the
macro soup layered on top.  API compatible with skiplists & simple
lists.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agolib: typesafe lists, skiplist & hash
David Lamparter [Thu, 31 Jan 2019 00:09:13 +0000 (01:09 +0100)]
lib: typesafe lists, skiplist & hash

By the power of the C preprocessor, these macros provide type-safe
warppers for simple lists, skiplists and hash tables.  Also, by changing
the instantiation macro, it is easily possible to switch between
algorithms;  the code itself does not need to be changed since the API
is identical across all algorithms.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agovtysh: Fixup exit nexthop-group to include sharpd
Donald Sharp [Sat, 27 Apr 2019 14:09:05 +0000 (14:09 +0000)]
vtysh: Fixup exit nexthop-group to include sharpd

The exit of the nexthop-group should know about sharpd

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4209 from dslicenc/zebra-nexthop-update-flag
Mark Stapp [Fri, 26 Apr 2019 18:33:19 +0000 (14:33 -0400)]
Merge pull request #4209 from dslicenc/zebra-nexthop-update-flag

zebra: resolve issue with protocol route-map not applied properly

5 years agozebra: resolve issue with protocol route-map not applied properly
Don Slice [Wed, 24 Apr 2019 17:14:57 +0000 (17:14 +0000)]
zebra: resolve issue with protocol route-map not applied properly

Problem reported that route-maps applied to "ip protocol table bgp"
would not be invoked if the ip protocol table command was issued
after the bgp prefixes were installed.  Found that a recent change
improving how often nexthop_active_update runs missed causing this
filtering to be applied. This fix resolves that issue as well as
a couple of other places that were problematic with the recent
change.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agoMerge pull request #4201 from Orange-OpenSource/SR-isis
Russ White [Fri, 26 Apr 2019 14:42:29 +0000 (10:42 -0400)]
Merge pull request #4201 from Orange-OpenSource/SR-isis

Issue #4032: Add IS-IS-TE support per Area

5 years agoisisd: Correct MPLS-TE CLI to new northbound API
Olivier Dugeon [Fri, 26 Apr 2019 09:20:02 +0000 (11:20 +0200)]
isisd: Correct MPLS-TE CLI to new northbound API

Due to recent modification in northbound API, replace
yang_dnode_get_entry() call by nb_running_get_entry() call.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
5 years agoMerge pull request #4205 from donaldsharp/pim_more_flags
Russ White [Thu, 25 Apr 2019 22:56:22 +0000 (18:56 -0400)]
Merge pull request #4205 from donaldsharp/pim_more_flags

pimd: Add missing flags to json output

5 years agoMerge pull request #4204 from dslicenc/frr-reload-bfd-timers
Russ White [Thu, 25 Apr 2019 22:55:42 +0000 (18:55 -0400)]
Merge pull request #4204 from dslicenc/frr-reload-bfd-timers

tools: frr-reload.py stop bouncing peers on bfd timer change

5 years agoMerge pull request #4155 from pguibert6WIND/bfd_increase_config
Russ White [Thu, 25 Apr 2019 22:48:35 +0000 (18:48 -0400)]
Merge pull request #4155 from pguibert6WIND/bfd_increase_config

bfdd: avoid having bfd config inherited from operation context

5 years agoMerge pull request #4145 from pguibert6WIND/bfd_converge_up
Russ White [Thu, 25 Apr 2019 22:44:50 +0000 (18:44 -0400)]
Merge pull request #4145 from pguibert6WIND/bfd_converge_up

BFD speed convergence up

5 years agoMerge pull request #4140 from ton31337/fix/do_not_send_notification_again_with_invali...
Russ White [Thu, 25 Apr 2019 22:43:10 +0000 (18:43 -0400)]
Merge pull request #4140 from ton31337/fix/do_not_send_notification_again_with_invalid_nlri

bgpd: Do not send UPDATE message with maximum-prefix

5 years agoMerge pull request #4126 from karamalla0406/4113
Russ White [Thu, 25 Apr 2019 22:40:52 +0000 (18:40 -0400)]
Merge pull request #4126 from karamalla0406/4113

zebra: L3VNI's are allowed to unconfigure from any VRF

5 years agoMerge pull request #4200 from ton31337/fix/add_alias_for_force_next-hop
Russ White [Thu, 25 Apr 2019 22:22:31 +0000 (18:22 -0400)]
Merge pull request #4200 from ton31337/fix/add_alias_for_force_next-hop

bgpd: Make sure `next-hop-self all` backward compatible with force

5 years agoMerge pull request #4203 from opensourcerouting/bfd-fix-src-port
Mark Stapp [Thu, 25 Apr 2019 19:18:29 +0000 (15:18 -0400)]
Merge pull request #4203 from opensourcerouting/bfd-fix-src-port

bfdd: fix UDP source port range

5 years agotools: frr-reload.py stop bouncing peers on bfd timer change
Don Slice [Tue, 23 Apr 2019 14:54:56 +0000 (10:54 -0400)]
tools: frr-reload.py stop bouncing peers on bfd timer change

Problem reported that if a bgp neighbor had a bfd timer change
made in frr.conf and systemctl reload frr performed, the neighbor
with the timer changed bounced.  If the change is made in vtysh
by just adding the new timer values, no peer bounce occurs.  This
fix skips the delete part of the delete/add process in frr-reload
so the peers stay up.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agobfdd: fix UDP source port range
Rafael Zalamena [Thu, 25 Apr 2019 17:41:44 +0000 (14:41 -0300)]
bfdd: fix UDP source port range

RFC 5881 Section 4 tells us that the BFD source port must be between
49152 and 65535 inclusive.

Spotted by Lucian Cristian.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agoisisd: Add IS-IS-TE support per Area
Olivier Dugeon [Mon, 15 Apr 2019 14:11:40 +0000 (16:11 +0200)]
isisd: Add IS-IS-TE support per Area

Solve issue #4032

 - Change MPLS-TE from global to per Area
 - Add new mpls_te_area structure to area in replacement of global variable
isisMPLS_TE
 - Move mpls-te from global to instance in frr-isisd.yang
 - Change code in isis_te.c, isis_northbound.c, isis_cli.c, isis_pdu.c,
isis_lsp.c and isis_zebra.c accordingly

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
5 years agobgpd: Make sure `next-hop-self all` backward compatible with force
Donatas Abraitis [Thu, 25 Apr 2019 13:39:49 +0000 (16:39 +0300)]
bgpd: Make sure `next-hop-self all` backward compatible with force

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agozebra: Modify how we display/store os description
Donald Sharp [Sat, 27 Apr 2019 23:55:21 +0000 (19:55 -0400)]
zebra: Modify how we display/store os description

The alias/description of an interface in linux was being
used to override the internal description.  As such let's
fix the display to keep track of both if we have it.

Config in FRR:
!
interface docker0
 description another combination
!
interface enp3s0
 description BAMBOOZLE ME WILL YOU
!

Config in linux:
sharpd@robot ~/f/zebra> ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    alias This is the loopback you cabbage
2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 74:d0:2b:9c:16:eb brd ff:ff:ff:ff:ff:ff
    alias HI HI HI

Now the 'show int descr' command:
robot# show int description
Interface       Status  Protocol  Description
docker0         up      down      another combination
enp3s0          up      up        BAMBOOZLE ME WILL YOU
                                  HI HI HI
lo              up      up        This is the loopback you cabbage

Fixes: #4191
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>