summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_interface.c
Commit message (Collapse)AuthorAgeFilesLines
* *: use an ifindex_t type, defined in lib/if.h, for ifindex valuesPaul Jakma2016-02-261-1/+1
|
* ospf6d: oi->cost is uint32, not shortDavid Lamparter2015-04-211-1/+1
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: add missing includesDavid Lamparter2015-04-211-0/+1
| | | | | | | Some places, particularly headers, were spewing warnings since they don't include neccessary other headers to get struct/enum definitions. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Fix most compiler warnings in default GCC build.Paul Jakma2014-09-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* *: nuke ^L (page feed)David Lamparter2014-06-041-3/+3
| | | | | | | | | | | | | | 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>
* ospf6d: add "auto-cost reference-bandwidth" commandVincent Bernat2014-03-211-1/+60
| | | | | | | | | | This command allows the user to change to default reference bandwidth for cost calculations. The default value is 100 Mbps. With a default bandwidth of 10 MBps, the default cost becomes 10. Those values are consistent with OSPFv2. [DL: resolved conflicts in vty command additions & docs] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: compute interface cost from its bandwidthVincent Bernat2014-03-211-14/+84
| | | | | | | | | | | | | | | | | Previously, the interface cost was a fixed default value that a user was allowed to change with "ipv6 ospf6 cost XX". As what is done with OSPFv2, we change this behaviour to compute the default interface cost from the interface bandwidth. The user can still force a cost with "ipv6 ospf6 cost XX". He can get the default value with "no ipv6 ospf6 cost". Moreover, the default cost value was 1. The cost is now computed from the bandwidth and a default reference bandwidth of 100 MBps (as for OSPFv2). Since the default bandwidth for an interface is 10 MBps, the "default" cost becomes 10 instead of 1. [DL: resolved conflict in ospf6d/ospf6_interface.c] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: fix interface_down() stopping hellosDavid Lamparter2014-03-181-1/+4
| | | | | | | | | interface_down() - which also handles some nonobvious cases like the last linklocal address disappearing - was previously not cancelling the hello timer. This had the effect of multiple such threads ending up scheduled after a quick down-up cycle. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: handle missing link local address more gracefullyChristian Franke2014-03-181-3/+14
| | | | | | | | | | ospf6 can't run on an interface without a link local address. Don't start the state machine when an interface comes up without such an ip and bring it up later, when a usable link local address is added. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: improve ordered shutdownChristian Franke2014-03-181-10/+12
| | | | | | | | Improve the _disable/_enable infrastructure so it gets into a more usable shape and make 'no router ospf6' actually work. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: clear DR info on interface_downChristian Franke2013-11-201-0/+4
| | | | | | | | This fixes an issue where ospf6d would send incorrect hellos and perform wrong DR election when an interface went down and up again. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* ospf6d: don't run DR election early on "ipv6 ospf6 priority"Christian Franke2013-11-201-1/+4
| | | | | | | On changing the router priority, DR election should only be run when it was completed at least once before. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* ospf6d: fix integrated configDinesh Dutt2013-11-201-0/+8
| | | | | | | | | | | | With integrated config, the line defining an interface to be p2p is defined before assigning the interface to an area. When during the interface transition, there is an attempt to generate a router LSA, the process crashes. This fix addresses that. Signed-off-by: Dinesh G Dutt <ddutt at cumulusnetworks.com> Reviewed-by: Pradosh Mohapatra <pmohapat at cumulusnetworks.com> Reviewed-by: Scott Feldman <sfeldma at cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: add SPF logs, statistics, and display of SPF parametersDinesh Dutt2013-11-071-4/+16
| | | | | | | | 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: fix linkdown handlingDinesh Dutt2013-11-071-3/+3
| | | | | | | | | | | | | | Ensure OSPFv3 handles link down even correctly. OSPFv3 checks only the administrative status of a link instead of its operative status. This prevents it up from detecting a real link down event and reacting appropriately. Only protocol timer timeouts make it detect a link down eventually. This patch makes it look for the operative status of a link instead of admin status. Signed-off-by: Dinesh G Dutt <ddutt at cumulusnetworks.com> Reviewed-by: James Li <jli at cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: add p2p interface supportDinesh Dutt2013-11-071-1/+104
| | | | | | | | Signed-off-by: Dinesh G Dutt <ddutt at cumulusnetworks.com> Signed-off-by: Ayan Banerjee <ayabaner at gmail.com> Reviewed-by: Scott Feldman <sfeldma at cumulusnetworks.com> Reviewed-by: James Li <jli at cumulusnetworks.com> 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-3/+9
| | | | | | | | | | | | | | 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/ospfd: refactor some common definesDinesh Dutt2013-10-221-3/+3
| | | | | | | | | Rearranging common defs and structures for use betweeen OSPFv2 and OSPFv3. Created a new file called libospf.h under lib directory to hold defines that are common between OSPFv2 and OSPFv3 code bases. [DL: split of defines refactor from timer refactor] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: add SNMP notifications/traps supportVincent Bernat2012-06-251-0/+11
| | | | Only implement ospfv3NbrStateChange and ospfv3IfStateChange.
* ospf6d: add SNMP implementation of ospfv3IfTableVincent Bernat2012-06-251-0/+1
|
* ospf6d: remove defaults from iface config (BZ#550)Vyacheslav Trushkin2012-02-211-23/+36
|
* ospf6d: justify multicast group managementVyacheslav Trushkin2011-12-131-4/+4
| | | | | | | | | | | * ospf6_network.[ch] * ospf6_sso(): new function supersedes ospf6_join_allspfrouters(), ospf6_leave_allspfrouters(), ospf6_join_alldrouters() and ospf6_leave_alldrouters() * ospf6_interface.c * ospf6_interface_state_change(): update respectively * interface_up(): ditto * interface_down(): ditto
* ospf6d: spellingDenis Ovsienko2011-09-271-4/+4
|
* ospf6d: copy "mtu-ignore" option from ospfdDmitrij Tejblum2011-04-221-0/+58
| | | | | | | | | | | | "mtu-ignore" is an option ospfd used to mimic from the vendor's implementation, now ospf6d will also implement it. * ospf6_interface.h: extend ospf6_interface structure by one flag * ospf6_interface.c: (ipv6_ospf6_mtu_ignore, no_ipv6_ospf6_mtu_ignore): new declarations; (ospf6_interface_create): show initial value for consistency; (ospf6_interface_show): print flag status * ospf6_message.c: (ospf6_dbdesc_recv): consider interface-specific flag when checking MTU
* ospf6d: Fix crash when '[no] ipv6 ospf6 advertise prefix-list' is in ↵David Ward2010-04-281-10/+18
| | | | | | | | | | | | | | | startup-config * ospf6_interface.c: When '[no] ipv6 ospf6 advertise prefix-list' appears in the startup configuration for ospf6d, a crash occurs, because ospf6d attempts to schedule LSAs when the 'oi->area' structure has not yet been initialized. Now, when the command above is issued (either in the startup configuration or at runtime), ospf6d will only schedule LSAs if the 'oi->area' structure has been initalized. A similar test is already used when handling the commands 'ipv6 ospf6 priority' and 'ipv6 ospf6 cost'.
* ospf6d: remove dead codeStephen Hemminger2009-12-101-17/+0
| | | | | | | | * ospf6d/ospf6_interface.c * loopind(): sayonara * ospf6d/ospf6_top.c * ospf6_delete(): comment out, it might be useful if real shutdown is added
* Convert ospf6d over to quagga_gettime() wrappers.Takashi Sogabe2009-06-221-1/+1
|
* [cleanup] Make command nodes staticStephen Hemminger2009-06-121-1/+1
| | | | | The cmd_nodes used to configure vty, can mostly be static so (basic data hiding 101).
* [cleanup] Convert XMALLOC/memset to XCALLOCStephen Hemminger2009-06-121-4/+2
| | | | Simple conversion of XMALLOC/memset to XCALLOC
* [trivia] finish off static'ification of ospf6d and ripngdPaul Jakma2008-08-221-11/+11
| | | | | | | | | 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.
* [ospf6d] GNU Zebra #3562: ABR Crash fix, memory fixes, route table debugsPaul Jakma2006-05-151-1/+2
| | | | | | | | 2006-02-22 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> * valgrind check and memory fix * route table identification string added * ospf6d.h: version 0.9.7q
* * ospf6_interface.c: fix the way inactivity_timer is called. Becausehasso2005-06-241-3/+3
| | | | | | | | | | inactivity_timer() deletes the neighbor from the neighbor_list, it cannot be called by thread_execute() from inner side of the neighbor_list for-loop. (Although crash was already fixed in Quagga, it's better follow the GNU Zebra logic). [port from GNU Zebra]
* 2005-04-07 Paul Jakma <paul.jakma@sun.com>quagga_post_listloop_cleanuppaul2005-04-071-56/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * (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.
* 2005-04-02 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2005-04-021-14/+0
| | | | | | | * ospf_interface.h: (ospf_if_lookup_by_name) Remove declaration of a function that does not exist. * ospf6_interface.[ch]: (ospf6_interface_lookup_by_name) Remove unused function.
* *.c: Change level of debug messages to LOG_DEBUG.hasso2004-12-241-28/+28
|
* 2004-10-10 Paul Jakma <paul@dishone.st>paul2004-10-101-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | * 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-13/+13
|
* Merge svn revision 975 from Zebra repository.hasso2004-09-011-14/+14
|
* Make ospf6d configuration appear in vtysh as well. Report sent to Yasuhirohasso2004-08-261-0/+1
| | | | Ohara.
* Merge svn revisions 924 and 925 from Zebra CVS. Also remove uselesshasso2004-08-191-1/+1
| | | | | 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-11/+18
|
* SVN revision 907 from Zebra cvs repository.hasso2004-08-041-39/+89
|
* Use ifp->mtu6 in ospf6d and ripngd.hasso2004-07-231-8/+8
|
* Merge svn revision 855 from Zebra repository.hasso2004-07-091-8/+71
|
* Update to latest (really :) ospf6d from Zebra repository and some tinyhasso2004-05-181-2/+23
| | | | fixes.
* Ospf6d merge from Zebra repository with added privs stuff and mergedhasso2004-05-181-481/+936
| | | | zclient changes.
* From: Hasso Tepper <hasso@estpak.ee>paul2003-05-181-0/+8
| | | | | | | | Subject: [zebra 19093] [PATCH] Two more fixes 1) From 6Wind patch - show router and interface nodes from ospf6d when using vtysh and don't show defaults in interface node. Fixes bugzilla #14.
* Initial revisionpaul2002-12-131-0/+1028