]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 years agoMerge pull request #2602 from pacovn/PVS-Studio_element_overflow
Quentin Young [Thu, 5 Jul 2018 21:49:49 +0000 (17:49 -0400)]
Merge pull request #2602 from pacovn/PVS-Studio_element_overflow

bgpd zebra: element overflow (PVS-Studio)

5 years agoMerge pull request #2623 from pacovn/PVS-Studio_memcpy_source_underflow
Quentin Young [Thu, 5 Jul 2018 21:41:25 +0000 (17:41 -0400)]
Merge pull request #2623 from pacovn/PVS-Studio_memcpy_source_underflow

ldpd: buffer underflow, thread safety (PVS-Studio)

5 years agoMerge pull request #2568 from pguibert6WIND/doc_mpls
Quentin Young [Thu, 5 Jul 2018 18:56:34 +0000 (14:56 -0400)]
Merge pull request #2568 from pguibert6WIND/doc_mpls

doc: add MPLS configuration commands

5 years agoMerge pull request #2624 from donaldsharp/PIM_ZOMILY_ZOM
Jafar Al-Gharaibeh [Wed, 4 Jul 2018 23:42:51 +0000 (18:42 -0500)]
Merge pull request #2624 from donaldsharp/PIM_ZOMILY_ZOM

pimd: Use generated interface name

5 years agodoc: add MPLS configuration commands
Philippe Guibert [Wed, 27 Jun 2018 13:17:36 +0000 (15:17 +0200)]
doc: add MPLS configuration commands

Add MPLS information to statically handle label from zebra.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agopimd: Use generated interface name
Donald Sharp [Wed, 4 Jul 2018 01:31:11 +0000 (21:31 -0400)]
pimd: Use generated interface name

When we have a generated interface name, use it instead of the actual
pointer.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #2614 from rtrlib/2018-07-02-master-bugfix
Donald Sharp [Wed, 4 Jul 2018 00:32:30 +0000 (20:32 -0400)]
Merge pull request #2614 from rtrlib/2018-07-02-master-bugfix

bgpd: fix rpki validation for ipv6 (master)

5 years agoldpd: buffer underflow, thread safety (PVS-Studio)
F. Aragon [Tue, 3 Jul 2018 18:07:25 +0000 (20:07 +0200)]
ldpd: buffer underflow, thread safety (PVS-Studio)

This commit fixes two issues:
- memcpy() using containers of different sizes when using addr2sa(), mixing
  'struct sockaddr_storage' and 'union sockunion'.
