Commit Graph

2513 Commits

Author SHA1 Message Date
Donald Sharp
5cecdba9d1 lib: Remove memory check test
Found a missed memory check test that can just be removed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-11 17:14:58 +02:00
Donald Sharp
0ce1ca805d *: ALLOC calls cannot fail
There is no need to check for failure of a ALLOC call
as that any failure to do so will result in a assert
happening.  So we can safely remove all of this code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-11 17:14:58 +02:00
Rafael Zalamena
d3af6147a1 bfdd: re-route PTM-BFD daemon messages
When `bfdd` is enabled - which it is by default - re-route the PTM-BFD
messages to the FRR's internal BFD daemon instead of the external
PTM daemon.

This will help the migration of BFD implementations and avoid
duplicating code.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-08-08 18:25:04 -03:00
Rafael Zalamena
c2f29cf3d7 bfdd: add vty shell commands
Implement vty shell integration and allow `bfdd` to be configured
through FRR's vtysh.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-08-08 18:25:04 -03:00
Rafael Zalamena
8519fe88c9 lib: import new JSON iteration macro
Save a few lines when iterating over JSON objects using the new
JSON_FOREACH macro.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-08-08 18:01:20 -03:00
David Lamparter
572e26445a lib: fix "-t" command line option
was_stdio was getting set for fd == -1 (config file read), thus
prematurely closing the stdio vty.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-08-08 20:53:27 +02:00
David Lamparter
602a6584ee lib: count total memory allocation per MTYPE
If malloc_usable_size() or malloc_size() are available, we can count
total usage of a particular MTYPE.  (Without the functions, we don't
know how much to subtract on free.)

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-08-08 20:17:55 +02:00
David Lamparter
fa896a1d80 build: rework mallinfo test & find malloc_size
Signed-off-by: David Lamparter <equinox@diac24.net>
2018-08-08 20:17:55 +02:00
Martin Winter
09890489cc
Merge pull request #2122 from donaldsharp/zebra_nhs
Create Staticd
2018-08-08 08:07:24 -07:00
Russ White
8455e19e54
Merge pull request #2764 from opensourcerouting/isis-srcdest
IS-IS dst-src routing support
2018-08-08 06:34:46 -04:00
Quentin Young
377e35655a bgpd: clean up evpn prefix debugging commands
* Fix memory leaks in debug commands
* Use CLI tokens to properly sanitize input
* Remove unnecessary error handling code from debug commands
* Remove unnecessary parameters from conf print functions

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-07 16:12:55 +00:00
Rafael Zalamena
46a9c3af89
Merge pull request #2775 from donaldsharp/stream_speedup
lib: Increase stream allocation speed.
2018-08-04 14:17:25 -03:00
Russ White
429a5ad722
Merge pull request #2758 from donaldsharp/pim_join
lib and pim silliness
2018-08-04 11:46:45 -04:00
Donald Sharp
8619629ada lib, bgpd, ospf6d, ospfd, pimd: Allow finish to cleanup a bit more
When calling route_map_finish, every place that we do we must
first set the deletion event to NULL, or we will create an infinite
loop, if we are using the delayed route-map application code.
As such we might as well just make the route_map_finish code
do this work, as that there is really no viable alternative here
and route_map_finish should only be called on shutdown.

This fixes an infinite loop in zebra on shutdown when there
are route-maps.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-03 08:22:45 -04:00
Christian Franke
321c1bbb94 isisd: make spf code dst-src aware
Take the source-prefix sub-TLV into consideration when running SPF
and support creation/deletion of dst-src routes as result.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-08-03 13:25:39 +02:00
Christian Franke
d43d2df5f3 isisd: learn and advertise IPv6 dst-src routes
Receive IPv6 dst-src routes from zebra and advertise them in our LSPs
if so configured.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-08-03 13:25:39 +02:00
Donald Sharp
565b5561ac lib: Increase stream allocation speed.
Modify stream_new in this way:

1) ALLOC allocations do not fail, they cause a crash so remove
if tests for it.

2) Modify usage of XCALLOC to XMALLOC and then hand set all the
relevant data in the stream pointer.

