summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_neighbor.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ospf6d: New version of GCC with new warningsDonald Sharp2017-07-281-3/+3
| | | | | | | | GCC 7.1.1 returned warnings about buffer sizes not being big enough to handle the full string that could be generated. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: reindentreindent-master-afterwhitespace / reindent2017-07-171-753/+702
| | | | | | 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-60/+45
|\ | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * *: remove VTYNL, part 4 of 6David Lamparter2017-07-141-57/+42
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * *: remove VTYNL, part 2 of 6David Lamparter2017-07-141-3/+3
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * ospf6d: VNL -> VTYNLDavid Lamparter2017-07-141-30/+30
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | ospf6d: use macro for LSDB walksDavid Lamparter2017-07-111-32/+16
|/ | | | | | ... to make it easier to refactor all of the iteration uses. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: 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-12/+15
| | | | | | | | | | | | 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-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-8/+5
| | | | | | | 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>
* *: use monotime()David Lamparter2017-01-231-4/+4
| | | | | | This is largely a bulk-replace made with coccinelle. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib: time: remove recent_relative_time()David Lamparter2017-01-231-5/+3
| | | | | | Replace with monotime() [which is not cached]. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: fix broken indentation in "show ipv6 ospf6 neighbor"Renato Westphal2017-01-041-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the State/IfState column, we were reserving only 6 characters to print the state of each neighbor, but this is not enough for cases like "Loading" (7 characters) and "ExChange" (8 characters). Increase the width of this field to 8 to fix the broken indendation. ospf6d's output before this patch: ubuntu# show ipv6 ospf6 neighbor Neighbor ID Pri DeadTime State/IfState Duration I/F[State] 2.2.2.2 1 00:00:35 ExChange/DR 00:01:15 rt1-eth0[BDR] 3.3.3.3 1 00:00:35 Loading/DR 00:01:15 rt1-eth1[BDR] 4.4.4.4 1 00:00:35 Full/DR 00:01:15 rt1-eth2[BDR] 5.5.5.5 1 00:00:35 None/DR 00:01:10 rt1-eth3[BDR] 6.6.6.6 1 00:00:35 Down/DR 00:01:15 rt1-eth4[BDR] 7.7.7.7 1 00:00:35 Attempt/DR 00:01:15 rt1-eth5[BDR] 8.8.8.8 1 00:00:35 Init/DR 00:01:10 rt1-eth6[BDR] 9.9.9.9 1 00:00:35 Twoway/DR 00:01:14 rt1-eth7[BDR] 10.10.10.10 1 00:00:35 ExStart/DR 00:01:10 rt1-eth8[BDR] ospf6d's output with this patch: ubuntu# show ipv6 ospf6 neighbor Neighbor ID Pri DeadTime State/IfState Duration I/F[State] 2.2.2.2 1 00:00:36 ExChange/DR 00:00:44 rt1-eth0[BDR] 3.3.3.3 1 00:00:36 Loading/DR 00:00:39 rt1-eth1[BDR] 4.4.4.4 1 00:00:35 Full/DR 00:00:39 rt1-eth2[BDR] 5.5.5.5 1 00:00:36 None/DR 00:00:44 rt1-eth3[BDR] 6.6.6.6 1 00:00:36 Down/DR 00:00:39 rt1-eth4[BDR] 7.7.7.7 1 00:00:36 Attempt/DR 00:00:39 rt1-eth5[BDR] 8.8.8.8 1 00:00:36 Init/DR 00:00:39 rt1-eth6[BDR] 9.9.9.9 1 00:00:35 Twoway/DR 00:00:40 rt1-eth7[BDR] 10.10.10.10 1 00:00:36 ExStart/DR 00:00:39 rt1-eth8[BDR] Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: fix up DEFUNs without install_element callsDavid Lamparter2016-12-051-0/+1
| | | | | | | | | These now generate warnings which will break the build with -Werror. Note this may have enabled commands that should be disabled, or the other way around... Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Merge branch 'cmaster-next' into vtysh-grammarQuentin Young2016-10-181-1/+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-2/+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>
* | all: added some missing <>s within []sDaniel Walton2016-09-301-3/+3
| | | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
* | ospf6d: scrubbed some argc CHECK MEsDaniel Walton2016-09-301-53/+23
| | | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
* | all: added CHECK ME for DEFUNs that look at argcDaniel Walton2016-09-291-0/+3
| | | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
* | ospf6d: add 'int idx_foo' argv index variablesDaniel Walton2016-09-231-2/+3
| | | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
* | ALIAS removal for bgp, ospf, pim, isis, rip, ripng, lib and zebraDaniel Walton2016-09-231-35/+35
| | | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
* | ospf6d: argv updateDaniel Walton2016-09-231-8/+8
|/ | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
* *: add missing includesDavid Lamparter2016-06-071-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> (cherry picked from commit 388f8857eb81ef75014060976776523a58a99389)
* Add "no debug ospf" and "no debug ospf6" commands to disable all ospf debuggingDaniel Walton2015-11-031-0/+51
| | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-4010
* Fix for IPv6 OSPF BFD session staying down when ifdown/ifup on logical ↵radhika2015-10-091-1/+1
| | | | | | | | | | | | | | | | interfaces Ticket: CM-7649 Reviewed By: Donald Testing Done: This is porting of the patch, ospf6d-bfd-fix-dereg-miss.patch from br2.5. Issue: The IPv6 OSPF BFD sessions stay down after ifdown/ifup on logical interfaces. This problem doesn’t exist for BFD sessions created by BGP and IPv4 OSPF. Root cause: When the interface is brought down the IPv6 neighbors discovered on that interface are deleted. This deletion happens without first bringing down the neighbor and the BFD deregistration happens only when the neighbor state changes. This leaves an orphaned BFD session in PTM. Also, the BFD session socket that is bound to the interface that was brought down loses connection. The socket has to be rebound to the interface when it comes up. This problem will not happen if the client deleted the sessions and re-adds it when interface goes down and come up. IPv4 OSPF and BGP work exactly like that. Fix: Added the BFD deregistration code to IPv6 OSPF neighbor delete.
* Support of BFD status in Quaggaradhika2015-08-311-0/+4
| | | | | | | | | | | | | | | | Ticket:CM-6802, CM-6952 Reviewed By: Donald, Kanna Testing Done: Double commit of b76943235e09472ec174edcf7204fc82d27fe966 from br2.5. But, manually resolved all the compilation errors. Also, modified the shows to support the json format which was not supported in br2.5. CM-6802 – Currently, BFD session status can be monitored only through ptmctl. There is no way to check the BFD status of a peer/neighbor through Quagga. Debugging becomes easier if BFD status is shown in Quagga too. BFD status is relevant when it is shown against the BGP peer/OSPF neighbor. For, this following code changes have been done: - Only down messages from PTM were being propagated from Zebra daemon to clients (bgpd, ospfd and ospf6d). Now, both up and down messages are redistributed to the clients from zebra. BFD status field has been added to the messaging. Handling of BFD session up messages has been added to the client code. BGP/OSPF neighbor is brought down only if the old BFD session status is ‘Up’ to handle extra/initial down messages. - BFD status and last update timestamp fields have been added to the common BFD info structure. Also, common show functions for showing BFD information have been added to BFD lib. - Modified the BGP neighbor show functions to call common BFD lib functions. - For ospf and ospf6, BFD information was maintained only at interface level. To show BFD status per neighbor, BFD information has been added at neighbor level too. “show ip ospf interface”, “show ip ospf neighbor detail”, “show ipv6 ospf6 interface” and “show ipv6 ospf6 neighbor detail” output have been modified to show BFD information. CM-6952 - IBGP peers were always assumed to be multi-hop since there was no easy way to determine whether an IBGP peer was single hop or multihop unlike EBGP. But, this is causing problem with IBGP link local peers since BFD doesn't allow multihop BFD session with link local IP addresses. Link local peers were discovered when the interface peering was enabled. Interface peering is always singlehop. So, added checks to treat all interface based peers as single hop irrespective of whether the peer is IBGP or EBGP.
* This patch changes ospfd from only listening mode for BFD status updates to ↵Donald Sharp2015-07-221-1/+2
| | | | | | | | | | | | | | | | | | interactive mode of dynamically registering/deregistering neighbors discovered on BFD enabled interfaces with PTM/BFD through zebra. Neighbor is registered with BFD when 2-way adjacency is established and deregistered when adjacency goes down if the BFD is enabled on the interface through which the neighbor was discovered. OSPF BFD command enhancement to configure BFD parameters (detect multiplier, min rx and min tx). interface <if-name> ip ospf bfd <detect mult> <min rx> <min tx> This patch also adds BFD support for IPv6 OSPF. ospf6d will dynamically register/deregister IPv6 neighbors with BFD for monitoring the connectivity of the neighbor. Neighbor is registered with BFD when 2-way adjacency is established and deregistered when adjacency goes down if the BFD is enabled on the interface through which the neighbor was discovered. OSPF6 BFD command added to configure BFD and parameters (detect multiplier, min rx and min tx). interface <if-name> ipv6 ospf6 bfd <detect mult> <min rx> <min tx> Signed-off-by: Radhika Mahankali <radhika@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Kanna Rajagopal <kanna@cumulusnetworks.com>
* *: nuke ^L (page feed)David Lamparter2014-06-041-1/+1
| | | | | | | | | | | | | | 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 'log-adjacency-changes [detail]'Dinesh Dutt2013-11-081-16/+41
| | | | | | | | | | | Similar to OSPFv2, add support for 'log-adjacency-changes [detail]' to log changes in adjacency state of ospfv3 neighbors. Signed-off-by: Pradosh Mohapatra <pmohapat at cumulusnetworks.com> Reviewed-by: Dinesh G Dutt <ddutt at cumulusnetworks.com> Reviewed-by: Scott Feldman <sfeldma at cumulusnetworks.com> Reviewed-by: Shrijeet Mukherjee <shm at cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: increment dbdesc seqnum on SeqNumberMismatch/BadLsReq eventDinesh Dutt2013-11-081-0/+4
| | | | | | | | | | | | | | As per RFC 2328, section 10.3, if the neighbor state machine reaches SeqNumberMismatch state when the NSM is in state Exchange or greater, "router increments the DD sequence number in the neighbor data structure, declares itself master (sets the master/slave bit to master), and starts sending Database Description Packets, with the initialize (I), more (M) and master (MS) bits set.". The existing code doesn't increment the DD SeqNum. This patch fixes that. Signed-off-by: Dinesh G Dutt <ddutt at cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: fix neighbor state machine (faster lsdb sync, RFC compliance)Dinesh Dutt2013-11-081-6/+33
| | | | | | | | | | | | | | | | | The OSPFv3 code doesn't do the following things right as part of an adjacency bringup: - Transmit DbDesc frames appropriately to ensure faster state transition to Loading state - Transmit LsReq frames when switching to exchange state and on receipt of an LS update in Loading state - Requesting LSAs multiple times in LsReq. It currently uses retransmit timer expiry to send the LsReq and DbDesc frames which significantly slows down large lsdb syncs. Signed-off-by: Dinesh G Dutt <ddutt at cumulusnetworks.com> Reviewed-by: Scott Feldman <sfeldma at cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: add SNMP notifications/traps supportVincent Bernat2012-06-251-0/+9
| | | | Only implement ospfv3NbrStateChange and ospfv3IfStateChange.
* ospf6d: add SNMP support for ospfv3NbrTableVincent Bernat2012-06-251-0/+2
|
* Convert ospf6d over to quagga_gettime() wrappers.Takashi Sogabe2009-06-221-5/+5
|
* [trivia] finish off static'ification of ospf6d and ripngdPaul Jakma2008-08-221-9/+9
| | | | | | | | | 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] Bug 322: ospf6d show ipv6 neighbour showing wrong timesPaul Jakma2007-03-081-1/+1
| | | | | | | | 2007-03-08 David Siebörger d.sieborger@ru.ac.za * ospf6_neighbor.c: (ospf6_neighbor_show) Fix bug #322, ospf6d wasn't updated to match thread times changing to relative time.
* [ospf6d] GNU Zebra 3560: Call ospf6_maxage_remove when out of Exchange/LoadingPaul Jakma2006-05-151-10/+1
| | | | | | | 2005-10-20 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> * ospf6_neighbor.c: add the calling of ospf6_maxage_remove () when the neighbor went out of Exchange/Loading.
* 2005-04-07 Paul Jakma <paul.jakma@sun.com>paul2005-04-071-33/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * (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-13/+13
|
* 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-3/+3
|
* Merge svn revision 981 from Zebra cvs.hasso2004-09-031-1/+1
|
* Merge svn revision 975 from Zebra repository.hasso2004-09-011-12/+0
|
* SVN revisions 916-920 from Zebra. ABR support is almost done.hasso2004-08-151-17/+17
|
* SVN revision 907 from Zebra cvs repository.hasso2004-08-041-31/+31
|
* Update to latest (really :) ospf6d from Zebra repository and some tinyhasso2004-05-181-9/+55
| | | | fixes.
* Ospf6d merge from Zebra repository with added privs stuff and mergedhasso2004-05-181-391/+728
| | | | zclient changes.
* Initial revisionpaul2002-12-131-0/+602