- addr2sa() function not being thread safe (using a local static variable as
  container.

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoMerge pull request #2620 from pacovn/PVS-Studio_null_check_2
Quentin Young [Tue, 3 Jul 2018 21:38:09 +0000 (17:38 -0400)]
Merge pull request #2620 from pacovn/PVS-Studio_null_check_2

bgpd lib ospfd pimd ripngd: null chk (PVS-Studio)

5 years agoMerge pull request #2610 from qlyoung/fix-zebra-pthread-crash-shutdown-min
Jafar Al-Gharaibeh [Tue, 3 Jul 2018 20:47:23 +0000 (15:47 -0500)]
Merge pull request #2610 from qlyoung/fix-zebra-pthread-crash-shutdown-min

zebra: remove asserts on task nullity

5 years agoMerge pull request #2619 from pguibert6WIND/show_ipv6_bgp_wrong
Jafar Al-Gharaibeh [Tue, 3 Jul 2018 15:47:27 +0000 (10:47 -0500)]
Merge pull request #2619 from pguibert6WIND/show_ipv6_bgp_wrong

doc: bgp wrong command displayed

5 years agoMerge pull request #2615 from chiragshah6/evpn_dev
Lou Berger [Tue, 3 Jul 2018 15:45:53 +0000 (11:45 -0400)]
Merge pull request #2615 from chiragshah6/evpn_dev

bgpd: l3vni del to free ip prefix routes from vrf

5 years agodoc: clean up flowspec.rst
Quentin Young [Mon, 2 Jul 2018 19:22:12 +0000 (19:22 +0000)]
doc: clean up flowspec.rst

* Fix broken citations
* Remove trailing whitespace
* Rewrap to 80 lines
* Tweak capitalization of section headers
* Clean up a few indented blocks

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #2598 from dslicenc/cm21429-vrf-dup
Lou Berger [Tue, 3 Jul 2018 15:39:38 +0000 (11:39 -0400)]
Merge pull request #2598 from dslicenc/cm21429-vrf-dup

zebra: duplicate nexthops for cross-vrf static routes on vrf bounce

5 years agoMerge pull request #2599 from pacovn/PVS-Studio_Array_overrun
Lou Berger [Tue, 3 Jul 2018 15:37:34 +0000 (11:37 -0400)]
Merge pull request #2599 from pacovn/PVS-Studio_Array_overrun

ospfd zebra: array overrun fixes (PVS-Studio)

5 years agobgpd: fix rpki validation for ipv6
Marcel Röthke [Thu, 12 Apr 2018 12:13:07 +0000 (14:13 +0200)]
bgpd: fix rpki validation for ipv6

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
5 years agobgpd lib ospfd pimd ripngd: null chk (PVS-Studio)
F. Aragon [Tue, 3 Jul 2018 13:39:50 +0000 (15:39 +0200)]
bgpd lib ospfd pimd ripngd: null chk (PVS-Studio)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agodoc: bgp wrong command displayed
Philippe Guibert [Tue, 3 Jul 2018 13:01:21 +0000 (15:01 +0200)]
doc: bgp wrong command displayed

This command does not exist. Move it to the right one.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agoospfd zebra: array overrun fixes (PVS-Studio)
F. Aragon [Mon, 2 Jul 2018 14:30:40 +0000 (16:30 +0200)]
ospfd zebra: array overrun fixes (PVS-Studio)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoMerge pull request #2516 from rubenk/more-spec-cleanups
Martin Winter [Tue, 3 Jul 2018 07:32:57 +0000 (00:32 -0700)]
Merge pull request #2516 from rubenk/more-spec-cleanups

More spec cleanups

5 years agoMerge pull request #2609 from pacovn/clang_scan_nhrpd_vici_initialization
Donald Sharp [Mon, 2 Jul 2018 22:49:49 +0000 (18:49 -0400)]
Merge pull request #2609 from pacovn/clang_scan_nhrpd_vici_initialization

nhrpd: uninitialized variable (Clang scan)

5 years agobgpd: l3vni del to free ip prefix routes from vrf
Chirag Shah [Sat, 30 Jun 2018 06:58:54 +0000 (23:58 -0700)]
bgpd: l3vni del to free ip prefix routes from vrf

In Symmetric routing case, L3VNI stores evpn MAC_IP routes
as IP_PREFIX routes in associated bgp_vrf and fib.

When vxlan device for l3vni goes down, triggers l3vni delete
in bgp.
As part l3vni delete, evpn ip prefix routes associated
with the vni need to be withdrawn from zebra as well
bgpinfo needs to be freed.
bgp_delete does not free bgp_info associated
to evpn ip prefix routes (link to bgp_vrf).
Call to uninstall_evpn_route_entry_in_vrf() properly
cleanup bgp_info as well triggers appropriate updates.

Ticket:CM-21443
Testing Done:
On DUT, bringup symmetric routing configuration, learn
EVPN Type-2 and Type-3 Routes.
Type-2 MAC_IP routes will be stored as ip_prefix in vrf table
during l3vni bring up.

Remove L3vni, deletes all ip_prefix routes from the zebra, kernel
vrf route table and bgp_info is freed.

Check the show bgp memory stats for bgp_info post l3vni flap.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agoMerge pull request #2604 from pacovn/PVS-Studio_odd_operator_usage
Quentin Young [Mon, 2 Jul 2018 18:18:26 +0000 (14:18 -0400)]
Merge pull request #2604 from pacovn/PVS-Studio_odd_operator_usage

nhrpd: odd operator usage fix (PVS-Studio)

5 years agoMerge pull request #2603 from pacovn/PVS-Studio_format_warnings
Quentin Young [Mon, 2 Jul 2018 18:15:43 +0000 (14:15 -0400)]
Merge pull request #2603 from pacovn/PVS-Studio_format_warnings

eigrpd nhrpd ospfd pimd: fomat fixes (PVS-Studio)

5 years agonhrpd: uninitialized variable (Clang scan)
F. Aragon [Mon, 2 Jul 2018 18:07:59 +0000 (20:07 +0200)]
nhrpd: uninitialized variable (Clang scan)

Fix over 0a939f4f24fa34fea688482fbf57fb16eaf2a081 (there was a case not
covered by previous fix)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agozebra: remove asserts on task nullity
Quentin Young [Mon, 2 Jul 2018 18:07:28 +0000 (18:07 +0000)]
zebra: remove asserts on task nullity

While ZAPI I/O threads make a best effort to kill any scheduled tasks on
their threadmasters, after death another pthread can continue to
schedule onto the threadmaster. This isn't a problem per se since the
tasks will never run, but it also means that asserting that it hasn't
happened is pointless.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agobgpd zebra: element overflow (PVS-Studio)
F. Aragon [Mon, 2 Jul 2018 15:05:17 +0000 (17:05 +0200)]
bgpd zebra: element overflow (PVS-Studio)

The warning given by PVS-Studio is related to per-element overflow (there is
no real overflow, because of how elements are mapped in the union). This
same warning is typically reported by Coverity, too.

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoMerge pull request #2601 from pacovn/PVS-Studio_scope_overlap
Donald Sharp [Mon, 2 Jul 2018 16:44:10 +0000 (12:44 -0400)]
Merge pull request #2601 from pacovn/PVS-Studio_scope_overlap

ripngd: variable scope overlap fix (PVS-Studio)

5 years agoMerge pull request #2600 from pacovn/PVS-Studio_sizeof_and_dead_code
Quentin Young [Mon, 2 Jul 2018 16:41:34 +0000 (12:41 -0400)]
Merge pull request #2600 from pacovn/PVS-Studio_sizeof_and_dead_code

eigrpd: sizeof() usage + dead code (PVS-Studio)

5 years agoeigrpd nhrpd ospfd pimd: fomat fixes (PVS-Studio)
F. Aragon [Mon, 2 Jul 2018 15:32:05 +0000 (17:32 +0200)]
eigrpd nhrpd ospfd pimd: fomat fixes (PVS-Studio)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoMerge pull request #2533 from pguibert6WIND/doc_flowspec
Quentin Young [Mon, 2 Jul 2018 15:42:22 +0000 (11:42 -0400)]
Merge pull request #2533 from pguibert6WIND/doc_flowspec

doc: add flowspec information from user point of view

5 years agonhrpd: odd operator usage fix (PVS-Studio)
F. Aragon [Mon, 2 Jul 2018 15:37:23 +0000 (17:37 +0200)]
nhrpd: odd operator usage fix (PVS-Studio)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoripngd: variable scope overlap fix (PVS-Studio)
F. Aragon [Mon, 2 Jul 2018 14:53:16 +0000 (16:53 +0200)]
ripngd: variable scope overlap fix (PVS-Studio)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoeigrpd: sizeof() usage + dead code (PVS-Studio)
F. Aragon [Mon, 2 Jul 2018 14:44:46 +0000 (16:44 +0200)]
eigrpd: sizeof() usage + dead code (PVS-Studio)

Two issues:

1) Removed an unnecesary null check of 'ei'
2) Fixed the usage of sizeof(), as it was used the size of a pointer instead
   of the size of the structure

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agozebra: duplicate nexthops for cross-vrf static routes on vrf bounce
Don Slice [Wed, 27 Jun 2018 16:35:55 +0000 (16:35 +0000)]
zebra: duplicate nexthops for cross-vrf static routes on vrf bounce

