summaryrefslogtreecommitdiffstats
path: root/ripd/rip_offset.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: auto-convert to SPDX License IDsDavid Lamparter2023-02-091-16/+1
| | | | | | Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: Fix spelling of modifedDonald Sharp2022-04-191-2/+2
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: require semicolon after DEFINE_MTYPE & coDavid Lamparter2021-03-171-1/+1
| | | | | | | | | | | | | | | | | Back when I put this together in 2015, ISO C11 was still reasonably new and we couldn't require it just yet. Without ISO C11, there is no "good" way (only bad hacks) to require a semicolon after a macro that ends with a function definition. And if you added one anyway, you'd get "spurious semicolon" warnings on some compilers... With C11, `_Static_assert()` at the end of a macro will make it so that the semicolon is properly required, consumed, and not warned about. Consistently requiring semicolons after "file-level" macros matches Linux kernel coding style and helps some editors against mis-syntax'ing these macros. Signed-off-by: David Lamparter <equinox@diac24.net>
* ripd: use MTYPE_STATICDavid Lamparter2019-06-211-0/+2
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ripd, ripngd: fix cleaning up of offset listsRenato Westphal2019-04-191-0/+5
| | | | | | | | | | | | | | | | | We should never attempt to remove a list item in the "del" callback of the list. This is already performed by the list_delete() function, doing it twice leads to crashes or memory corruption. Introduce the offset_list_free() function so that we can separate the removal and deallocation of offset lists into separate functions, without code duplication. offset_list_del() will be used by the northbound callbacks to remove offset lists, while offset_list_free() will be used by rip_clean() to clean up all RIP offset lists using list_delete(). Do the same for ripngd. This is a fallout from the ripd/ripngd northbound conversion. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ripd: remove the rip global variableRenato Westphal2019-01-181-7/+11
| | | | | | | | | | | | | | | | This is the last step to make ripd ready for multi-instance support. Remove the rip global variable and add a "rip" parameter to all functions that need to know the RIP instance they are working on. On some functions, retrieve the RIP instance from the interface variable when it exists (this assumes interfaces can pertain to one RIP instance at most, which is ok for VRF support). In preparation for the next commits (VRF support), add a "vrd_id" member to the rip structure, and use rip->vrf_id instead of VRF_DEFAULT wherever possible. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ripd: move "rip_offset_list_master" to the rip structureRenato Westphal2019-01-181-23/+4
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ripd: retrofit the 'offset-list' command to the new northbound modelRenato Westphal2018-10-271-266/+24
| | | | | | | | | | | | | | Remove the rip_offset_list_set() and rip_offset_list_unset() functions since they set/unset multiple configuration options at the same time. The northbound callbacks need to set/unset configuration options individually. The frr-ripd YANG module models the "offset-list" command using a list keyed by the 'interface' and 'direction' leafs. One important detail is that the IFNAME parameter is optional, and when it's not present it means we want to match all interfaces. This is modeled using an interface name of '*' since key lists are mandatory by definition in YANG. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: list_delete_and_null() -> list_delete()David Lamparter2018-10-021-1/+1
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* *: use C99 standard fixed-width integer typesQuentin Young2018-03-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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>
* *: Convert list_delete(struct list *) to ** to allow nullingDonald Sharp2017-10-051-1/+1
| | | | | | | | | | | | | | | | | | | Convert the list_delete(struct list *) function to use struct list **. This is to allow the list pointer to be nulled. I keep running into uses of this list_delete function where we forget to set the returned pointer to NULL and attempt to use it and then experience a crash, usually after the developer has long since left the building. Let's make the api explicit in it setting the list pointer to null. Cynical Prediction: This code will expose a attempt to use the NULL'ed list pointer in some obscure bit of code. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: reindentreindent-master-afterwhitespace / reindent2017-07-171-279/+266
| | | | | | 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-141-5/+5
|\ | | | | | | | | | | 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-131-5/+5
| | | | | | | | | | | | | | 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.
* | *: ditch vty_outln(), part 1 of 2David Lamparter2017-07-131-9/+9
|/ | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: use vty_outlnQuentin Young2017-06-291-15/+13
| | | | | | Saves 400 lines Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: make consistent & update GPLv2 file headersDavid Lamparter2017-05-151-4/+3
| | | | | | | | | | | 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>
* ripd: add 'int idx_foo' argv index variablesDaniel Walton2016-09-231-4/+18
| | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
* convert <1-255> to (1-255), ()s to <>s, etcDaniel Walton2016-09-231-4/+4
| | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
* ripd: argv updateDaniel Walton2016-09-231-4/+4
| | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
* Revert "ripd: Fixup code to work under new way"Daniel Walton2016-09-221-4/+4
| | | | This reverts commit 224a3ed809ae23539cd49b85ada8516cb0b0a762.
* ripd: Fixup code to work under new wayDonald Sharp2016-09-211-4/+4
|
* [cleanup] Convert XMALLOC/memset to XCALLOCStephen Hemminger2009-06-121-5/+1
| | | | Simple conversion of XMALLOC/memset to XCALLOC
* 2005-10-26 Paul Jakma <paul.jakma@sun.com>paul2005-10-261-10/+12
| | | | | | * (general) static/extern functions and definitions. * rip_interface.h: new file, export the public functions from rip_interface.c
* 2005-04-07 Paul Jakma <paul.jakma@sun.com>paul2005-04-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * (global): Fix up list loops to match changes in lib/linklist, and some basic auditing of usage. * configure.ac: define QUAGGA_NO_DEPRECATED_INTERFACES * HACKING: Add notes about deprecating interfaces and commands. * lib/linklist.h: Add usage comments. Rename getdata macro to listgetdata. Rename nextnode to listnextnode and fix its odd behaviour to be less dangerous. Make listgetdata macro assert node is not null, NULL list entries should be bug condition. ALL_LIST_ELEMENTS, new macro, forward-referencing macro for use with for loop, Suggested by Jim Carlson of Sun. Add ALL_LIST_ELEMENTS_RO for cases which obviously do not need the "safety" of previous macro. LISTNODE_ADD and DELETE macros renamed to ATTACH, DETACH, to distinguish from the similarly named functions, and reflect their effect better. Add a QUAGGA_NO_DEPRECATED_INTERFACES define guarded section with the old defines which were modified above, for backwards compatibility - guarded to prevent Quagga using it.. * lib/linklist.c: fix up for linklist.h changes. * ospf6d/ospf6_abr.c: (ospf6_abr_examin_brouter) change to a single scan of the area list, rather than scanning all areas first for INTER_ROUTER and then again for INTER_NETWORK. According to 16.2, the scan should be area specific anyway, and further ospf6d does not seem to implement 16.3 anyway.
* Sync with changes in lib. Make more strings const.hasso2004-10-111-7/+8
|
* Initial revisionpaul2002-12-131-0/+414