summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_spf.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: ALLOC calls cannot failDonald Sharp2018-08-111-3/+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>
* *: use C99 standard fixed-width integer typesQuentin Young2018-03-271-14/+14
| | | | | | | | | | | | | | | | | | | | | | 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-6/+5
| | | | Signed-off-by: Lou Berger <lberger@labn.net>
* OSPFD: Add Experimental Segment Routing supportOlivier Dugeon2018-01-181-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an implementation of draft-ietf-ospf-segment-routing-extensions-24 and RFC7684 for Extended Link & Prefix Opaque LSA. Look to doc/OSPF_SR.rst for implementation details & known limitations. New files: - ospfd/ospf_sr.h: Segment Routing structure definition (SubTLVs + SRDB) - ospfd/ospf_sr.c: Main functions for Segment Routing support - ospfd/ospf_ext.h: TLVs and SubTLVs definition for RFC7684 - ospfd/ospf_ext.c: RFC7684 Extended Link / Prefix implementation - doc/OSPF-SRr.rst: Documentation Modified Files: - doc/ospfd.texi: Add new Segment Routing CLI command definition - lib/command.h: Add new string command for Segment Routing CLI - lib/mpls.h: Add default value for SRGB - lib/route_types.txt: Add new OSPF Segment Routing route type - ospfd/ospf_dump.[c,h]: Add OSPF SR debug - ospfd/ospf_memory.[c,h]: Add new Segment Routing memory type - ospfd/ospf_opaque.[c,h]: Add ospf_sr_init() starting function - ospfd/ospf_ri.c: Add new functions to Set/Get Segment Routing TLVs Add new ospf_router_info_lsa_upadte() to send Opaque LSA to ospf_sr.c() - ospfd/ospf_ri.h: Add new Router Information SR SubTLVs - ospfd/ospf_spf.c: Add new scheduler when running SPF to trigger update of NHLFE - ospfd/ospfd.h: Add new thread for Segment Routing scheduler - ospfd/subdir.am: Add new files - vtysh/Makefile.am: Add new ospf_sr.c file for vtysh - zebra/kernel_netlink.c: Add new OSPF_SR route type - zebra/rt_netlink.[c,h]: Add new OSPF_SR route type - zebra/zebra_mpls.h: Add new OSPF_SR route type Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* ospfd: Set filter to unbound debug logsChirag Shah2017-12-271-3/+1
| | | | | | Ticket:CM-19213 Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* *: Convert list_delete(struct list *) to ** to allow nullingDonald Sharp2017-10-051-5/+3
| | | | | | | | | | | | | | | | | | | 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>
* ospfd: OSPFv2 VRF SupportChirag Shah2017-10-031-6/+14
| | | | Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* ospfd: Fix ospfd crash in free_nexthopChirag Shah2017-08-151-3/+3
| | | | | | | | | | | | | Fix ANVL-OSPF-5.1 reported ospfd crash. vertex_nexthop_free was added as valgrind reported potential memory leak, but in some cases nexthop would not be available freed. The actual nexthop free is part of ospf_canonical_nexthops_free(), upon trying to free, qfree checks mtype count becomes 0 and asserts. Removing vertex_nexthop_free() from ospf_spf_flush_parents(). Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* ospfd: Fix conflict router-id, memory leaksChirag Shah2017-08-111-0/+2
| | | | | | | | | | | Remove assert in path of router_id_update: Upon configuring same router-id as neighbor's assert would cause a crash. Log a warning message and neighborship would not come up. Address memory leaks Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* *: reindentreindent-master-afterwhitespace / reindent2017-07-171-1186/+1185
| | | | | | indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Merge branch 'stable/3.0'David Lamparter2017-06-131-28/+24
|\ | | | | | | | | | | | | | | | | | | | | 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>
| * ospfd: fix stack underflowQuentin Young2017-06-061-28/+24
| | | | | | | | | | | | | | | | Fix #666 }:-) Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | *: make consistent & update GPLv2 file headersDavid Lamparter2017-05-151-18/+18
| | | | | | | | | | | | | | | | | | | | | | 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-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* *: Refactor ifindex2ifname to be VRF awareDonald Sharp2017-03-151-2/+2
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* ospfd: simplify SPF time consumption calculationsDavid Lamparter2017-01-231-21/+9
| | | | | | | monotime_since() does exactly the same thing. ... and timeval_elapsed is now private to lib/thread.c Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: use monotime()David Lamparter2017-01-231-11/+11
| | | | | | This is largely a bulk-replace made with coccinelle. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd: time: replace local helpers with monotimeDavid Lamparter2017-01-231-6/+4
| | | | | | | | This ditches tv_add, tv_sub, tv_cmp, etc. in favour of monotime{,_since,_until}() which actually makes the code much more readable in some locations. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd: Fix arm compile issueDonald Sharp2016-10-111-1/+1
| | | | | | size_t printf formatter is %zd! Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: add/cleanup initialisersDavid Lamparter2016-06-071-2/+1
| | | | | | | | There were some (inconsequential) warnings about uninitialised use of variables. Also, in one case, sub-structs were mixed in initialisation, which doesn't quite work as intended. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: use void * for printing pointersDavid Lamparter2016-05-301-2/+2
| | | | | | | | | On higher warning levels, compilers expect %p printf arguments to be void *. Since format string / argument warnings can be useful otherwise, let's get rid of this noise by sprinkling casts to void * over printf calls. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd: Some small tweaks to the SPF execution reason patchPaul Jakma2016-05-261-33/+40
| | | | | | | | | | | | | | | * ospf_spf.h: use an enum for the reason, and have it as a new argument to ospf_spf_calculate_schedule, no need for additional call, and let compiler do the checking. * ospf_spf.c: format changes - Quagga coding style places function names at the start of a new line, for easy grepping for definition. (ospf_spf_calculate_timer) Change the log format of SPF execution time to avoid ginormous line, and make logging conditional, as is the norm. (cherry picked from commit b6eef003e1a79471addea0b01853b08aed812cc8) Conflicts: ospfd/ospf_spf.c
* Quagga: Fixup some compile warningsDonald Sharp2015-11-231-1/+1
| | | | | | Fixup compile warnings for when you turn on --enable-gcc-ultra-verbose=yes Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* ospfd: ospfd-warnings.patchDonald Sharp2015-05-201-0/+1
| | | | | | Remove compile warnings for the ospfd/ospf6d directory Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by:
* Section 16.0 of rfc2328 (OSPF) specifies that the short-pathDonald Sharp2015-05-201-7/+0
| | | | | | | | | | | | | | | | | | | | calculation to a node should be constructed with the sum of all path costs (metrics) to the node (pretty simple huh). There is a usage of metric typified by the "max-metric router-lsa" command in many networking stacks that allows a router to gracefully "remove" itself from a topology by advertising the maximum value of metric in it's router LSAs (16 bits of "1"). In this case, the router will continue to forward any traffic sent to it while these "max-metric" LSAs are propagated through the network; at which point, the router can be taken out of service. The correct handling of this in ospfd would use this metric as part of the calculation, disuading other routers from using it for transit traffic (assuming a better path exits). Unfortunately, the ospfd behavior is to remove these links from the SPF calculation. This patch changes the behavior to omit this exception handling. Signed-off-by: JR Rivers <jrrivers@cumulusnetworks.com>
* ospfd-spf-stats.patchDonald Sharp2015-05-201-13/+102
| | | | | | | | | | | | | | | | | Compute and display SPF execution statistics Detailed SPF statistics, all around time spent executing various pieces of SPF such as the SPF algorithm itself, installing routes, pruning unreachable networks etc. Reason codes for firing up SPF are: R - Router LSA, N - Network LSA, S - Summary LSA, ABR - ABR status change, ASBR - ASBR Status Change, AS - ASBR Summary, M - MaxAge Signed-off-by: Dinesh G Dutt <ddutt@cumulusnetworks.com> Reviewed-by: JR Rivers <jrrivers@cumulusnetworks.com> Reviewed-by: Scott Feldman <sfeldma@cumulusnetworks.com> Reviewed-by: Ayan Banerjee <ayan@cumulusnetworks.com>
* *: nuke ^L (page feed)David Lamparter2014-06-041-6/+6
| | | | | | | | | | | | | | Quagga sources have inherited a slew of Page Feed (^L, \xC) characters from ancient history. Among other things, these break patchwork's XML-RPC API because \xC is not a valid character in XML documents. Nuke them from high orbit. Patches can be adapted simply by: sed -e 's%^L%%' -i filename.patch (you can type page feeds in some environments with Ctrl-V Ctrl-L) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd: restore nexthop IP for p2p interfacesChristian Franke2013-04-091-2/+16
| | | | | | | | | | | | | | | | | | | | | | | commit c81ee5c... "ospfd: Optimize and improve SPF nexthop calculation" subtly changed semantics of routes calculated over pointopoint links by removing the nexthop IP address and instead using an ifindex route. This breaks calculation of AS-Ext routes with a forwarding address since in ospf_ase_complete_direct_routes() this will be hit: if (op->nexthop.s_addr == 0) op->nexthop.s_addr = nexthop.s_addr; thus turning the route unusable by having an invalid nexthop. Fix by restoring the nexthop IP on routes over PtP links. This also allows running multi-access (Ethernet) interfaces in PtP mode again. This bug is a regression against 0.99.21 and only present in 0.99.22. Signed-off-by: Christian Franke <chris@opensourcerouting.org> [patch description and code comments rewritten] Acked-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Acked-by: James Li <jli@cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Revert "ospfd: Do not fall back to intervening router."Paul Jakma2012-10-191-4/+30
| | | | | | | | This reverts commit 9289c6ff55cd96c943d23e43fc9e5f987aa965ed. The commit reverted an earlier change which was fixed a bug that caused black-holes to remote destinations with multiple paths, that could occur during convergence. Overall, the previous code is more correct.
* ospfd: Do not fall back to intervening router.Joakim Tjernlund2012-07-251-15/+3
| | | | | | | | | | | | | | | The patch in bug 330 did two things. It add a return value whether ospf_nexthop_calculation() failed or not and also moved the return stmt for 16.1.1 para 5 so now SPF will fallback to the intervening router when no back links are found by 16.1.1 para 5. This is wrong and can potentially create black holes or routing loops according to Dave Katz and Acee Lindem at ospf@ietf.org Even if the current code could be proved to be harmless in all cases, it adds substantial extra processing and memory allocations. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf_spf_process_stubs: use LSA pos to find OSFP interfaceJoakim Tjernlund2012-07-251-1/+3
| | | | | | | | This is better than a prefix lookup as prefixes may not be unique, that is, the same prefix can exist on several interfaces. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd: Optimize and improve SPF nexthop calculationJoakim Tjernlund2012-07-251-83/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Maintain router LSA positions in OSPF interface. Find the OSPF interface in nexthop_calculation using the position in the router LSA. This is possible because the only time nexthop_calculation needs to look up interfaces is when dealing with its own Router LSA. This has the following advantages: - Multiple PtP interfaces with the same IP address between two routers. - Use Unnumbered PtP on just one end of the link. - Faster OI lookup for the OSPF interface and only done once for PtoP links. *ospf_interface.h: (struct ospf_interface) Add storage for storing router LSA position. *ospf_interface.c: (ospf_if_lookup_by_lsa_pos) lookup OSPF I/F in an area using LSA position. *ospf_lsa.c: (router_lsa_link_set) record Router LSA position. *ospf_spf.c: (ospf_spf_next) Count and pass along lsa position. (ospf_nexthop_calculation) Add lsa position argument. call ospf_if_lookup_by_lsa_pos() for OSFP interface handle. Clean up and remove all calls ospf_if_is_configured() the rest. Adjust a few debug logs. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd: avoid exhausting memory with OSPF vertices (BZ#476)David Lamparter2012-07-251-2/+15
| | | | | | | | | | | | | | | | This was found in scale testing at OSR; ospfd is adding the same link over and over again to the SPF tree. This fix prevents the resulting memory corruption from happening and adds a debug message to track occurence of this issue and/or confirm a proper fix. (This version was improved by Scott Feldman over the earlier RFC.) * ospfd/ospf_spf.c: (ospf_spf_add_parent) loop over existing vertices and refuse to add duplicates. Tested-by: Martin Winter <mwinter@opensourcerouting.org> Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd: remove unused codeStephen Hemminger2011-12-061-0/+2
| | | | | The code for nssa_range and other bits that were written but never used.
* ospfd: sizing macros cleanupDenis Ovsienko2011-09-271-10/+7
| | | | | | * ospf_spf.c * ROUTER_LSA_TOS_SIZE: prepend OSPF_ and move to ospf_lsa.h * ROUTER_LSA_MIN_SIZE: replace with existing OSPF_ROUTER_LSA_LINK_SIZE
* ospfd: update some commentsPaul Jakma2009-08-031-6/+13
| | | | | * ospf_{spf,lsa}.c: remove out of date comment; add comment on some non-obvious code; Make note of a possible scaling problem.
* ospfd: Change struct ospf_path *oi to ifindex.Joakim Tjernlund2009-08-031-2/+3
| | | | | | * global: In struct ospf_path, change struct ospf_interface *oi to int ifindex. It is unsafe to reference *oi as an ospf interface can be deleted under your feet. Use a weak reference instead.
* ospfd: Discriminate better when selecting links between vertices in SPFJoakim Tjernlund2009-07-301-7/+5
| | | | | | | | * ospf_spf.c: (ospf_get_next_link) One must check the vertex type, Router or Network, to select type link to match against. Link type 1 has neighbour router ID in link_id and link type 2 has IP address of DR. Since router id may have same value as an existing IP address one risks matching a router ID against a DR.
* [ospfd] Minor enhancements to recent self-host-routes suppression patchPaul Jakma2008-09-041-19/+15
| | | | | | | | | * ospf_spf.c: (ospf_spf_process_stubs) Track whether parent router vertex is the root, so that the host-route suppression logic need only be activated for such vertices. Move the actual logic to ospf_intra_add_stub. * ospf_route.c: (ospf_intra_add_stub) Main test of link moved here, notionally more appropriate.
* Ignore host routes to self.Joakim Tjernlund2008-08-251-1/+15
| | | | | | PtP links with /32 masks adds host routes to the remote host, see RFC 2328, 12.4.1.1, Option 1. Make sure that such routes are ignored
* [ospfd] Finish explanatory comment started in previous commit..Paul Jakma2007-08-071-1/+1
| | | | | | | 2007-08-07 Paul Jakma <paul.jakma@sun.com> * ospf_spf.c: (ospf_spf_next) Finish off the explanatory comment made in previous commit
* [ospfd] Fix bad SPF calculation on some topologies - incorrect sortingPaul Jakma2007-08-061-3/+6
| | | | | | | | | 2007-08-07 Atis Elsts <atis@mikrotik.com> * ospf_spf.c: (ospf_spf_next) Sort heap in correct direction after vertex cost is changed, thus fixing incorrect SPF calculation on certain topologies. * lib/pqueue.{c,h}: Export trickle_up
* [ospfd] Bug #330 regression: Fix ospf_spf_add_parent assertPaul Jakma2007-05-071-6/+16
| | | | | | | | | | | | 2007-05-07 Paul Jakma <paul.jakma@sun.com> * ospf_spf.c: (ospf_vertex_new) Dont init vertices to infinity, just let 0 be a special case. (ospf_spf_add_parent) 0 distance candidate vertex is special, cost still to be initialised - asserting that new distance is <= existing only makes sense where w already has a cost. (ospf_spf_next) Infinite cost links should not be followed, bar those of the root.
* [ospfd] Bug #330 regression: failure to calculate routes through networksPaul Jakma2007-03-231-1/+2
| | | | | | | | 2007-03-23 Paul Jakma <paul.jakma@sun.com> * ospf_spf.c: (ospf_nexthop_calculation) Fix silly regression causing ospfd to fail to calculate paths past networks not attached to root vertex, introduced with bug #330 fixes.
* [ospfd] Instrument ospf_spf with more debug log messagesPaul Jakma2007-03-231-3/+39
| | | | | | 2007-03-23 Paul Jakma <paul.jakma@sun.com> * ospf_spf.c: (various) Add more debug statements.
* [ospfd] Fix regression in SPF introduced by bug#330 fixesPaul Jakma2007-02-261-21/+25
| | | | | | | | | | | | | | | | | | | 2007-02-26 Paul Jakma <paul.jakma@sun.com> * ospf_spf.c: Fix regression introduced with bug #330 fix: The cost update added to ospf_spf_add_parent only handled PtP case, differing from same functionality in higher-level ospf_spf_next. Regression diagnosed by Anders Pedersen, mailnews+router-quagga-dev@news.cohaesio.com. (ospf_vertex_new) Initialise vertices to max-cost. (ospf_spf_init) Root vertex always creates with 0 cost. (ospf_spf_add_parent) Remove the buggy V->W cost calculating code, instead take the new distance as a parameter. (ospf_nexthop_calculation) Take distance as parameter, so it can be passed down to add_parent. (ospf_spf_next) Dont initialise candiate vertex distance, vertex_new does so already. Pass distance down to nexthop_calculation (see above).
* [ospfd] Bug #330: SPF must consider that nexthop-calc may failPaul Jakma2007-01-241-56/+65
| | | | | | | | | | | | | | | 2007-01-24 Paul Jakma <paul.jakma@sun.com> * ospf_spf.c: Bug #330: Nexthop calculation sometimes may fail, and it needs to indicate this result to SPF. (ospf_spf_add_parent) Flush of parent list needs to be done here, for simplicity. (ospf_nexthop_calculation) Caller needs to know whether nexthop calculation succeeded. Every return statement must correctly indicate such. (ospf_spf_next) Queueing/prioritisation of vertices in SPF must take into account whether nexthop_calculation succeeded, or SPF may fail to find best paths.
* [ospfd] Bug #134, ospfd should be more robust to backward time changePaul Jakma2006-08-271-2/+2
| | | | | | | | | | | | | | 2006-08-25 Paul Jakma <paul.jakma@sun.com> * (general) Bug #134. Be more robust to backward time changes, use the newly added libzebra time functions. In most cases: recent_time -> recent_relative_time() gettimeofday -> quagga_gettime (QUAGGA_CLK_MONOTONIC, ..) time -> quagga_time. (ospf_make_md5_digest) time() call deliberately not changed. (ospf_external_lsa_refresh) remove useless gettimeofday, LSA tv_orig time was already set in ospf_lsa_new, called via ospf_external_lsa_new.
* [ospfd] Fix SPF of virtual-linksPaul Jakma2006-05-041-51/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-04-24 Paul Jakma <paul.jakma@sun.com> * (general) More Virtual-link fixes, again with much help in testing / debug from Juergen Kammer. Primarily in SPF. * ospf_spf.h: Add guard. ospf_interface.h will include this header. * ospf_interface.h: Modify ospf_vl_lookup definition to take struct ospf as argument, so as to allow for NULL area argument. (struct ospf_vl_data) Remove out_oi, instead add a struct vertex_nexthop, to use as initial nexthop for backbone paths through a vlink. * ospf_interface.c: (ospf_vl_lookup) Modified to allow NULL area to be passed to indicate "any" (first) area. Add extra debug. (ospf_vl_set_params) vl_oi -> nexthop. Add extra debug. (ospf_vl_up_check) Fix debug, inet_ntoa returns a static buffer.. * ospf_route.c: (ospf_intra_add_router) Vlinks dont go through backbone, don't bother checking. * ospf_spf.c: (static struct list vertex_list) Record vertices that will need to be freed. (cmp) Order network before router vertices, as required, wasn't implemented. (vertex_nexthop_free) Mild additional robustness check. (vertex_parent_free) Take void argument, as this function is passed as list deconstructor for vertex parent list. (ospf_vertex_new) More debug. Set deconstructor for parent list. Track allocated vertices on the vertex_list. (ospf_vertex_free) Get rid of the tricky recursive cleanup of vertices. Now frees only the given vertex. (ospf_vertex_add_parent) Fix assert. (ospf_nexthop_calculation) Fix calculation of nexthop for VLink vertices, lookup the vl_data and use its previously recorded nexthop information. (ospf_spf_calculate) Vertices are freed simply by deleting vertex_list nodes and letting ospf_vertex_free as deconstructor work per-node. (ospf_spf_calculate_timer) Trivial optimisation, leave backbone SPF calculation till last to reduce SPF churn on VLink updates. * ospf_vty.c: (ospf_find_vl_data) update call to ospf_vl_lookup (no_ospf_area_vlink_cmd) ditto. (show_ip_ospf_interface_sub) For Vlinks, the peer address is more interesting than the output interface.