Problem created by the fix for cm-21306 (inactive cross-vrf static routes
when vrfs were bounced.)  Determined that in another case, that fix would
cause duplicate nexthops to appear in the table. Resolved the problem by
removing the vrf static route process from the zebra "add" process leaving
it in the zebra " if up" process as added in cm-21306 since that's the point
that the vrf device is now functional.

Ticket: CM-21429
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agodoc: fix missing bgp keyword in debug bgp command
Philippe Guibert [Thu, 28 Jun 2018 06:41:35 +0000 (08:41 +0200)]
doc: fix missing bgp keyword in debug bgp command

Some debug bgp commands were missing bgp keyword.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agodoc: add flowspec information from user point of view
Philippe Guibert [Fri, 22 Jun 2018 15:37:29 +0000 (17:37 +0200)]
doc: add flowspec information from user point of view

Add some information for BGP flowspec.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agoMerge pull request #2475 from LabNConsulting/working/master/no_vrf_socket_4l3mdev
Russ White [Mon, 2 Jul 2018 03:06:22 +0000 (23:06 -0400)]
Merge pull request #2475 from LabNConsulting/working/master/no_vrf_socket_4l3mdev

Don't open per vrf sockets when net.ipv4.tcp|udp_l3mdev_accept != 0

5 years agoMerge pull request #2593 from rtrlib/2018-07-01-master-bugfix
Donald Sharp [Sun, 1 Jul 2018 23:40:57 +0000 (19:40 -0400)]
Merge pull request #2593 from rtrlib/2018-07-01-master-bugfix

