summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_interface.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ospf6d: fix two "show" commandsRenato Westphal2018-10-201-2/+12
| | | | | | | | | | | | The "show ipv6 ospf6 interface [IFNAME] prefix" command shouldn't accept the "match" keyword when a prefix is not given, otherwise ospf6d will crash. Fixes the following crashes: ospf6d aborted: vtysh -c "show ipv6 ospf6 interface eth99 prefix match" ospf6d aborted: vtysh -c "show ipv6 ospf6 interface prefix match" 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>
* *: ALLOC calls cannot failDonald Sharp2018-08-111-6/+0
| | | | | | | | 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>
* ospf6d: unchecked return value (Coverity 1221437)paco2018-06-151-2/+1
| | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* ospf6d: remove ospf6_interface_if_delQuentin Young2018-04-131-22/+0
| | | | | | Unused and contains obvious NPD Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: use C99 standard fixed-width integer typesQuentin Young2018-03-271-11/+11
| | | | | | | | | | | | | | | | | | | | | | 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>
* *: conform with COMMUNITY.md formatting rules, via 'make indent'Lou Berger2018-03-061-26/+18
| | | | Signed-off-by: Lou Berger <lberger@labn.net>
* ospf6d: Handle Premature Aging of LSAsChirag Shah2018-02-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC 2328 (14.1) Premature aging of LSAs from routing domain : When ospf6d is going away (router going down), send MAXAGEd self originated LSAs to all neighbors in routing domain to trigger Premature aging to remove from resepective LSDBs. Neighbor Router Reboot: Upon receiving Self-originate MAXAGEd LSA, simply discard, Current copy could be non maxaged latest. For neighbor advertised LSA's (current copy in LSDB) is set to MAXAGE but received new LSA with Non-MAXAGE (with current age), discard the current MAXAGE LSA, Send latest copy of LSA to neighbors and update the LSDB with new LSA. When a neighbor transition to FULL, trigger AS-External LSAs update from external LSDB to new neighbor. Testing: R1 ---- DUT --- R5 | \ R2 R3 | R4 Area 1: R5 and DUT Area 0: DUT, R1, R2, R3 Area 2: R2 R4 Add IPv6 static routes at R5 Redistribute kernel routes at R5, Validate routes at R4, redistributed via backbone to area 2. Stop n start frr.service at R5 and validated MAXAGE LSAs then recent age LSAs in Database at DUT-R4. Validated external routes installed DUT to R4. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* ospf6d: Add protocol stats and show commandChirag Shah2018-01-161-0/+99
| | | | | | | | | | | | | | | | Add OSPFv3 Protocol incoming/outgoing packets stats. r3# show ipv6 ospf6 interface traffic Interface HELLO DB-Desc LS-Req LS-Update LS-Ack Rx/Tx Rx/Tx Rx/Tx Rx/Tx Rx/Tx -------------------------------------------------------------------------------------------- swp1 3/4 2/2 0/2 8/6 3/2 swp2 3/4 2/2 0/1 7/3 2/0 swp3 0/4 0/0 0/0 0/0 0/0 Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* ospf6d: Fix setting interface ipv6 ospf6 cost value (LSA hooks were never ↵Juergen Kammer2017-11-091-9/+14
| | | | | | | | | | | | called) Fixes: #1420 Signed-off-by: Juergen Kammer <j.kammer@eurodata.de> If the ipv6 ospf6 cost on an interface is changed, no recalculation of routes happens, though the interface structure is updated with the new value. The new cost will be used later, when LSA hooks are called for any other reason. Diagnosis: The DEFUN for the config command sets oi->cost and calls ospf6_interface_recalculate_cost(oi) whenever there is a change in the supplied value. ospf6_interface_recalculate_cost then gets the new cost for the interface by calling ospf6_interface_get_cost(oi), which returns oi->cost if a cost is manually set (i.e. we get the value we just set). ospf6_interface_recalculate_cost only calls the LSA hooks if there is a change - which obviously never happens if we compare the new value with itself.
* *: use the FOR_ALL_INTERFACES abstraction from babeldRenato Westphal2017-10-101-4/+4
| | | | | | | | | | This improves code readability and also future-proofs our codebase against new changes in the data structure used to store interfaces. The FOR_ALL_INTERFACES_ADDRESSES macro was also moved to lib/ but for now only babeld is using it. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: use rb-trees to store interfaces instead of sorted linked-listsRenato Westphal2017-10-101-8/+8
| | | | | | | | | | | This is an important optimization for users running FRR on systems with a large number of interfaces (e.g. thousands of tunnels). Red-black trees scale much better than sorted linked-lists and also store the elements in an ordered way (contrary to hash tables). This is a big patch but the interesting bits are all in lib/if.[ch]. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: 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>
* ospf6d: OSPFv3 interface bandwidth handlingChirag Shah2017-09-191-2/+11
| | | | | | | if bandwidth is not set from Zebra use speed as bandwidth for ospfv3 route cost. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* *: remove empty "interface XYZ" config blocksDavid Lamparter2017-08-291-2/+2
| | | | | | | | Using the previously-added vty_frame() support, this gets rid of all the pointless empty "interface XYZ" blocks that get added for any interface that shows up in the system (e.g. dummys, tunnels, etc.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: add `no` forms for interface commandsQuentin Young2017-08-221-21/+87
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* ospfd, ospf6d: cleanup some `no` commandsQuentin Young2017-08-221-6/+7
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* Revert "*: reindent pt. 2"David Lamparter2017-07-221-4/+3
| | | | | | | | | 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-171-3/+4
| | | | | | | | w/ clang 5 * reflow comments * struct members go 1 per line * binpack algo was adjusted
* *: reindentreindent-master-afterwhitespace / reindent2017-07-171-1429/+1357
| | | | | | 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 table-hash-ospf6-lsdb-refactorDavid Lamparter2017-07-141-79/+69
|\ | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * Merge remote-tracking branch 'frr/master' into newline-reduxDavid Lamparter2017-07-141-3/+3
| |\ | | | | | | | | | | | | | | | 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-3/+3
| | | | | | | | | | | | | | | | | | | | | 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 4 of 6David Lamparter2017-07-141-65/+55
| | | | | | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * | *: remove VTYNL, part 2 of 6David Lamparter2017-07-141-10/+10
| | | | | | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * | ospf6d: VNL -> VTYNLDavid Lamparter2017-07-141-45/+45
| | | | | | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * | *: ditch vty_outln(), part 1 of 2David Lamparter2017-07-131-1/+1
| |/ | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* / ospf6d: use macro for LSDB walksDavid Lamparter2017-07-111-4/+2
|/ | | | | | ... to make it easier to refactor all of the iteration uses. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: fix excess docstringQuentin Young2017-07-051-3/+1
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: use vty_outlnQuentin Young2017-06-291-1/+1
| | | | | | Saves 400 lines Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* ospf6d: add buffer length check to ifmtu changesDon Slice2017-06-281-2/+13
| | | | | | | | Previous fix was missing the possibility of having to modify the io buffer size if the kernel reports an new mtu value. This fix adds that check. Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
* ospf6d: fix ifmtu settings when kernel changes valuesDon Slice2017-06-261-7/+27
| | | | | | | | | | | | | | | Problem reported by customer that if an mtu value was set in the kernel, quagga/frr would get very confused about what had been configured and what had been learned. This caused peers to not be successfully established. Resolved by keeping a configuration value separate than the operational value and set the operational accordingly. If configured, it wins unless the config defines a value that is higher than the kernel supports. Ticket: CM-16876 Signed-off-by: Don Slice <dslice@cumulusnetworks.com> Reviewed By: CCR-6399 Testing Done: Manual testing successful, submitter tested, ospf-smoke completed with no new failures.
* *: 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>
* *: update thread_add_* callsQuentin Young2017-05-091-5/+6
| | | | | | | | | | | | 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-091-17/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* *: use hooks for sending SNMP trapsDavid Lamparter2017-03-251-11/+4
| | | | | | | This means there are no ties into the SNMP code anymore other than the init call at startup. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: Refactor if_lookup_by_name to be VRF awareDonald Sharp2017-03-151-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>
* Merge remote-tracking branch 'origin/stable/2.0'Donald Sharp2017-02-071-1/+1
|\
| * ospf6d: Fix compile warningsDonald Sharp2017-02-031-1/+1
| | | | | | | | | | | | | | These compile issues were found by running ./buildtest.sh on a fedora 25 box. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | *: use monotime()David Lamparter2017-01-231-1/+1
| | | | | | | | | | | | This is largely a bulk-replace made with coccinelle. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: coccinelle-replace vty->indexDavid Lamparter2016-12-091-51/+20
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | ospfd, ospf6d: add qobj registrationsDavid Lamparter2016-12-091-0/+5
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: make DEFUN installations file-localDavid Lamparter2016-12-011-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves all install_element calls into the file where the DEFUNs are located. This fixes several small related bugs: - ospf6d wasn't installing a "no interface FOO" command - zebra had a useless copy of "interface FOO" - pimd's copy of "interface FOO" was not setting qobj_index, which means "description LINE" commands would fail with an error The next commit will do the actual act of making "foo_cmd" static. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | lib, ospf6d: Change SECONDS_STR to be more genericQuentin Young2016-11-171-2/+1
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | ospfd, ospf6d: Clean up and unify doc stringsQuentin Young2016-11-171-7/+7
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | Merge branch 'cmaster-next' into vtysh-grammarQuentin Young2016-10-181-3/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com> Conflicts: bgpd/bgp_route.c bgpd/bgp_routemap.c bgpd/bgp_vty.c isisd/isis_redist.c isisd/isis_routemap.c isisd/isis_vty.c isisd/isisd.c lib/command.c lib/distribute.c lib/if.c lib/keychain.c lib/routemap.c lib/routemap.h ospf6d/ospf6_asbr.c ospf6d/ospf6_interface.c ospf6d/ospf6_neighbor.c ospf6d/ospf6_top.c ospf6d/ospf6_zebra.c ospf6d/ospf6d.c ospfd/ospf_routemap.c ospfd/ospf_vty.c ripd/rip_routemap.c ripngd/ripng_routemap.c vtysh/extract.pl.in vtysh/vtysh.c zebra/interface.c zebra/irdp_interface.c zebra/rt_netlink.c zebra/rtadv.c zebra/test_main.c zebra/zebra_routemap.c zebra/zebra_vty.c
| * *: Consolidate all double VIEW_NODE and ENABLE_NODE'sDonald Sharp2016-10-081-8/+0
| | | | | | | | | | | | | | | | If a command is put into the VIEW_NODE, it is going into the ENABLE_NODE as well. This is especially true for show commands. As such if a command is in both consolidate it down to VIEW_NODE. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | *: rename all instances of OSPFv6 to OSPF6 or OSPFv3Renato Westphal2016-10-131-1/+1
| | | | | | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | ospfd, ospf6d, ripd: Fix miscellaneous syntax errorsQuentin Young2016-10-041-1/+1
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>