With this modification stream allocation of 10000000 streams at
10k bytes each reduced from on average 1.43 seconds to 0.65 seconds.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-02 14:57:44 -04:00
Donald Sharp
410a92bc2b lib: Fix vrf check output to only have 1 line
When we issue this command, we are getting:

robot# show ip route vrf green json
{}
% VRF green not found
robot# show ip route vrf green
% VRF green not found
% VRF green not found
robot#

Fix the command so it only displays one line of output
for json or non-json output.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-02 10:09:09 -04:00
Donald Sharp
9b864cd3cd lib: Ensure read/write fd's are in range
Ensure that we can properly handle a passed in read/write
fd for using in poll.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-01 19:41:47 +00:00
Donald Sharp
037f162fe9
Merge pull request #2766 from lyq140/branch1
ripd: null check key
2018-08-01 10:42:52 -04:00
lyq140
c4efb22479 ripd: null check key
Fix ripd crash of null pointer.
when authenticate a rip packet,
the key pointer or the key string pointer may be null,
the code have to return then.

Signed-off-by: lyq140 <34637052+lyq140@users.noreply.github.com>
2018-08-01 20:48:36 +08:00
Rafael Zalamena
dc094865db lib: fix getsockopt_cmsg_data retrieval
The `type` parameter was not being compared with `cmsg_type`, so the
result of this function was always a pointer to the first header
matching the level.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-08-01 09:42:16 -03:00
Jafar Al-Gharaibeh
0329ff96a9
Merge pull request #2753 from qlyoung/fix-zebra-shutdown-crash-2
Fix zebra shutdown crash: Round 3
2018-07-31 10:31:55 -05:00
Donald Sharp
fe64533ad9 lib: Set proper write file when using backup config
When we read in a backup file, we should save the original
host.config so that we can put it back to the correct original
location after we read in the backup config.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-07-29 12:43:23 -04:00
Donald Sharp
40ecd8e46d lib, zebra: Allow protocols to use Distance as part of RR semantics
Allow protocols to specify to zebra that they would like zebra
to use the distance passed down as part of determine sameness for
Route Replace semantics.

This will be used by the static daemon to allow it to have
backup static routes with greater distances.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-07-29 12:43:23 -04:00
Russ White
a31f28f9c2
Merge pull request #2728 from donaldsharp/table_cleanup
lib: Add parameter names as a hint of what is expected.
2018-07-29 08:24:38 -04:00
Lou Berger
6e6b03c0dc
Merge pull request #2742 from vangheem/master
fix json output when vrf not active
2018-07-28 10:29:10 -04:00
Nathan Van Gheem
ec1db5882d lib,zebra: fix json output when vrf1 when not active
When I did a show ip route with `json` on a vrf when it didn't exist,
frr would output invalid json.

Signed-off-by: Nathan Van Gheem <nathan@cumulusnetworks.com>
2018-07-27 10:17:03 -04:00
Donald Sharp
563f0c2b2d lib: Modify route unlock code to return appropriate pointer
Modify the unlock code for a route_node to return NULL on
pointer freed or to return the node itself again.

We'll need to go through the code and fix this pattern,
but this is a problem for another day.  Get this fix in
place and we can make it a low hanging problem to fix.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-07-27 09:54:39 -04:00
Quentin Young
a6275055bf lib: add cancel point to default pthread loop
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-07-26 00:40:52 +00:00
Donald Sharp
e070029078 lib: Add parameter names as a hint of what is expected.
Add some parameter names to functions in table.h to give a
clue as to what we expect people to pass in.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-07-25 15:16:02 -04:00
Russ White
bbc7adf1b4
Merge pull request #2665 from chiragshah6/evpn_dev
bgpd: support evpn nd ext community
2018-07-24 11:55:08 -04:00
Mark Stapp
123214efb8 libs, daemons: use const in route-map apply
Use 'const prefix *' in route-map apply apis; led to some
corresponding changes in several daemons.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2018-07-23 10:34:35 -04:00
Donald Sharp
c4aee4fe31
Merge pull request #2652 from LabNConsulting/working/master/confdate_cleanup
Simplify deprecation check
2018-07-23 08:46:26 -04:00
Christian Franke
ec40eaf94d lib/compiler.h: Always define CPP_NOTICE
On old compilers CPP_NOTICE should be a macro evaluating to an empty
statement, instead of being undefined.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-07-19 10:10:13 -04:00
Donald Sharp
d1a85fe40d
Merge pull request #2608 from pacovn/PVS-Studio_dead_code_1
eigrpd lib pimd zebra: dead code (PVS-Studio)
2018-07-19 08:50:01 -04:00
Chirag Shah
68e331515e bgpd: support evpn nd ext community
EVPN ND ext community support NA flag R-bit, to have proxy ND.

