summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_spf.c
Commit message (Collapse)AuthorAgeFilesLines
* *: use an ifindex_t type, defined in lib/if.h, for ifindex valuesPaul Jakma2016-02-261-2/+6
|
* *: use void * for printing pointersDavid Lamparter2015-04-211-1/+1
| | | | | | | | | 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>
* *: use long long to print time_tDavid Lamparter2015-04-191-4/+5
| | | | | | | | | | | | Since we can't assume time_t to be long, int, or even long long, this consistently uses %lld/long long (or %llu/unsigned long long in a few cases) to print time_t/susecond_t values. This should fix a bunch of warnings, on NetBSD in particular. (Unfortunately, there seems to be no "PRId64" style printing macro for time_t...) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Fix most compiler warnings in default GCC build.Paul Jakma2014-09-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix lots of warnings. Some const and type-pun breaks strict-aliasing warnings left but much reduced. * bgp_advertise.h: (struct bgp_advertise_fifo) is functionally identical to (struct fifo), so just use that. Makes it clearer the beginning of (struct bgp_advertise) is compatible with with (struct fifo), which seems to be enough for gcc. Add a BGP_ADV_FIFO_HEAD macro to contain the right cast to try shut up type-punning breaks strict aliasing warnings. * bgp_packet.c: Use BGP_ADV_FIFO_HEAD. (bgp_route_refresh_receive) fix an interesting logic error in (!ok || (ret != BLAH)) where ret is only well-defined if ok. * bgp_vty.c: Peer commands should use bgp_vty_return to set their return. * jhash.{c,h}: Can take const on * args without adding issues & fix warnings. * libospf.h: LSA sequence numbers use the unsigned range of values, and constants need to be set to unsigned, or it causes warnings in ospf6d. * md5.h: signedness of caddr_t is implementation specific, change to an explicit (uint_8 *), fix sign/unsigned comparison warnings. * vty.c: (vty_log_fixed) const on level is well-intentioned, but not going to fly given iov_base. * workqueue.c: ALL_LIST_ELEMENTS_RO tests for null pointer, which is always true for address of static variable. Correct but pointless warning in this case, but use a 2nd pointer to shut it up. * ospf6_route.h: Add a comment about the use of (struct prefix) to stuff 2 different 32 bit IDs into in (struct ospf6_route), and the resulting type-pun strict-alias breakage warnings this causes. Need to use 2 different fields to fix that warning? general: * remove unused variables, other than a few cases where they serve a sufficiently useful documentary purpose (e.g. for code that needs fixing), or they're required dummies. In those cases, try mark them as unused. * Remove dead code that can't be reached. * Quite a few 'no ...' forms of vty commands take arguments, but do not check the argument matches the command being negated. E.g., should 'distance X <prefix>' succeed if previously 'distance Y <prefix>' was set? Or should it be required that the distance match the previously configured distance for the prefix? Ultimately, probably better to be strict about this. However, changing from slack to strict might expose problems in command aliases and tools. * Fix uninitialised use of variables. * Fix sign/unsigned comparison warnings by making signedness of types consistent. * Mark functions as static where their use is restricted to the same compilation unit. * Add required headers * Move constants defined in headers into code. * remove dead, unused functions that have no debug purpose.
* ospf6d: add SPF logs, statistics, and display of SPF parametersDinesh Dutt2013-11-071-2/+50
| | | | | | | | Signed-off-by: Pradosh Mohapatra <pmohapat at cumulusnetworks.com> Reviewed-by: Scott Feldman <sfeldma at cumulusnetworks.com> [DL: adapted to rebase / readded randomly lost line] [DL: killed timeval_subtract] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: add overload supportDinesh Dutt2013-11-071-0/+5
| | | | | | | | | | | | | | OSPFv3: Support setting/clearing overload bit on router It is sometimes necessary for a router to gracefully remove itself from the SPF tree i.e. it cannot act as a transit router. It does this by setting the overload bit in the router LSA. This patch adds support for enabling/disabling the overload bit. Signed-off-by: Dinesh G Dutt <ddutt at cumulusnetworks.com> Reviewed-by: Pradosh Mohapatra <pmohapat at cumulusnetworks.com> [DL: patch applied with fuzz] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: schedule SPF to run on events rather than directly on each event.Dinesh Dutt2013-11-071-17/+172
| | | | | | | | | | | | | | OSPV3 SPF triggers on every SPF-able event instead of using timers the way OSPFv2 does. This patch makes SPF be triggered/throttled similar to OSPFv2. It adds a command to quagga identical to the OSPFv2 equivalent to configure these timers. Summary: Signed-off-by: Dinesh Dutt <ddutt at cumulusnetworks.com> Reviewed-by: Scott Feldman <sfeldma at cumulusnetworks.com> [DL: removed reference to oa->ts_spf for rebase] [DL: killed timeval_subtract] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: complete SNMP implementation of ospfv3AreaTableVincent Bernat2012-06-251-0/+2
|
* ospf6d: always remove the result of a previous SPF calculationTom Goff2011-12-141-2/+2
| | | | | | | | | This is needed to avoid stale routes in some cases; the regression was introduced by commit 1d19234e79c77a7d55194b513f2a77c6a691bc2c. * ospf6_spf.c: (ospf6_spf_calculation) Call ospf6_spf_table_finish() before possibly returning if no router-LSA is found for the root of the SPF tree.
* ospf6d: address more trivial compiler warningsDenis Ovsienko2011-09-271-2/+1
| | | | | | | * ospf6_main.c: include required headers * ospf6_asbr.h: idem * ospf6_spf.c * ospf6_spf_install(): remove unused variables
* ospf6d: Fix memory allocation issues in SPFTom Goff2011-03-211-6/+7
| | | | | | | | * ospf6_area.c: Call ospf6_spf_table_finish() before deleting the spf table. This ensures that the associated ospf6_vertex structures are also freed. * ospf6_spf.c: Only allocate a priority queue when a spf calculation is actually performed. Also defer calling ospf6_spf_table_finish().
* ospf6d: fix crash in SPF calculationDmitrij Tejblum2011-01-131-17/+5
| | | | | | | * ospf6_spf.c: Don't replace a node with another node with a lower number of hops, instead get them from the queue in the correct order. (Actually, the replacement crashed the ospf6d daemon rather than worked.)
* Convert ospf6d over to quagga_gettime() wrappers.Takashi Sogabe2009-06-221-2/+2
|
* [trivia] finish off static'ification of ospf6d and ripngdPaul Jakma2008-08-221-12/+12
| | | | | | | | | 2008-08-15 Paul Jakma <paul.jakma@sun.com> * {ospf6d,ripngd}/*: Finish job of marking functions as static, or exporting declarations for them, to quell warning noise with Quagga's GCC default high-level of warning flags. Thus allowing remaining, more useful warnings to be more easily seen.
* 2005-04-07 Paul Jakma <paul.jakma@sun.com>quagga_post_listloop_cleanuppaul2005-04-071-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * (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.
* *.c: Change level of debug messages to LOG_DEBUG.hasso2004-12-241-18/+18
|
* Merge svn revisions 1208, 1222 and 1228 from Zebra cvs.hasso2004-11-251-7/+70
|
* 2004-10-10 Paul Jakma <paul@dishone.st>paul2004-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * ospf6_route.c: Add const qualifier to various char arrays of constants. signed/unsigned fixes. (ospf6_linkstate_table_show) argv is const * ospf6_snmp.c: listnode typedef is dead. (ospf6_snmp_init) Take struct thread_master arg, needed for smux_init. * ospf6_snmp.h: update ospf6_snmp_init declaration. * ospf6d.c: (ospf6_init) add const qualifier to sargv, pass master to ospf_snmp6_init. * ospf6_asbr.c: const char update. * ospf6_interface.c: ditto, plus signed/unsigned fixes. (ipv6_ospf6_cost) Check whether cost fits in u_int32_t and use strtoul. * ospf6_intra.c: const char update. Parenthesise expression. * ospf6_lsa.c: signed/unsigned and const char updates. * ospf6_proto.c: ditto. * ospf6_message.c: ditto. * ospf6_lsdb.c: signed/unsigned update. * ospf6_main.c: const char update. * ospf6_neighbor.c: ditto. * ospf6_spf.c: ditto. * ospf6_top.c: ditto.
* Remove usage of evil list and listnode typedefs.hasso2004-09-231-2/+2
|
* Merge svn revision 975 from Zebra repository.hasso2004-09-011-1/+1
|
* Merge svn revisions 924 and 925 from Zebra CVS. Also remove uselesshasso2004-08-191-41/+43
| | | | | ospf6_lsdb prototype declaration from ospf6_lsa.h. Report sent to Yasuhiro Ohara as well.
* SVN revisions 916-920 from Zebra. ABR support is almost done.hasso2004-08-151-4/+9
|
* SVN revision 907 from Zebra cvs repository.hasso2004-08-041-5/+5
|
* Ospf6d merge from Zebra repository with added privs stuff and mergedhasso2004-05-181-1248/+438
| | | | zclient changes.
* Initial revisionpaul2002-12-131-0/+1454