bgpd: fix rpki segfault

5 years agobgpd: fix rpki segfault
Marcel Röthke [Sun, 1 Jul 2018 20:54:51 +0000 (22:54 +0200)]
bgpd: fix rpki segfault

If a cache server was added after rpki was started it's tr_socket would
not be initialized. This would lead to a segfault if the rtr manager
ever decides to switch to that socket or if rpki support is stopped.

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
5 years agoMerge pull request #2592 from tigranmartirosyan/master
Donald Sharp [Sat, 30 Jun 2018 13:26:22 +0000 (09:26 -0400)]
Merge pull request #2592 from tigranmartirosyan/master

fixed #2567: Json status of BGP peer is not updated properly

5 years agofixed #2567: Json status of BGP peer is not updated properly
Tigran Martirosyan [Sat, 30 Jun 2018 12:27:25 +0000 (16:27 +0400)]
fixed #2567: Json status of BGP peer is not updated properly

5 years agoMerge pull request #2574 from pacovn/Coverity_1399202_Copy-paste_error
Russ White [Fri, 29 Jun 2018 22:35:12 +0000 (18:35 -0400)]
Merge pull request #2574 from pacovn/Coverity_1399202_Copy-paste_error

bgpd: copy-paste error (Coverity 1399202)

5 years agoMerge pull request #2582 from donaldsharp/work_smarter_not_slower
Russ White [Fri, 29 Jun 2018 22:18:34 +0000 (18:18 -0400)]
Merge pull request #2582 from donaldsharp/work_smarter_not_slower

bgpd: Remove HAVE_CUMULUS from evpn commands

5 years agoMerge pull request #2588 from pacovn/Clang_dereference1
Russ White [Fri, 29 Jun 2018 22:12:48 +0000 (18:12 -0400)]
Merge pull request #2588 from pacovn/Clang_dereference1

bgpd isisd: null check (Clang scan)

5 years agoMerge pull request #2577 from pacovn/Coverity_1399377_Structurally_dead_code
Quentin Young [Fri, 29 Jun 2018 21:08:58 +0000 (17:08 -0400)]
Merge pull request #2577 from pacovn/Coverity_1399377_Structurally_dead_code

bgpd: dead code (Coverity 1399377)

5 years agobgpd: dead code (Coverity 1399377)
F. Aragon [Thu, 28 Jun 2018 14:09:21 +0000 (16:09 +0200)]
bgpd: dead code (Coverity 1399377)

Replacing "continue" with "break" because the loop is a "while (0)"

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoMerge pull request #2517 from pguibert6WIND/flowspec_other_options
Russ White [Fri, 29 Jun 2018 17:45:44 +0000 (13:45 -0400)]
Merge pull request #2517 from pguibert6WIND/flowspec_other_options

Flowspec support other options

5 years agoMerge pull request #2532 from donaldsharp/various_stuff
Jafar Al-Gharaibeh [Fri, 29 Jun 2018 17:41:02 +0000 (12:41 -0500)]
Merge pull request #2532 from donaldsharp/various_stuff