Set R-bit in EVPN NA if a given router is default gateway or there is a
local
router attached, which can be determine based on local neighbor entry.

Implement BGP ext community attribute to generate and parse  R-bit and
pass along zebra to program neigh entry in kernel.

Upon receiving MAC/IP update with community type 0x06 and sub_type 0x08,
pass the R-bit to zebra to program neigh entry.

Set NTF_ROUTER in neigh entry and inform kernel to do proxy NA for EVPN.

Ref:
https://tools.ietf.org/html/draft-ietf-bess-evpn-na-flags-01

Ticket:CM-21712, CM-21711
Reviewed By:
Testing Done:
Configure Local vni enabled L3 Gateway, which would act as router,
checked
show evpn arp-cache vni x ip <ip of svi> on originated and remote VTEPs.
"Router" flag is set.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2018-07-17 13:06:41 -07:00
Donald Sharp
51034b787f
Merge pull request #2595 from pguibert6WIND/fix_netlink_rx_route_vrfnetns
zebra: upon RTM_NEWROUTE/DELROUTE, find appropriate interface
2018-07-12 22:22:34 -04:00
Mark Stapp
86391e5659 zebra, libs: use const prefix ptrs in apis
Add 'const' to prefix args to several zebra route update,
redistribution, and route owner notification apis.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2018-07-11 09:22:49 -04:00
Lou Berger
308fea4ced lib: remove VERSION_TYPE_DEV from CONFDATE checks
Signed-off-by: Lou Berger <lberger@labn.net>
2018-07-10 16:19:37 -04:00
Mark Stapp
d826a734af libs: add ALL_NEXTHOPS_PTR iterator macro
Because sometimes we have a pointer to a nexthop_group.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2018-07-10 14:07:43 -04:00
Philippe Guibert
fda8229965 lib: remove if_lookup_by_index portion of code with unknown vrf
This function should be called with a known vrf_id. All other cases, the
other API should be called.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-07-10 17:32:40 +02:00
Rafael Zalamena
76f17a8cc4
Merge pull request #2630 from donaldsharp/hashables
revert hash_walk/iterate optimizations
2018-07-06 12:30:06 -03:00
Donald Sharp
8b52179d2a lib: Add some documentation
Add some documentation to hash_walk/iterate to tell people
to not do something stupid.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-07-06 10:18:50 -04:00
Donald Sharp
df66eb2eeb Revert "lib: A small optimization for the hash iterate and walk functions"
This reverts commit fc61644e440c875eefa222ab34d726c6281ca806.
2018-07-06 10:18:11 -04:00
Philippe Guibert
0faeba264e lib: add the pathname to get the realpath in case of failure
Sometimes, the file under /var/run/netns may not be authorised to be
read ( because it is not read permission for frr user, for instance).
so it is good to know what happened.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-07-06 08:51:54 +02:00
F. Aragon
2e1cc43679
eigrpd lib pimd zebra: dead code (PVS-Studio)
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-07-06 01:10:15 +02:00
F. Aragon
b575a12c87
bgpd lib ospfd pimd ripngd: null chk (PVS-Studio)
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-07-03 15:39:50 +02:00
Russ White
8d6d6b2581
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
2018-07-01 23:06:22 -04:00
Russ White
1ad26882cb
Merge pull request #2517 from pguibert6WIND/flowspec_other_options
Flowspec support other options
2018-06-29 13:45:44 -04:00
Jafar Al-Gharaibeh
20e5fd7ab5
Merge pull request #2532 from donaldsharp/various_stuff
Redistribution and some extra developer debug code
2018-06-29 12:41:02 -05:00
F. Aragon
0866cdaf3e
bgpd: null check (Coverity 1453455)
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-29 11:03:06 +02:00
Philippe Guibert
3bed236338 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>
2018-06-28 11:08:59 +02:00
Philippe Guibert
6f5617d877 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>
2018-06-28 11:08:58 +02:00
Philippe Guibert
cfaf18ce52 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>
2018-06-28 11:08:58 +02:00
Philippe Guibert
4977bd6c19 *: add flowspec dscp handling
Only one dscp value is accepted as filtering option.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-06-28 11:08:55 +02:00
Philippe Guibert
2e1f721e65 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>
2018-06-28 08:52:15 +02:00
Philippe Guibert
2da7d62e94 bgpd: support for flowspec tcp flags
Ability to handle flowspec tcp flags.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-06-28 08:52:15 +02:00
Donald Sharp
03ed85a6c0 lib, zebra: Add a bit of code to look at fifo
When in a dev build add a bit of code to track max
depth of a fifo and to allow zebra to report on it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-06-27 20:01:22 -04:00
Quentin Young
7f3ad069d7
Merge pull request #2570 from pacovn/Coverity_1448386_Untrusted_value_as_argument
lib: untrusted argument (Coverity 1448386)
2018-06-27 15:09:34 -04:00
paco
45ec351df2
lib: untrusted argument (Coverity 1448386)
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-27 15:50:04 +02:00
paco
64268e1a12
lib: null check (2) (Coverity 1451361)
Additional correction to fa3016309b

Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-27 15:24:45 +02:00
Quentin Young
81ef2361a3
Merge pull request #2559 from pacovn/Coverity_1302503_Logically_dead_code
lib ospfd: dead code (Coverity 1302503 1302502)
2018-06-26 16:48:54 -04:00
paco
39050c7e0d
lib ospfd: dead code (Coverity 1302503 1302502)
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-26 21:39:56 +02:00
Quentin Young
cf6bc77d28
Merge pull request #2503 from pacovn/Coverity_1469898_Uninitialized_scalar_variable
lib: uninitialized variable (2) (Coverity 1469898)
2018-06-26 11:35:58 -04:00
Quentin Young
c1802707e0
Merge pull request #2463 from pacovn/Coverity_1452539_Out-of-bounds_access
lib: out-of-bounds access (Coverity 1452539)
2018-06-26 11:34:31 -04:00
Renato Westphal
ec45d6c140
Merge pull request #2552 from qlyoung/remove-defun-deprecated
Remove DEFUN_DEPRECATED
2018-06-26 10:25:00 -03:00
Jafar Al-Gharaibeh
347e3c3d5f
Merge pull request #2548 from pacovn/Coverity_1453456_Unchecked_return_value_from_library
lib: check return value (Coverity 1453456)
2018-06-25 17:30:31 -04:00
paco
e339d7c04d
lib: check return value (Coverity 1453456)
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-25 20:20:24 +02:00
Quentin Young
61cdcbdc02 lib: remove DEFUN_DEPRECATED
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-06-25 16:38:53 +00:00
Quentin Young
20d8a28413 *: remove deprecated 'log trap' commands
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-06-25 16:35:34 +00:00
paco
74e7158c06
lib: null check (Coverity 1470150)
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-22 23:03:24 +02:00
Jafar Al-Gharaibeh
3a743cb7ec
Merge pull request #2520 from donaldsharp/privs_smivs
lib: Fix privs when using HAVE_CAPABILITIES
2018-06-22 14:19:13 -05:00
paco
a6a87d63d0
lib: uninitialized variable (2) (Coverity 1469898)
Previous correction (2c2d5cb397) was not enough,
so now it is ensured that the argument shift is not negative nor zero.

Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-22 21:18:35 +02:00
Lou Berger
ec446a4673
Merge pull request #2449 from donaldsharp/lib_delayed_read
Lib delayed read
2018-06-22 13:13:05 -04:00
paco
764f689bcf
lib: out-of-bounds access (Coverity 1452539)
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-22 00:06:07 +02:00
Quentin Young
0a8990d5f8
Merge pull request #2501 from pacovn/infer_unused1
bgpd isisd ldpd lib ospfd pimd: redundancy (infer, grouped)
2018-06-21 15:12:33 -04:00
Quentin Young
390cc01007
Merge pull request #2511 from pacovn/Coverity_1452287_et_al_Explicit_null_dereferenced
ldpd, lib: null check (Coverity 1452287 and 20 alike)
2018-06-21 15:00:12 -04:00
paco
d1f92e454c
lib: null check (Coverity 1399277)
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-21 17:35:38 +02:00
Donald Sharp
8e04538cae lib: Fix privs when using HAVE_CAPABILITIES
If your daemon does not need any special privileges
and you are compiling with HAVE_CAPABILIES, the
zprivs->change pointer will end up NULL due
to the way zprivs_caps_init.  So as a check
let's add a NULL check for zprivs->change
and set it to a function that will do nothing.

