Commit graph

119 commits

Author SHA1 Message Date
Rafael Zalamena 5920b3eb38 *: replace all random() calls
Replace all `random()` calls with a function called `frr_weak_random()`
and make it clear that it is only supposed to be used for weak random
applications.

Use the annotation described by the Coverity Scan documentation to
ignore `random()` call warnings.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-04-17 20:57:43 -03:00
David Lamparter 0bdeb5e58d lib: rewrite zlog lock-free & TLS-buffered
This is a full rewrite of the "back end" logging code.  It now uses a
lock-free list to iterate over logging targets, and the targets
themselves are as lock-free as possible.  (syslog() may have a hidden
internal mutex in the C library;  the file/fd targets use a single
write() call which should ensure atomicity kernel-side.)

Note that some functionality is lost in this patch:
- Solaris printstack() backtraces are ditched (unlikely to come back)
- the `log-filter` machinery is gone (re-added in followup commit)
- `terminal monitor` is temporarily stubbed out.  The old code had a
  race condition with VTYs going away.  It'll likely come back rewritten
  and with vtysh support.
- The `zebra_ext_log` hook is gone.  Instead, it's now much easier to
  add a "proper" logging target.

v2: TLS buffer to get some actual performance

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-01 06:53:26 +02:00
Quentin Young c3f6545880 watchfrr: change some messages from errors to info
When watchfrr starts up, it first tries to connect to daemons. This is
expected to fail if we are just starting up FRR, but we log it as an
error, and it shows up red in journalctl. Similarly when we fork
background commands that is also logged as an error. This is scaring
users, let's change these to info.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-03-30 14:25:37 -04:00
David Lamparter 429576883e doc: rename man pages to frr-*
The vrrpd one conflicts with the standalone vrrpd package; also we're
installing daemons to /usr/lib/frr on some systems so they're not on
PATH.

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-01-15 14:05:11 +01:00
David Lamparter 1c0d880814 lib: rename memory_vty.c to lib_vty.c
And memory_init() to lib_cmd_init().

Signed-off-by: David Lamparter <equinox@diac24.net>
2019-12-06 15:13:29 +01:00
David Lamparter 2b64873d24 *: generously apply const
const const const your boat, merrily down the stream...

Signed-off-by: David Lamparter <equinox@diac24.net>
2019-12-02 15:01:29 +01:00
Donald Sharp b3ee8bcc61 lib, watchfrr: Add some additional status messages to systemd
Allow systemd to be informed about operational state so operators can
infer a bit about what is going on with FRR from the systemd status
cli.

