summaryrefslogtreecommitdiffstats
path: root/ripngd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Revert "*: reindent pt. 2"David Lamparter2017-07-223-13/+7
| | | | | | | | | This reverts commit c14777c6bfd0a446c85243d3a9835054a259c276. clang 5 is not widely available enough for people to indent with. This is particularly problematic when rebasing/adjusting branches. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: reindent pt. 2whitespace / reindent2017-07-173-7/+13
| | | | | | | | w/ clang 5 * reflow comments * struct members go 1 per line * binpack algo was adjusted
* *: reindentreindent-master-afterwhitespace / reindent2017-07-1715-5019/+4768
| | | | | | indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Merge remote-tracking branch 'frr/master' into newline-reduxDavid Lamparter2017-07-145-31/+31
|\ | | | | | | | | | | Lots of conflicts from CMD_WARNING_CONFIG_FAILED... Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * vtysh: return non-zero for configuration failuresDaniel Walton2017-07-135-31/+31
| | | | | | | | | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> This allows frr-reload.py (or anything else that scripts via vtysh) to know if the vtysh command worked or hit an error.
* | *: remove VTYNL, part 6 of 6David Lamparter2017-07-142-9/+7
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: remove VTYNL, part 4 of 6David Lamparter2017-07-141-12/+7
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: remove VTYNL, part 2 of 6David Lamparter2017-07-141-4/+4
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: remove VTYNL, part 1 of 6David Lamparter2017-07-141-4/+4
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: ditch vty_outln(), part 2 of 2David Lamparter2017-07-141-4/+4
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: ditch vty_outln(), part 1 of 2David Lamparter2017-07-136-71/+71
|/ | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ripngd: Fix zclient cleanup on shutdownDonald Sharp2017-06-303-0/+9
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: vty_outln (vty, "") --> vty_out (vty, VTYNL)Quentin Young2017-06-291-4/+4
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: s/VTY_NEWLINE/VTYNL/gQuentin Young2017-06-292-12/+12
| | | | | | Should be able to fit more vty_out onto one line now Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: use vty_outlnQuentin Young2017-06-296-125/+99
| | | | | | Saves 400 lines Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: remove VTY_GET_*Quentin Young2017-06-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CLI validates input tokens, so there's no need to do it in handler functions anymore. spatch follows ---------------- @getull@ expression v; expression str; @@ <... - VTY_GET_ULL(..., v, str) + v = strtoull (str, NULL, 10) ...> @getul@ expression v; expression str; @@ <... - VTY_GET_ULONG(..., v, str) + v = strtoul (str, NULL, 10) ...> @getintrange@ expression name; expression v; expression str; @@ <... - VTY_GET_INTEGER_RANGE(name, v, str, ...) + v = strtoul (str, NULL, 10) ...> @getint@ expression v; expression str; @@ <... - VTY_GET_INTEGER(..., v, str) + v = strtoul (str, NULL, 10) ...> @getv4@ expression v; expression str; @@ <... - VTY_GET_IPV4_ADDRESS(..., v, str) + inet_aton (str, &v) ...> @getv4pfx@ expression v; expression str; @@ <... - VTY_GET_IPV4_PREFIX(..., v, str) + str2prefix_ipv4 (str, &v) ...> Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* Merge branch 'stable/3.0'David Lamparter2017-06-131-0/+3
|\ | | | | | | | | | | | | | | | | | | | | Dropped: redhat/README.rpm_build.md redhat/daemons redhat/frr.init redhat/frr.logrotate redhat/frr.spec.in Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * ripngd: fix packet buffer memleakQuentin Young2017-06-061-0/+3
| | | | | | | | | | | | Fix #668 Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
| * Address the error "Dead assignment" of static analysifHung-Weic Chiu2017-05-101-6/+6
| | | | | | | | | | | | | | - Refer to https://ci1.netdef.org/browse/FRR-FRR4-44/artifact/shared/static_analysis/index.html - Remove unused variable Signed-off-by: Hung-Weic Chiu <sppsorrg@gmail.com>
* | ripngd: Let ripng announce interface turned on for usage.Donald Sharp2017-05-281-8/+5
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | ripngd: Fix missing newlines at end of help stringsDonald Sharp2017-05-282-5/+5
| | | | | | | | | | | | Found by visual inspection and some squinting Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | Merge pull request #537 from donaldsharp/vrf_stuffDavid Lamparter2017-05-171-1/+1
|\ \ | | | | | | Vrf stuff
| * | *: Consolidate vrf_hooks into vrf_initDonald Sharp2017-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | We only needed to add/change the vrf callbacks when we initialize the vrf subsystem. As such it is not necessary to handle the callbacks in any other way than through the init function. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | *: make consistent & update GPLv2 file headersDavid Lamparter2017-05-1516-64/+48
|/ / | | | | | | | | | | | | | | | | | | | | 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>
* | Address the error "Dead assignment" of static analysifHung-Weic Chiu2017-05-101-6/+6
| | | | | | | | | | | | | | - Refer to https://ci1.netdef.org/browse/FRR-FRR4-44/artifact/shared/static_analysis/index.html - Remove unused variable Signed-off-by: Hung-Weic Chiu <sppsorrg@gmail.com>
* | *: update thread_add_* callsQuentin Young2017-05-092-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | *: remove THREAD_ON macros, add nullity checkQuentin Young2017-05-094-18/+11
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* *: apply DEFUN_NOSH for node-switch CLI commandsDavid Lamparter2017-03-281-1/+1
| | | | | | | | | | These have copies in vtysh that do the node-switch locally and are listed in extract.pl's ignore list. The ignore list however is redundant since DEFUN_NOSH does the same thing... ldpd is a bit hacky, but Renato is reworking this anyway. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: Refactor ifindex2ifname to be VRF awareDonald Sharp2017-03-151-8/+8
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Refactor if_lookup_by_name to be VRF awareDonald Sharp2017-03-152-3/+3
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Remove non-vrf based ifindex lookupDonald Sharp2017-03-151-1/+1
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* lib: remove remaining struct zlog * argsDavid Lamparter2017-03-081-1/+1
| | | | | | These don't serve any purpose either. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: get rid of zlog(*, LOG_LEVEL, ...)David Lamparter2017-03-081-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Result of running the following Coccinelle patch + fixups: <<EOF /* long-forms: zlog(NULL, <level>, ...) * => zlog_level(...) */ @@ expression list args; @@ - zlog(NULL, LOG_DEBUG, args) + zlog_debug(args) @@ expression list args; @@ - zlog(NULL, LOG_NOTICE, args) + zlog_notice(args) @@ expression list args; @@ - zlog(NULL, LOG_INFO, args) + zlog_info(args) @@ expression list args; @@ - zlog(NULL, LOG_WARNING, args) + zlog_warn(args) @@ expression list args; @@ - zlog(NULL, LOG_ERR, args) + zlog_err(args) /* long-forms: zlog(base->log, <level>, ...) * => zlog_level(...) */ @@ expression base; expression list args; @@ - zlog(base->log, LOG_DEBUG, args) + zlog_debug(args) @@ expression base; expression list args; @@ - zlog(base->log, LOG_NOTICE, args) + zlog_notice(args) @@ expression base; expression list args; @@ - zlog(base->log, LOG_INFO, args) + zlog_info(args) @@ expression base; expression list args; @@ - zlog(base->log, LOG_WARNING, args) + zlog_warn(args) @@ expression base; expression list args; @@ - zlog(base->log, LOG_ERR, args) + zlog_err(args) EOF Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: add frr_run()David Lamparter2017-03-081-12/+1
| | | | | | | Contains the fetch-and-run-thread logic, and vty startup (which is the last thing happening before entering the main loop). Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: add frr_config_fork()David Lamparter2017-03-081-52/+5
| | | | | | | | | 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>
* *: centralize more into frr_init()David Lamparter2017-03-071-3/+0
| | | | | | Move CLI/VTY/Memory accounting init into frr_* Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: add frr_init() infrastructureDavid Lamparter2017-03-072-104/+25
| | | | | | | | | 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>
* Merge remote-tracking branch 'origin/stable/2.0'Donald Sharp2017-02-071-1/+1
|\
| * *: Convert libzebra -> libfrrDonald Sharp2017-02-031-1/+1
| | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/stable/2.0'Donald Sharp2017-02-021-2/+12
|\|
| * *: fix warning fallout from set_socket_pathDavid Lamparter2017-02-011-1/+1
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * ripngd: Add vty_socket cli option to override the compiled-in location for ↵Martin Winter2017-01-251-2/+12
| | | | | | | | | | | | the VTY Socket Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
* | *: read and ignore srcdest routes on ZAPIChristian Franke2017-01-301-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since zebra might be sending srcdest routes down to the various daemons, they need to understand the presence of the field at the very least. Sadly, that's also the best we can do at this point since none of the protocols has support for handling srcdest routes. The only consistent thing to do is to ignore them throughout. If an administrator wants to have the srcdest route as non-srcdest in a protocol, setting a non-srcdest static route (possibly blackhole) is probably the best way to go. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | lib: send ZAPI IPv6 source prefixDavid Lamparter2017-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This introduces ZAPI_MESSAGE_SRCPFX, and if set adds a source prefix field to ZAPI IPv6 route messages sent from daemons to zebra. The function calls all have a new prefix_ipv6 * argument specifying the source, or NULL. All daemons currently supply NULL. Zebra support for processing the field was added in the previous patch, however, zebra does not do anything useful with the value yet. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: Fix redistribute issueDonald Sharp2017-01-271-5/+5
| | | | | | | | | | | | | | | | | | | | Somewhere in the past we switched from using the auto-generated redistribute statements to a non-generated version. This caused us to loose new protocols to redistribute as they are added. Put it back. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | Merge branch 'master' into fix-proto_redistnumQuentin Young2017-01-072-14/+11
|\ \
| * | Merge remote-tracking branch 'origin/stable/2.0'Donald Sharp2017-01-062-14/+11
| |\|
| | * build: rename (2 of ?): route_types macrosDavid Lamparter2016-12-201-16/+16
| | | | | | | | | | | | | | | | | | | | | All of the autogenerated macros in lib/route_types.pl are now called FRR_* instead of QUAGGA_*. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| | * build: rename (1 of ?): configure.ac + preprocDavid Lamparter2016-12-201-6/+6
| | | | | | | | | | | | | | | | | | | | | This replaces Quagga -> FRR in most configure.ac settings as well as a handful of preprocessor macros in the source code. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | | all: use ->text when parsing protocol argumentQuentin Young2016-12-161-4/+7
|/ / | | | | | | | | | | and match on full protocol name in proto_redistnum() Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>