Redistribution and some extra developer debug code

5 years agoMerge pull request #2583 from donaldsharp/more_warnings
Russ White [Fri, 29 Jun 2018 17:39:42 +0000 (13:39 -0400)]
Merge pull request #2583 from donaldsharp/more_warnings

zebra: Fix use of uninited variable

5 years agoMerge pull request #2581 from qlyoung/fix-vtysh-autocomplete
Russ White [Fri, 29 Jun 2018 17:31:21 +0000 (13:31 -0400)]
Merge pull request #2581 from qlyoung/fix-vtysh-autocomplete

vtysh: fix autocomplete garbage printouts

5 years agoMerge pull request #2578 from pacovn/Coverity_1453455_Dereference_null_return_value
Russ White [Fri, 29 Jun 2018 17:28:28 +0000 (13:28 -0400)]
Merge pull request #2578 from pacovn/Coverity_1453455_Dereference_null_return_value

bgpd: null check (Coverity 1453455)

5 years agoMerge pull request #2573 from pacovn/Coverity_23065_Explicit_null_dereferenced
Russ White [Fri, 29 Jun 2018 17:27:04 +0000 (13:27 -0400)]
Merge pull request #2573 from pacovn/Coverity_23065_Explicit_null_dereferenced

bgpd: null check (Coverity 23065)

5 years agoMerge pull request #2514 from pacovn/Coverity_1462467_1465497_Control_flow_issues
Russ White [Fri, 29 Jun 2018 17:24:42 +0000 (13:24 -0400)]
Merge pull request #2514 from pacovn/Coverity_1462467_1465497_Control_flow_issues

zebra: control flow issues (Coverity 1462467 1465497)

5 years agoMerge pull request #2586 from pacovn/clang_scan_nhrpd_vici_initialization
Quentin Young [Fri, 29 Jun 2018 16:55:55 +0000 (12:55 -0400)]
Merge pull request #2586 from pacovn/clang_scan_nhrpd_vici_initialization

nhrpd: uninitialized variable (Clang scan)

5 years agoMerge pull request #2587 from pacovn/Clang_scan_dead_code
Quentin Young [Fri, 29 Jun 2018 16:18:38 +0000 (12:18 -0400)]
Merge pull request #2587 from pacovn/Clang_scan_dead_code

isisd zebra: dead code (Clang scan)

5 years agobgpd isisd: null check (Clang scan)
F. Aragon [Fri, 29 Jun 2018 15:14:23 +0000 (17:14 +0200)]
bgpd isisd: null check (Clang scan)

This correction fixes three bugs detected by Clang scan:

Bug Group: Logic error
Bug Type: Dereference of null pointer

File: bgpd/bgp_evpn.c
Function: bgp_evpn_unconfigure_import_rt_for_vrf
Line: 4246

File: isisd/isis_spf.c
Function: isis_print_paths
Line: 69 (two bugs of same type in one line)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoMerge pull request #2562 from pacovn/Coverity_1221444_1221446_Out-of-bounds_read
Jafar Al-Gharaibeh [Fri, 29 Jun 2018 15:48:33 +0000 (10:48 -0500)]
Merge pull request #2562 from pacovn/Coverity_1221444_1221446_Out-of-bounds_read

ospf6d: OoB read (Coverity 1221444 1221446)

5 years agoisisd zebra: dead code (Clang scan)
F. Aragon [Fri, 29 Jun 2018 15:01:29 +0000 (17:01 +0200)]
isisd zebra: dead code (Clang scan)

This correction fixes two bugs detected by Clang scan:

Bug Group: Dead store

Bug Type: Dead assignment
File: zebra/kernel_netlink.c
Function: netlink_parse_extended_ack
Line: 548

Bug Type: Dead increment
File: isisd/isis_lsp.c
Function: lsp_bits2string
Line: 625

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agonhrpd: uninitialized variable (Clang scan)
F. Aragon [Fri, 29 Jun 2018 14:51:08 +0000 (16:51 +0200)]
nhrpd: uninitialized variable (Clang scan)

This correction fixes two bugs detected by Clang scan:

