| Age | Commit message (Collapse) | Author | 
 | 
We should probably prevent any type of namespace collision
with something else.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
 | 
 | 
Let's find a better name for it.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
 | 
 | 
Convert the `struct thread_master` to `struct event_master`
across the code base.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
 | 
 | 
This is a first in a series of commits, whose goal is to rename
the thread system in FRR to an event system.  There is a continual
problem where people are confusing `struct thread` with a true
pthread.  In reality, our entire thread.c is an event system.
In this commit rename the thread.[ch] files to event.[ch].
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
 | 
 | 
Done with a combination of regex'ing and banging my head against a wall.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
 | 
 | 
babeld's `--terminal` option doesn't work because it replaces `stdin`
with `/dev/null`. It seems to me this function can be removed as `frr_run`
handles that in daemon mode.
Signed-off-by: Yuxiang Zhu <vfreex@gmail.com>
 | 
 | 
Naming functions/data structures more appropriately for
the project we are actually in.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
 | 
 | 
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
 | 
 | 
... by referencing all autogenerated headers relative to the root
directory.  (90% of the changes here is `version.h`.)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
 | 
 | 
... again ...
Signed-off-by: David Lamparter <equinox@diac24.net>
 | 
 | 
Don't crash when trying to `show running-config` because of missing
filter northbound integration.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
 | 
 | 
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
 | 
 | 
const const const your boat, merrily down the stream...
Signed-off-by: David Lamparter <equinox@diac24.net>
 | 
 | 
Signed-off-by: David Lamparter <equinox@diac24.net>
 | 
 | 
Start the conversion to allow zapi interface callbacks to be
controlled like vrf creation/destruction/change callbacks.
This will allow us to consolidate control into the interface.c
instead of having each daemon read the stream and react accordingly.
This will hopefully reduce a bunch of cut-n-paste stuff
Create 4 new callback functions that will be controlled by
lib/if.c
create -> A upper level protocol receives an interface creation event
The ifp is brand spanking newly created in the system.
up -> A upper level protocol receives a interface up event
This means the interface is up and ready to go.
down -> A upper level protocol receives a interface down
destroy -> A upper level protocol receives a destroy event
This means to delete the pointers associated with it.
At this point this is just boilerplate setup for future commits.
There is no new functionality.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
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>
 | 
 | 
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>
 | 
 | 
Introduce frr-interface.yang, which defines a model for managing FRR
interfaces.
Update the 'frr_yang_module_info' array of all daemons that will
implement this module.
Add automatically generated stub callbacks in if.c. These callbacks will
be implemented in the following commit.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
 | 
 | 
FRR_DAEMON_INFO should now contain an array of 'frr_yang_module_info'
structures describing the YANG modules implemented by the daemon.
This array will be used by frr_init() function to load all YANG modules
and initialize the northbound callbacks during the daemon initialization.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
 | 
 | 
Signed-off-by: David Lamparter <equinox@diac24.net>
 | 
 | 
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
 | 
 | 
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
 | 
 | 
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
 | 
 | 
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
 | 
 | 
Babel was screwing up lib initialization causing double inits of many
things.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
 | 
 | 
Convert babeld to use zlog_ferr and add appropriate BABEL_ERR_XXX
information.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
Add some BABEL_ERR_XXX error messages and convert over to using
zlog_ferr instead of zlog_err.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
The frr_config_fork() function called by all FRR daemons during
initialization already takes care of reading the startup configuration
file.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
 | 
 | 
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
 | 
 | 
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
Current cleanup is for unset values or variables that are not used anymore.
Regarding ospfd/ospf_vty.c: argv_find()
  we'll never get it NULL, so get coststr = argv[idx]->arg;
 | 
 | 
This allow us to find real leaks more easily with tools like valgrind.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
 | 
 | 
The frr_run() function already logs a startup message (and after reading
the config so the "log" commands are honored).
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
 | 
 | 
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
 | 
 | 
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
 | 
 | 
Should be able to fit more vty_out onto one line now
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
 | 
 | 
Saves 400 lines
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
 | 
 | 
Get main to init up in the libfrr paradigm.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
This is a direct copy of:
https://github.com/boutier/quagga-merge
From the branch babel-merge
I copied the babeld directory into FRR and then fixed up everything to
compile.
Babeld at this point in time when run will more than likely crash and burn
in it's interfactions with zebra.
I might have messed up the cli, which will need to be looked at
extract.pl.in and vtysh.c need to be fixed up.  Additionally we probably
need to work on DEFUN_NOSH conversion in babeld as well
This code comes from:
Matthieu Boutier <boutier@irif.fr>
Juliusz Chroboczek <jch@irif.fr>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
Ticket: CM-9274
Reviewed By: sharpd@cumulusnetworks.com
Testing Done:
<DETAILED DESCRIPTION (REPLACE)>
 | 
 | 
Modify the daemons to integrate with systemd, if it is enabled via configure,
and to notify systemd that they are running/stopping and to send watch
notifications.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
zclient.c depended upon link time inclusion of a
extern struct thread_master *master.  This is a violation of the
namespace of the calling daemon.  If a library needs the pointer
pass it in and save it for future use.
This code change also makes the zclient code consistent with
the other lib functions that need to schedule work on your behalf
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
 | 
 | 