This change prevents a crash if you raise privileges
when your daemon needs no special privileges.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-06-21 11:22:51 -04:00
paco
e59294e2e4
ldpd lib: null check (Coverity 1452287 + 20 alike)
Coverity issues fixed with this commit:

1452287 1452291 1452307 1452310 1452317 1452321 1452327 1452330 1452331 1452336
1452337 1452340 1452352 1452354 1452358
(originated at ldpd/ldpd_vty_cmds_clippy.c)

1448388 1448390 1448392 1448397 1448404 1448408
(originated at lib/plist_clippy.c)

Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-21 12:31:57 +02:00
paco
a2b6e694b1
bgpd isisd ldpd lib ospfd pimd: redundancy (infer)
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-20 22:25:28 +02:00
paco
fa3016309b
bgpd, lib: null check (Coverity 1436344, 1451361)
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-20 19:14:01 +02:00
Russ White
418a4330c6
Merge pull request #2415 from qlyoung/pbr-table-range
PBR table range configuration + misc cleanups
2018-06-20 07:55:56 -04:00
Russ White
96be948bcd
Merge pull request #2495 from pacovn/fixme_all_digit
bgpd, lib, ospfd, zebra: all_digit moved to frrstr
2018-06-20 07:38:19 -04:00
Donald Sharp
46a69f10c0 bgpd, lib, zebra: Remove unnecessary return
The route_map_walk_update_list callback function
never uses the return code, so just remove it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-06-19 21:22:46 -04:00
Donald Sharp
69f0272083 lib: Don't expose a function that is never used
route_map_clear_updated is only used by routemap.c,
don't expose it too be used by the outside world.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-06-19 21:22:46 -04:00
Donald Sharp
7096e93875 bgpd, lib, pimd: Remove unused variable.
route_map_mark_updated has a `int del_later` variable
that is passed in but never used.  Just remove it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-06-19 20:44:15 -04:00
paco
5d5ba0185d
bgpd, lib, ospfd, zebra: all_digit moved to frrstr
This solves a pending FIXME

Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-19 17:59:53 +02:00
Quentin Young
6e87c6e8e2
Merge pull request #2459 from pacovn/Coverity_1469898_Uninitialized_scalar_variable
lib: uninitialized variable (Coverity 1469898)
2018-06-19 11:15:13 -04:00
Donald Sharp
e9b4e74a78 lib: Add --log-level to daemons
Add the ability to specify the designated log level at startup.

--log-level <emergencies|alerts|critical|errors|warnings|notifications|informational|debugging>

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-06-19 09:02:21 -04:00
Donald Sharp
9685abb492 lib: Remove special case code to use syslog
Remove the special case code to use syslog for Cumulus.
They can specify this via startup now instead of having
a special compile flag for this option.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-06-19 08:43:59 -04:00
Donald Sharp
f8507817cf lib: Add new cli to specify where to output logs on startup
When we are starting a daemon, allow the user to specify:

--log <stdout|syslog|file:file_name>

This can be used on early startup to put the log files
where the end user wants them to show up.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-06-19 08:43:59 -04:00
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
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
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
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