Bug Group: Logic error
Bug Type: Assigned value is garbage or undefined
File: nhrpd/vici.c
Function: vici_parse_message
Lines: 100, 105

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoMerge pull request #2575 from pacovn/Coverity_1399219_Copy-paste_error
Donald Sharp [Fri, 29 Jun 2018 15:17:52 +0000 (11:17 -0400)]
Merge pull request #2575 from pacovn/Coverity_1399219_Copy-paste_error

bgpd: copy-paste error (Coverity 1399219)

5 years agobgpd: null check (Coverity 1453455)
F. Aragon [Thu, 28 Jun 2018 14:16:35 +0000 (16:16 +0200)]
bgpd: null check (Coverity 1453455)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agobgpd: null check (Coverity 23065)
paco [Thu, 28 Jun 2018 13:21:00 +0000 (15:21 +0200)]
bgpd: null check (Coverity 23065)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoospf6d: OoB read (Coverity 1221444 1221446)
paco [Wed, 27 Jun 2018 09:47:57 +0000 (11:47 +0200)]
ospf6d: OoB read (Coverity 1221444 1221446)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agobgpd: Add some asserts because of our linklist stuff
Donald Sharp [Fri, 29 Jun 2018 02:33:35 +0000 (22:33 -0400)]
bgpd: Add some asserts because of our linklist stuff

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Fix use of uninited variable
Donald Sharp [Fri, 29 Jun 2018 01:06:23 +0000 (21:06 -0400)]
zebra: Fix use of uninited variable

Allow compiler to think the value is actually set to
something useful in an impossible case.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Fix some build issues from removing HAVE_CUMULUS
Donald Sharp [Fri, 29 Jun 2018 00:57:36 +0000 (20:57 -0400)]
bgpd: Fix some build issues from removing HAVE_CUMULUS

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Use correct data size
Donald Sharp [Fri, 29 Jun 2018 00:45:32 +0000 (20:45 -0400)]
bgpd: Use correct data size

a vni_t is 32 bit, so we only need to use a normal
integer for json commands.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Remove HAVE_CUMULUS from evpn commands
Donald Sharp [Tue, 19 Jun 2018 18:12:18 +0000 (14:12 -0400)]
bgpd: Remove HAVE_CUMULUS from evpn commands

In order to make EVPN behavior work without special casing
the code, bring the evpn commands under HAVE_CUMULUS into
the fold.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #2561 from pacovn/Coverity_1399231_Logically_dead_code
Jafar Al-Gharaibeh [Thu, 28 Jun 2018 19:48:17 +0000 (14:48 -0500)]
Merge pull request #2561 from pacovn/Coverity_1399231_Logically_dead_code

lib ospf6d: dead code (Coverity 1399231)

5 years agovtysh: fix autocomplete garbage printouts
Quentin Young [Thu, 28 Jun 2018 18:37:01 +0000 (18:37 +0000)]
vtysh: fix autocomplete garbage printouts

The semantics for suppressing output received from daemons changed
slightly when pipe actions were introduced, causing raw autocomplete
output to be printed where it shouldn't have been.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #2576 from pacovn/Coverity_1399228_Logically_dead_code
Quentin Young [Thu, 28 Jun 2018 16:55:25 +0000 (12:55 -0400)]
Merge pull request #2576 from pacovn/Coverity_1399228_Logically_dead_code

bgpd: dead code (Coverity 1399228)

5 years agoMerge pull request #2572 from pacovn/Coverity_1399203_Unchecked_return_value
Quentin Young [Thu, 28 Jun 2018 16:35:58 +0000 (12:35 -0400)]
Merge pull request #2572 from pacovn/Coverity_1399203_Unchecked_return_value

bgpd: return value (Coverity 1399203)

5 years agoMerge pull request #2579 from pacovn/Coverity_1424370_Unchecked_return_value_from_library
Quentin Young [Thu, 28 Jun 2018 16:25:45 +0000 (12:25 -0400)]
Merge pull request #2579 from pacovn/Coverity_1424370_Unchecked_return_value_from_library

isisd: return check (Coverity 1424370)