——————————————-------------
- etc/init.d/quagga is modified to support creating separate ospf daemon
  process for each instance. Each individual instance is monitored by
  watchquagga just like any protocol daemons.(requires initd-mi.patch).
- Vtysh is modified to able to connect to multiple daemons of the same
  protocol (supported for OSPF only for now).
- ospfd is modified to remember the Instance-ID that its invoked with. For
  the entire life of the process it caters to any command request that
  matches that instance-ID (unless its a non instance specific command).
  Routes/messages to zebra are tagged with instance-ID.
- zebra route/redistribute mechanisms are modified to work with
  [protocol type + instance-id]
- bgpd now has ability to have multiple instance specific redistribution
  for a protocol (OSPF only supported/tested for now).
- zlog ability to display instance-id besides the protocol/daemon name.
- Changes in other daemons are to because of the needed integration with
  some of the modified APIs/routines. (Didn’t prefer replicating too many
  separate instance specific APIs.)
- config/show/debug commands are modified to take instance-id argument
  as appropriate.
Guidelines to start using multi-instance ospf
---------------------------------------------
The patch is backward compatible, i.e for any previous way of single ospf
deamon(router ospf <cr>) will continue to work as is, including all the
show commands etc.
To enable multiple instances, do the following:
     1. service quagga stop
     2. Modify /etc/quagga/daemons to add instance-ids of each desired
        instance in the following format:
        ospfd=“yes"
        ospfd_instances="1,2,3"
	assuming you want to enable 3 instances with those instance ids.
     3. Create corresponding ospfd config files as ospfd-1.conf, ospfd-2.conf
        and ospfd-3.conf.
     4. service quagga start/restart
     5. Verify that the deamons are started as expected. You should see
        ospfd started with -n <instance-id> option.
     	ps –ef | grep quagga
     	With that /var/run/quagga/ should have ospfd-<instance-id>.pid and
	ospfd-<instance-id>/vty to each instance.
     6. vtysh to work with instances as you would with any other deamons.
     7. Overall most quagga semantics are the same working with the instance
     	deamon, like it is for any other daemon.
NOTE:
     To safeguard against errors leading to too many processes getting invoked,
     a hard limit on number of instance-ids is in place, currently its 5.
     Allowed instance-id range is <1-65535>
     Once daemons are up, show running from vtysh should show the instance-id
     of  each daemon as 'router ospf <instance-id>’  (without needing explicit
     configuration)
     Instance-id can not be changed via vtysh, other router ospf configuration
     is allowed as before.
Signed-off-by: Vipin Kumar <vipin@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Dinesh G Dutt <ddutt@cumulusnetworks.com>
 | 
 | 
Add support for keyword commands.
Includes new documentation for DEFUN() in lib/command.h, for preexisting
features as well as new keyword specification.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
 | 
 | 
Use the array_size() helper macro.  Replaces several instances of local
macros with the same definition.
Reviewed-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
 | 
 | 
This is the functionality described in Appendix C of RFC 6126.  Its
main purpose is to avoid keeping a full source table, which makes it
possible to implement a subset of Babel in just a few hundred lines of
code.  However, in Quagga the code for maintaining the source table is
already there, and a parasitic implementation can be simulated using
filtering -- so it makes little sense to keep the functionality.
 | 
 | 
This commit makes the following lines visible in running-config text,
when respective intervals are configured to non-default values:
* babel hello-interval
* babel update-interval
* babel resend-delay
 | 
 | 
Standalone babeld has a configuration interface that is not used in
Quagga.  This removes a few bits of this code that survived the
port to Quagga.
 | 
 | 
The primary focus of this commit is to make "show running-config"
command display more current configuration, including some of the bits
previously seen in the output of "show babel running-config". Besides
that, the following commands were renamed for consistency with the
syntax of other components:
"debug *" to "debug babel *" (and moved to top level)
"show babel running-config" to "show babel parameters"
* babel_interface.c
  * show_babel_running_config(): rename to show_babel_parameters(),
    update syntax pattern, don't call show_babeld_configuration()
  * babel_if_init(): update respectively
  * babel_enable_if_config_write(): new VTY helper for static
    babel_enable_if
* babel_interface.h: add extern declaration
* babel_main.c: unset all debug options by default
  * show_babel_main_configuration(): remove debug options decoder
* babel_zebra.c
  * babel_debug(): rename to debug_babel(), update syntax pattern
  * no_babel_debug(): rename to no_debug_babel(), update syntax pattern
  * babelz_zebra_init(): update respectively
  * debug_babel_config_write() new VTY helper for static debug_type
* babel_zebra.h: add extern declaration
* babeld.c
  * babel_config_write(): add the code to output "debug babel *",
    "router babel", "redistribute *" and "network *" statements
  * show_babeld_configuration(): dismiss
* babeld.h: remove extern declaration
* babeld.texi: update for renamed commands
* babeld.conf.sample: idem, add debug statements block
 |