Donald Sharp
9e224e60db
lib: Create a thread for reading in the cli
...
The read in of cli was happening prior to thread
event handling for non-integrated configs. This
is interesting for 2 reasons:
1) Read-in of integrated configs was after thread
event loop startup, so we had a difference of behavior
2) Read-in can cause a series of events that cause
us to attempt to communicate with zebra. The zebra
zapi connection only happens after the thread event
loop has been started. This can cause data that
is being written down to zebra to be lost and
no real way to notice that this has happened and
to recover gracefully.
Modify the code to create a thread event for read
in of client config.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-06-19 08:43:59 -04:00
Donald Sharp
573de11fab
lib: Add ability to retry if backup is specified
...
If we fail to read in the config file and we have
specified a backup of the backup, attempt to
read that information.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-06-19 08:43:59 -04:00
Donald Sharp
5ede5e4eed
lib: Add ability to know if we have read anything in
...
When reading the config file add an ability to know
if we have properly read in anything. So that a daemon
can make fallback plans.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-06-19 08:43:59 -04:00
Russ White
05d7e026c8
Merge pull request #2445 from ppmathis/feature/bgp-pg-overrides
...
bgpd: Improve peer-group override implementation
2018-06-19 08:20:31 -04:00
Russ White
4a1f626570
Merge pull request #2450 from ppmathis/bugfix/bgp-filtered-routes
...
bgpd: Fix crash when showing filtered routes
2018-06-19 07:37:42 -04:00
Russ White
8fef257611
Merge pull request #2465 from qlyoung/fix-build-am-cppflags-warning
...
tests: fixup minor autotools nit
2018-06-19 07:31:43 -04:00
Russ White
35169b489d
Merge pull request #2468 from qlyoung/docuser
...
doc: update workflow.rst
2018-06-19 07:31:10 -04:00
Russ White
fc89ac9846
Merge pull request #2470 from chiragshah6/mdev
...
zebra: Hide default vrf instance of l3vni cmd
2018-06-19 07:29:13 -04:00
Russ White
efd1d76673
Merge pull request #2474 from donaldsharp/vty_thread_cancel_writes
...
Add 'show thread poll'
2018-06-19 07:28:18 -04:00
Russ White
e3ea4f7acb
Merge pull request #2478 from pacovn/Coverity_1408766_Dereference_after_null_check
...
bgpd: null check (Coverity 1408766)
2018-06-19 07:21:42 -04:00
Russ White
0ddc9a2d9d
Merge pull request #2479 from dslicenc/zebra-vrf-statics
...
zebra: re-install static routes needed vrf when the vrf intf comes up
2018-06-19 07:19:39 -04:00
Russ White
f071d8b36a
Merge pull request #2481 from pacovn/security_vpn_null_check
...
bgpd: vpn null check
2018-06-19 07:19:00 -04:00
Russ White
9635a16a36
Merge pull request #2483 from pacovn/clang_scan_bgpd_updgrp_deref
...
bgpd: null check (Clang scan-build)
2018-06-19 07:18:13 -04:00
Russ White
5e51ae9816
Merge pull request #2491 from pacovn/cppcheck_no_effect
...
eigrpd, isisd, lib, ospfd: no effect (cppcheck)
2018-06-19 07:15:07 -04:00
Russ White
aa13697bb0
Merge pull request #2492 from pacovn/cppcheck_security1
...
eigrpd, lib, tests, vtysh: security (cppcheck)
2018-06-19 07:14:19 -04:00
paco
6d10727ac1
eigrpd, lib, tests, vtysh: security (cppcheck)
...
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-19 10:40:56 +02:00
paco
5f18adf01b
eigrpd, isisd, lib, ospfd: no effect (cppcheck)
...
Assignment of function parameter has no effect outside the function.
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-19 10:19:05 +02:00
Lou Berger
ed892e530d
Merge pull request #2476 from pacovn/Coverity_1433544_Explicit_null_dereferenced
...
bgpd: null check (Coverity 1433544, 1433543, 1433542)
2018-06-18 16:59:26 -04:00
Donald Sharp
b5e3687b1d
Merge pull request #2482 from pacovn/clang_scan_bgpd_bgp_rpki_deref
...
bgpd: null check (Clang scan-build)
2018-06-18 16:09:56 -04:00
paco
d3e51db069
bgpd: null check (Clang scan-build)
...
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-18 21:37:35 +02:00
Donald Sharp
e8609f7950
Merge pull request #2484 from pacovn/cppcheck_unused_vars
...
eigrpd, lib: unused vars (cppcheck)
2018-06-18 15:27:11 -04:00
Donald Sharp
6f32955ec3
Merge pull request #2486 from pacovn/cppcheck_fmt_validation
...
babeld, lib, ospfd, tests: fmt fixes (cppcheck)
2018-06-18 15:23:49 -04:00
Donald Sharp
2daa80f0c0
Merge pull request #2489 from pacovn/cppcheck_reduntant_pointer_op
...
ldpd: redundant pointer operation (cppcheck)
2018-06-18 15:16:55 -04:00
Donald Sharp
cfa38db146
Merge pull request #2488 from pacovn/cppcheck_nhrpd_limit_check
...
nhrpd: array limit check (cppcheck)
2018-06-18 15:16:34 -04:00
Donald Sharp
b49bc6b010
Merge pull request #2487 from pacovn/cppcheck_redundant_memset
...
ospfd, pimd: redundant memset (cppcheck)
2018-06-18 15:15:46 -04:00
Donald Sharp
162deb7dfb
Merge pull request #2490 from pacovn/cppcheck_unsigned_check
...
babeld, eigrpd, ospfd: unsigned negative check (cppcheck, grouped)
2018-06-18 15:14:07 -04:00
Donald Sharp
c0662bb478
Merge pull request #2417 from pacovn/Coverity_1399373_Structurally_dead_code
...
bgpd: dead code (Coverity 1399373)
2018-06-18 14:29:27 -04:00
paco
d11c6941dc
babeld, eigrpd, ospfd: unsigned negative check
...
After Cppcheck 1.72 feedback
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-18 19:07:24 +02:00
paco
e83c042a88
ldpd: redundant pointer operation (cppcheck)
...
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-18 18:41:57 +02:00
paco
0e3d32f1c9
nhrpd: array limit check (cppcheck)
...
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-18 18:13:41 +02:00
paco
1a36dd60fd
ospfd, pimd: redundant memset (cppcheck)
...
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-18 18:01:59 +02:00
Donald Sharp
36de1d53b8
Merge pull request #2457 from pacovn/Coverity_1465491_Untrusted_value_as_argument
...
pimd: Untrusted val as argument (Coverity 1465491)
2018-06-18 11:55:53 -04:00
Donald Sharp
7c75247f66
Merge pull request #2464 from pacovn/Coverity_1399309_Out-of-bounds_access
...
isisd: out-of-bounds access (Coverity 1399309)
2018-06-18 11:55:16 -04:00
paco
2ec42b858c
babeld, lib, ospfd, tests: fmt fixes (cppcheck)
...
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-18 17:52:56 +02:00
paco
029a775e43
eigrpd, lib, vtysh: unused vars (cppcheck)
...
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-18 17:23:38 +02:00
paco
18b91526fa
bgpd: null check (Clang scan-build)
...
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-18 16:27:02 +02:00
paco
c37a11ad72
bgpd: null chk (Coverity 1433544 1433543 1433542)
...
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-18 16:07:43 +02:00
paco
73aed5841a
bgpd: vpn null check
...
Can be reproduced with following vtysh sequence (an intentionaly wrong
sequence):
['configure terminal\n router bgp 255 vrf l3vrf-6\n',
'configure terminal\n router bgp 255 vrf l3vrf-6\nbgp router-id 10.255.255.1\n',
'configure terminal\n router bgp 255 vrf l3vrf-6\n address-family ipv4\nlabel vpn export 45000\n',
'configure terminal\n router bgp 255 vrf l3vrf-6\n address-family ipv4\nrd vpn export 255:5\n',
'configure terminal\n router bgp 255 vrf l3vrf-6\n address-family ipv4\nredistribute isis\n', 'configure terminal\n router bgp 255 vrf l3vrf-6\n address-family ipv4\nredistribute ospf\n', 'configure terminal\n router bgp 255 vrf l3vrf-6\n address-family ipv4\nredistribute connected\n', 'configure terminal\n router bgp 255 vrf l3vrf-6\n address-family ipv4\nimport vpn\n', 'configure terminal\n router bgp 255 vrf l3vrf-6\n address-family ipv4\nexport vpn\n', 'configure terminal\n router bgp 255 vrf l3vrf-6\n address-family ipv4\nrt vpn import 255:1\n', 'configure terminal\n router bgp 255 vrf l3vrf-6\n address-family ipv4\nrt vpn export 255:1\n'
]
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-18 15:52:57 +02:00
Lou Berger
2868e293e7
Merge pull request #2466 from pacovn/clang_scan_bgpd_dereference1
...
bgpd: null check (Clang scan-build)
2018-06-18 08:16:01 -04:00
Lou Berger
f0380e0468
Merge pull request #2456 from pacovn/Coverity_1399306_Out-of-bounds_access
...
bgpd: out-of-bounds access (Coverity 1399306)
2018-06-18 08:12:04 -04:00
Don Slice
65a6617b64
zebra: re-install static routes needed vrf when the vrf intf comes up
...
Problem reported that if the vrf device is taken down and then brought
back up, any static route referencing that vrf device was not
re-installed. This fix runs back thru the static routes that
reference the vrf device coming up and re-install them.
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
2018-06-18 11:38:45 +00:00
paco
e105d90456
bgpd: null check (Coverity 1408766)
...
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-18 12:51:33 +02:00
Donald Sharp
626e8d0a9b
lib: A small optimization for the hash iterate and walk functions
...
When we are iterating through the hash, keep count of how many
we've called and if we have finished calling the hash->size
iterator times, then short-circuit and stop looping over
the entire array.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-06-16 20:09:45 -04:00
Donald Sharp
8872626bb4
lib, vtysh: Add 'show thread poll' command
...
Add a 'show thread poll' command that displays the
poll information and fd's setup.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-06-16 20:09:45 -04:00
Lou Berger
f4659d27c6
Merge pull request #2467 from pacovn/Coverity_1399274_Dereference_after_null_check
...
bgpd: null check (Coverity 1399274)
2018-06-16 08:26:26 -04:00
Chirag Shah
99b4e972b5
bgpd: fix default RD value in running-cfg
...
When bgp vrf is configured with non-default
RD value, config flag is set.
Upon removing non-default RD value the flag was not reset,
thus displayed default RD value in running-config.
router bgp 5550 vrf vrf1
rd 45.0.2.2:5
Unset the RD configuration flag under bgp_vrf instance.
Ticket:CM-20206
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2018-06-15 22:19:08 -07:00
Chirag Shah
62710e2b33
zebra: Hide default vrf instance of l3vni cmd
...
Hide following l3vni config from DEFAULT_VRF instance
until it is fully supported.
TORS1(config)# vni 2222456 prefix-routes-only
Ticket:CM-20572
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2018-06-15 15:42:20 -07:00
Quentin Young
b682099337
doc: update workflow.rst
...
* Rewrap lines to 80 characters
* Update some portions to reflect current practices
* Clean up some formatting (indent, markup, etc)
* Reorganize sections on patch submission
* Remove link to nonexistent github wiki page
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-06-15 18:38:38 +00:00
Quentin Young
7cc0626c42
lib: ignore user CFLAGS when building Clippy
...
Unfortunately user CFLAGS causes #define conflicts with #defines in
Python development headers, which causes build failures under certain
platforms when using -Werror.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-06-15 18:35:53 +00:00
paco
4f9a63adba
bgpd: null check (Coverity 1399274)
...
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-15 20:09:55 +02:00