5 years agoMerge pull request #2580 from pacovn/Coverity_1424529_Dereference_after_null_check
Quentin Young [Thu, 28 Jun 2018 16:23:56 +0000 (12:23 -0400)]
Merge pull request #2580 from pacovn/Coverity_1424529_Dereference_after_null_check

isisd: null check (Coverity 1424529)

5 years agoisisd: null check (Coverity 1424529)
F. Aragon [Thu, 28 Jun 2018 14:48:37 +0000 (16:48 +0200)]
isisd: null check (Coverity 1424529)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoisisd: return check (Coverity 1424370)
F. Aragon [Thu, 28 Jun 2018 14:31:37 +0000 (16:31 +0200)]
isisd: return check (Coverity 1424370)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agobgpd: dead code (Coverity 1399228)
paco [Thu, 28 Jun 2018 13:56:29 +0000 (15:56 +0200)]
bgpd: dead code (Coverity 1399228)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agobgpd: copy-paste error (Coverity 1399219)
paco [Thu, 28 Jun 2018 13:39:59 +0000 (15:39 +0200)]
bgpd: copy-paste error (Coverity 1399219)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agobgpd: copy-paste error (Coverity 1399202)
paco [Thu, 28 Jun 2018 13:31:38 +0000 (15:31 +0200)]
bgpd: copy-paste error (Coverity 1399202)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agobgpd: return value (Coverity 1399203)
paco [Thu, 28 Jun 2018 10:41:52 +0000 (12:41 +0200)]
bgpd: return value (Coverity 1399203)

The return value can be ignored because in case of error both the 'afi'
and 'safi' variables are set to the invalid values (AFI_MAX, SAFI_MAX),
and the invalid values are handled properly afterwards in the 'default'
blocks.

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoospf6d: dead code (Coverity 1399231)
paco [Tue, 26 Jun 2018 19:19:11 +0000 (21:19 +0200)]
ospf6d: dead code (Coverity 1399231)

It should have the same behavior when debug not enabled, and slightly
different behavior when debug enabled (previously dead code now should
show debug messages in debug mode)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agobgpd: rework enumerate function, handle not values
Philippe Guibert [Fri, 22 Jun 2018 07:17:04 +0000 (09:17 +0200)]
bgpd: rework enumerate function, handle not values

The handling of reverse values is in a separate function.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobgpd: add an icmp flag for flowspec icmp entries
Philippe Guibert [Thu, 21 Jun 2018 10:29:18 +0000 (12:29 +0200)]
bgpd: add an icmp flag for flowspec icmp entries

Some values for icmp type/code can not be encoded like port source or
port destination. This is the case of 0 value that is authorized for
icmp.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobgpd: rework icmp enumerate list
Philippe Guibert [Wed, 20 Jun 2018 14:59:17 +0000 (16:59 +0200)]
bgpd: rework icmp enumerate list

As the other enumerate list, icmp type and code are handled as the other
combinations. The icmp type and code options are the last options to be
injected into PBR. If icmp type is present only, all the filtering will
apply to this icmp type. if icmp code is present only, then all the
combination will be done with icmp type ranging from 0 to 255 values.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobgpd: fix recursive call combination
Philippe Guibert [Wed, 20 Jun 2018 13:30:40 +0000 (15:30 +0200)]
bgpd: fix recursive call combination

The recursive algorithm was taking into account the fact that all the
bpof structures were filled in. Because the dscp value was not given,
the pkt_len parsing could not be achieved. Now the iteration takes into
account each type according to the previous one, thus guaranting all
parameters to be parsed.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agozebra: handle policy routing fragment handling
Philippe Guibert [Wed, 20 Jun 2018 12:06:31 +0000 (14:06 +0200)]
zebra: handle policy routing fragment handling

incoming iptable entries with fragment parameter is handled.
An iptable context is created for each fragment value received from BGP.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobgpd: support for flowspec fragment list into policy routing
Philippe Guibert [Wed, 20 Jun 2018 11:55:20 +0000 (13:55 +0200)]
bgpd: support for flowspec fragment list into policy routing