sharpd@robot ~/frr4> systemctl status frr
● frr.service - FRRouting
   Loaded: loaded (/usr/lib/systemd/system/frr.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2019-10-03 21:09:04 EDT; 7s ago
     Docs: https://frrouting.readthedocs.io/en/latest/setup.html
  Process: 32455 ExecStart=/usr/lib/frr/frrinit.sh start (code=exited, status=0/SUCCESS)
   Status: "FRR Operational"
    Tasks: 12 (limit: 4915)
   Memory: 76.5M
   CGroup: /system.slice/frr.service
           ├─32468 /usr/lib/frr/watchfrr -d zebra bgpd staticd
           ├─32487 /usr/lib/frr/zebra -d -A 127.0.0.1 -s 90000000
           ├─32492 /usr/lib/frr/bgpd -d -A 127.0.0.1
           └─32500 /usr/lib/frr/staticd -d -A 127.0.0.1

Please note the `Status: ...` line above.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-10-03 21:09:28 -04:00
Donald Sharp 3f391becca watchfrr: Convert wtf to a more meaningful message
There is a fairly common state we are seeing where watchfrr
has decided that something is not right and is printing out
a `wtf` message.  At this point I am not sure what is going on
or how we are getting here, but let's add a bit more data dump
to the message so that we can figure out what is going on.

This is mainly being done because at this point in time I have no
clue the what/how of how we got here and I cannot reproduce.
Maybe by adding more useful information here I can figure out what is
going on.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
2019-09-16 14:25:55 -04:00
Donald Sharp cc53b605e6 watchfrr: Allow end users to turn off watchfrr for a particular daemon
Allow an end user who is debugging behavior, with say gdb, to turn
off watchfrr and it's attempts to keep control of a daemons up/responsiveness

With code change:
donna.cumulusnetworks.com# show watchfrr
watchfrr global phase: Idle
  zebra                Up
  bgpd                 Up/Ignoring Timeout
  staticd              Up

Now grab bgpd with gdb:

sharpd@donna ~/frr4> date ; sudo gdb -p 27893
Mon 16 Sep 2019 01:44:57 PM EDT
GNU gdb (GDB) Fedora 8.3-6.fc30
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Attaching to process 27893
[New LWP 27894]
[New LWP 27895]
[New LWP 27896]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
0x00007f1787a3e5c7 in poll () from /lib64/libc.so.6
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.29-15.fc30.x86_64 gperftools-libs-2.7-5.fc30.x86_64 json-c-0.13.1-4.fc30.x86_64 libcap-2.26-5.fc30.x86_64 libgcc-9.1.1-1.fc30.x86_64 libgcrypt-1.8.4-3.fc30.x86_64 libgpg-error-1.33-2.fc30.x86_64 libstdc++-9.1.1-1.fc30.x86_64 libxcrypt-4.4.6-2.fc30.x86_64 libyang-0.16.105-1.fc30.x86_64 lua-libs-5.3.5-5.fc30.x86_64 lz4-libs-1.8.3-2.fc30.x86_64 pcre-8.43-2.fc30.x86_64 xz-libs-5.2.4-5.fc30.x86_64
(gdb)

In another window we can see when watchfrr thinks it's not responding:

donna.cumulusnetworks.com# show watchfrr
watchfrr global phase: Idle
  zebra                Up
  bgpd                 Unresponsive/Ignoring Timeout
  staticd              Up

Finally exit gdb and watchfrr now believes bgpd is good to go again:

donna.cumulusnetworks.com# show watchfrr
watchfrr global phase: Idle
  zebra                Up
  bgpd                 Up/Ignoring Timeout
  staticd              Up

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-16 13:47:50 -04:00
David Lamparter 051a0be4b2 *: fix some dumb printf format warnings
Some types like `time_t` vary across platforms and always need to be
cast when printed.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-06-11 13:34:57 +02:00
Donald Sharp 43e587c1d1 *: Convert over to all -N namespace to change DAEMON_VTY_DIR
When the user specifies -N namespace allow it to influence the
frr_vtydir(DAEMON_VTY_DIR) to have namespace in it's path
like so: $frrstate_dir/<namespace>

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-06-04 19:52:46 -04:00
Donald Sharp 3c649c719f *: Convert to using frr_vtydir instead of DAEMON_VTY_DIR
In a variety of places we are using DAEMON_VTY_DIR, convert
to use frr_vtydir.  This will allow us in a future commit
to have the -N namespace option be automatically used.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-06-04 10:37:19 -04:00
David Lamparter 3ec9556728 watchfrr: build in defaults for -r/-s/-k
There's no good reason to not have these options default to the
installation path of tools/watchfrr.sh.  Doing so allows us to ditch
watchfrr_options from daemons/daemons.conf completely.

Fixes: #3652
Signed-off-by: David Lamparter <equinox@diac24.net>
2019-02-19 21:34:31 +01:00
David Lamparter 5c9d1c83a8 watchfrr: don't wait forever at startup
If we wait forever for all daemons to come up, we can hang the entire
boot process, especially on init.d based systems.

Signed-off-by: David Lamparter <equinox@diac24.net>
2019-02-19 21:34:08 +01:00
David Lamparter fdbd8086b1 build: fix a whole bunch of *FLAGS
- some target_CFLAGS that needed to include AM_CFLAGS didn't do so
- libyang/sysrepo/sqlite3/confd CFLAGS + LIBS weren't used at all
- consistently use $(FOO_CFLAGS) instead of @FOO_CFLAGS@
- 2 dependencies were missing for clippy

Signed-off-by: David Lamparter <equinox@diac24.net>
2019-01-30 19:13:51 +01:00
David Lamparter af568444cb watchfrr: add status command
Just to see WTF is going on inside watchfrr...

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-12-06 23:05:45 +01:00
David Lamparter 75f8b0e41b watchfrr: immediately try connecting after start
When we make a call to (re)start some daemon(s), we can immediately try
connecting to its VTY socket after the script completes.  If the daemon
started correctly, this will always succeed since the start script only
returns after daemon startup is complete.

Among other things, this reduces the delay to "startup complete"
notification at initial watchfrr start.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-12-06 23:05:42 +01:00
David Lamparter c0e5cb5271 watchfrr: don't wait around pointlessly at startup
We were waiting for timers to expire even when we already know the
status of all daemons.  This delays startup for no good reason.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-12-06 17:30:58 +01:00
David Lamparter 0a7c7856e3 watchfrr, lib: cleanup & delay detaching
This cleans up watchfrr to be more "normal" like the other daemons in
terms of what it does in main(), i.e. using the full frr_*() call set.

Also, this changes the startup behaviour on watchfrr to stay attached on
the daemon's parent process until startup is really complete.  This
should allow removing the "watchfrr.started" hack at some point.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-10-02 12:27:47 +02:00
Donald Sharp e09443f51b watchfrr: Modify some stderr messages to zlog_warn
The stderr output is not being displayed as part of watchfrr invocation
in system startup.  Specifically if the user has not properly sent
1 or more daemons to monitor.  If the end-user is using tools/frr
this stderr is dropped( and systemd appears to drop stderr too? )

Modify the two stderr calls in this situation and use the zlog system.
Now I can clearly see an error message that tells me what has gone wrong.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
[DL: fixed typo]
2018-09-25 19:11:25 +02:00
Quentin Young 1c50c1c0d6 *: style for EC replacements
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-09-13 19:38:57 +00:00
Quentin Young 450971aa99 *: LIB_[ERR|WARN] -> EC_LIB
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-09-13 19:34:28 +00:00
Quentin Young f74ae2bb41 watchfrr: WATCHFRR_[ERR|WARN] -> EC_WATCHFRR
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-09-13 19:16:02 +00:00
David Lamparter f4f2f2ccac build: fix not building docs w/o sphinx
Can't build manpages without sphinx-build, oops...

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-09-09 20:01:08 +02:00
David Lamparter e7c25325cc *: cleanup .gitignore files
Signed-off-by: David Lamparter <equinox@diac24.net>
2018-09-08 21:30:42 +02:00
David Lamparter 74dc19a2f5 build: move vtysh & manpage listings to subdir.am
Since we're now building through one large Makefile, we can easily put
things with their daemons and crossreference nicely.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-09-08 21:30:19 +02:00
Christian Franke 7c265f7de1 watchfrr: fix global restart
watchfrr needs to handle a SIGCHLD also when it calls a global restart
command. Before this patch, it would lead to the following behavior:

15:44:28: zebra state -> down : unexpected read error: Connection reset by peer
15:44:33: Forked background command [pid 6392]: /usr/sbin/frr.init watchrestart all
15:44:53: Warning: restart all child process 6392 still running after 20 seconds, sending signal 15
15:44:53: waitpid returned status for an unknown child process 6392
15:44:53: background (unknown) process 6392 terminated due to signal 15
15:45:13: Warning: restart all child process 6392 still running after 40 seconds, sending signal 9
15:45:33: Warning: restart all child process 6392 still running after 60 seconds, sending signal 9
15:45:53: Warning: restart all child process 6392 still running after 80 seconds, sending signal 9
15:46:13: Warning: restart all child process 6392 still running after 100 seconds, sending signal 9
15:46:33: Warning: restart all child process 6392 still running after 120 seconds, sending signal 9
15:46:53: Warning: restart all child process 6392 still running after 140 seconds, sending signal 9

This is obviously incorrect and can be fixed by comparing the pid to
the global restart object as well.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-08-25 18:17:24 +02:00
Quentin Young 09c866e34d *: rename ferr_zlog -> flog_err_sys
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-14 20:02:05 +00:00
Quentin Young 85cd2f9f9a *: rename ferr_ref -> log_ref
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-14 20:02:05 +00:00
Quentin Young af4c27286d *: rename zlog_fer -> flog_err
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-14 20:02:05 +00:00
Quentin Young 5ad4c39ce4 *: stop double initialization of ferr
* Stop double init of ferr
* Fixup bugs in zebra ferr
* Add missing init in ospfd

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-14 20:02:05 +00:00
Quentin Young 247dcce2b5 *: fix source file headers & includes for errcodes
* Use the correct license header
* Stop headers from including themselves
* Use uniform relative include conventions
* Ensure that sources include what they use
* Turn off clang-format around struct array blocks

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-14 20:02:05 +00:00
Donald Sharp b647dc2aec watchfrr: Add WATCHFRR_ERR_XXX for zlog_err to zlog_ferr
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-14 20:02:05 +00:00
Quentin Young d7c0a89a3a
*: use C99 standard fixed-width integer types
The following types are nonstandard:
- u_char
- u_short
- u_int
- u_long
- u_int8_t
- u_int16_t
- u_int32_t

Replace them with the C99 standard types:
- uint8_t
- unsigned short
- unsigned int
- unsigned long
- uint8_t
- uint16_t
- uint32_t

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-03-27 15:13:34 -04:00
Quentin Young 470bc61919
watchfrr, vtysh: do not write config during crash
If a daemon is restarting, crashed, or otherwise in the process of
reconnecting to watchfrr and a user issues "write memory" or "write
file" the resulting config will not include the configuration of that
daemon. This is problematic because this output will overwrite the
previous config, potentially causing unintentional loss of configuration
stored only in the config file based upon timing.

This patch remedies that by making watchfrr check that all daemons are
up before attempting a configuration write, and updating vtysh so that
its failsafe respects this condition as well.

Note that this issue only manifests when using integrated config.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-03-21 03:11:02 -04:00
Martin Winter 138ba09e13
Merge pull request #1514 from donaldsharp/watchfrr
tools, watchfrr: Modify timeout to 90 seconds
2017-12-12 08:51:25 -08:00
Donald Sharp f5ba21fc9d watchfrr: Fail gracefully if fopen fails
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-12-04 21:28:19 -05:00
Brian Rak 0a64aff60c tools, watchfrr: Modify timeout to 90 seconds
The default timeout of 10 seconds is too quick of a timeout
given some long running cli commands.  Modify watchfrr
to have a 90s timeout value instead.

Signed-off-by: Brian Rak <brianrak@gameservers.com>
2017-12-04 09:55:39 -05:00
Daniel Walton dff13b6fb7 *: watchfrr needs 'show debugging' DEFUN
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>

This fixes the following

cel-redxp-10# show debugging
Debugging Information for zebra:
Zebra debugging status:

Debugging Information for bgpd:
BGP debugging status:

Debugging Information for watchfrr:
% Command incomplete.

% Command incomplete.
cel-redxp-10#
2017-09-20 19:34:50 +04:00
David Lamparter bd354725a6 build: non-recursive watchfrr & tools
(also forgot to remove AC_SUBST(ISISD) earlier)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-09-07 16:18:50 +02:00
Donald Sharp f790234f2f Merge pull request #892 from opensourcerouting/watchfrr-simplify
simplify watchfrr, add --terminal, improve startup logging
2017-08-09 14:32:44 -04:00
David Lamparter 999f153ece watchfrr: print specific error for removed options
... and document them in the man page.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-09 11:30:58 +02:00
David Lamparter 64a249ad9e watchfrr: remove STATEDIR preprocessor define
use frr_vtydir from libfrr instead.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-09 11:30:58 +02:00
Jorge Boncompte 60bd253428 watchfrr: hide systemd message if not systemd available
Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
2017-08-04 10:19:36 +02:00
David Lamparter d87ae5cc1a doc: update watchfrr manpage
Remove -R, -a, -A, -e and -z options.  Also remove blocker in the code
that refuses to start if --dry is given together with -k / -s / -r.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-02 23:36:42 +02:00
David Lamparter 71e7975aaf watchfrr: remove -z option
Why would we not want to restart a daemon that's hanging?

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-02 02:59:51 +02:00
David Lamparter a8cbb8b383 watchfrr: remove -e option
Why would we not want to PING?

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-02 02:59:51 +02:00
David Lamparter f168b71300 watchfrr: remove abundance of modes
This leaves what were previously modes 0 (monitor-only) and 3 (restart
daemons individually, but restart everything if zebra is restarted).

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-02 02:59:51 +02:00
whitespace / reindent d62a17aede *: reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'`

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-17 14:04:07 +02:00
David Lamparter 2d8270596a Merge remote-tracking branch 'frr/master' into newline-redux
Lots of conflicts from CMD_WARNING_CONFIG_FAILED...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14 13:07:30 +02:00
David Lamparter 5c7571d43f *: ditch vty_outln(), part 1 of 2
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-13 20:29:22 +02:00
Jafar Al-Gharaibeh 2f4f11faa1 watchfrr: fix error message
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2017-07-12 11:31:11 -05:00
Quentin Young 96ade3ed77 *: use vty_outln
Saves 400 lines

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-29 17:31:28 +00:00
Donald Sharp 697629e190 Merge remote-tracking branch 'origin/stable/2.0' 2017-06-05 08:19:11 -04:00
David Lamparter 896014f4bc *: make consistent & update GPLv2 file headers
The FSF's address changed, and we had a mixture of comment styles for
the GPL file header.  (The style with * at the beginning won out with
580 to 141 in existing files.)

Note: I've intentionally left intact other "variations" of the copyright
header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-05-15 16:37:41 +02:00
Quentin Young 66e78ae64b *: update thread_add_* calls
Pass pointer to pointer instead of assigning by return value. See
previous commit message.

To ensure that the behavior stays functionally correct, any assignments
with the result of a thread_add* function have been transformed to set
the pointer to null before passing it. These can be removed wherever the
pointer is known to already be null.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-05-09 20:44:22 +00:00
Quentin Young ffa2c8986d *: remove THREAD_ON macros, add nullity check
The way thread.c is written, a caller who wishes to be able to cancel a
thread or avoid scheduling it twice must keep a reference to the thread.
Typically this is done with a long lived pointer whose value is checked
for null in order to know if the thread is currently scheduled.  The
check-and-schedule idiom is so common that several wrapper macros in
thread.h existed solely to provide it.

This patch removes those macros and adds a new parameter to all
thread_add_* functions which is a pointer to the struct thread * to
store the result of a scheduling call. If the value passed is non-null,
the thread will only be scheduled if the value is null. This helps with
consistency.

A Coccinelle spatch has been used to transform code of the form:

  if (t == NULL)
    t = thread_add_* (...)

to the form

  thread_add_* (..., &t)

The THREAD_ON macros have also been transformed to the underlying
thread.c calls.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-05-09 20:44:19 +00:00
Martin Winter 36d85ca8e3 watchfrr: Remove the HAVE_CUMULUS around the watchfrr.started file. It's always useful
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-04-15 02:00:15 -07:00
Martín Beauchamp 685e701ef3 Lowercase frr.conf 2017-03-09 09:45:00 -05:00
David Lamparter 9272302b00 watchfrr: make min/max restart interval longopts
-m/-M seem to be seldomly used...
... and I kindof need/want -M for module loading.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-03-08 16:23:55 +01:00
David Lamparter dd8376febd lib: remove remaining struct zlog * args
These don't serve any purpose either.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-03-08 00:15:40 +01:00
David Lamparter eb05883f3e *: add frr_config_fork()
Centralise read_config/daemonize/dryrun/pidfile/vty_serv into libfrr.

This also makes multi-instance pid/config handling available as part of
the library.  It's only wired up in ospfd, but the code is in lib/.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-03-08 00:15:36 +01:00
David Lamparter 857b544649 *: centralize more into frr_init()
Move CLI/VTY/Memory accounting init into frr_*

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-03-07 23:07:33 +01:00
David Lamparter 4f04a76b71 *: add frr_init() infrastructure
Start centralising startup & option parsing into the library.

FRR_DAEMON_INFO is a bit weird, but it will become useful later (e.g.
for killing the ZLOG_* enum, and having the daemon name available)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-03-07 23:07:20 +01:00
Martín Beauchamp e20dc2ba06 Lowercase frr.conf 2017-02-27 13:26:20 -05:00
Donald Sharp 7df2e1c379 Merge remote-tracking branch 'origin/stable/2.0' 2017-02-07 13:20:12 -05:00
Donald Sharp 55c7280315 *: Convert libzebra -> libfrr
The library libzebra that is installed with FRR will
conflict with Quagga.  So let's rename it to libfrr.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-03 08:29:13 -05:00
David Lamparter a6810074aa watchfrr: indent to Linux CodingStyle
before this patch, watchfrr was using an inconsistent style that matched
neither GNU nor Linux kernel nor BSD style.  Reindent to Linux kernel
style, which should be pretty close to pimd & ldpd.

indent (2.2.11) options used:
 -nbad -bap -nbc -bbo -hnl -br -brs -c33 -cd33 -ncdb -ce -ci4
 -cli0 -d0 -di1 -nfc1 -i8 -ip0 -l80 -lp -npcs -nprs -npsl -sai
 -saf -saw -ncs -nsc -sob -nfca -cp33 -ss -ts8 -il1

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-01-13 14:10:00 +01:00
Donald Sharp 9473e34052 watchfrr: Rename watchquagga -> watchfrr
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-03 20:13:02 -05:00