The flowspec fragment attribute is taken into account to be pushed in
BGP policy routing entries. Valid values are enumerate list of 1, 2, 4,
or 8 values. no combined value is supported yet.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobgpd: align fragment flowspec decoding with tcpflags
Philippe Guibert [Wed, 20 Jun 2018 06:32:43 +0000 (08:32 +0200)]
bgpd: align fragment flowspec decoding with tcpflags

As fragment bitmask and tcpflags bitmask in flowspec protocol is encoded
in the same way, it is not necessary to differentiate those two fields.
Moreover, it overrides the initial fragment limit set to 1. It is now
possible to handle multiple framgent values.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobgpd: support for enumerate pkt len
Philippe Guibert [Tue, 19 Jun 2018 14:02:55 +0000 (16:02 +0200)]
bgpd: support for enumerate pkt len

The packet length can be injected from fs entry with an enumerate list;
the negation of the value is also taken into account.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobgpd: introduce recursive operations for or flowspec operations
Philippe Guibert [Tue, 19 Jun 2018 13:02:26 +0000 (15:02 +0200)]
bgpd: introduce recursive operations for or flowspec operations

So as to add or remove entries with flowspec or operations like tcp
flags or dscp enum list, a mechanism is put in place that adds
recursivity.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobgpd: enumerate support for dscp values
Philippe Guibert [Tue, 19 Jun 2018 13:02:15 +0000 (15:02 +0200)]
bgpd: enumerate support for dscp values

If one dscp value or an enumerate list of or values of dscp are
provided, then the bgp pbr entries created will take into account the
dscp values.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agozebra: add show pbr iptable dscp information
Philippe Guibert [Tue, 19 Jun 2018 12:54:59 +0000 (14:54 +0200)]
zebra: add show pbr iptable dscp information

The iptable configured with dscp displays the dscp value configured.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years ago*: add flowspec dscp handling
Philippe Guibert [Wed, 13 Jun 2018 09:59:07 +0000 (11:59 +0200)]
*: add flowspec dscp handling

Only one dscp value is accepted as filtering option.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobgpd: add a parameter to handle param or combinations
Philippe Guibert [Mon, 18 Jun 2018 09:52:19 +0000 (11:52 +0200)]
bgpd: add a parameter to handle param or combinations

Before adding/removing to zebra, flowspec entries parses the list of
combinations or avaialble and creates contexts in order to be injected
to zebra.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobgpd: use a bgp_pbr_or_filter structure to host tcpflags combinations
Philippe Guibert [Mon, 18 Jun 2018 09:50:16 +0000 (11:50 +0200)]
bgpd: use a bgp_pbr_or_filter structure to host tcpflags combinations

tcp flags combinations ( or enumerates)  are hosted in a structure that
will be analysed later, when wanting to inject that information to
zebra.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobgpd: extend enumerate API to handle or operations
Philippe Guibert [Mon, 18 Jun 2018 09:18:21 +0000 (11:18 +0200)]
bgpd: extend enumerate API to handle or operations

The flowspec enumerate list can either be and values or or values.
In the latter case, a list is created that will be used later.
Also, the API supports the check for both and or or operations. This API
does not permit to handle both and and or operations at the same time.
The list will have to be either and or or. An other API retrieves the
operator unary value that is used: and or or. or 0 is the two operators
are used at the same time.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobgpd: do not add default route for flowspec for each FS entry
Philippe Guibert [Wed, 13 Jun 2018 09:56:35 +0000 (11:56 +0200)]
bgpd: do not add default route for flowspec for each FS entry

Because the Flowspec entries are parsed first, then injected to Zebra,
there are cases where the install feedback from zebra is not received.
This leads to unnecessary add route events, whereas one should be
enough.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobgpd, lib: share flags values for iptable configuration
Philippe Guibert [Wed, 13 Jun 2018 09:12:08 +0000 (11:12 +0200)]
bgpd, lib: share flags values for iptable configuration

Those flags can be shared between BGP and Zebra. That is why
those flags are moved to common pbr.h header file.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agozebra: handling of policy routing iptable tcpflags
Philippe Guibert [Tue, 12 Jun 2018 16:32:21 +0000 (18:32 +0200)]
zebra: handling of policy routing iptable tcpflags

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>