summaryrefslogtreecommitdiffstats
path: root/ospf6d
Commit message (Collapse)AuthorAgeFilesLines
* quagga: Remove double read of streamDonald Sharp2016-03-111-1/+3
| | | | | | | | | | The addition of a MIN(X,Y) with a stream_getc in the Y causes a double read of the stream due to the way that MIN is defined. This fix removes a crash in all protocols. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* lib: Check prefix length from zebra is sensiblePaul Jakma2016-03-081-1/+1
| | | | | | | | | | | | | * zclient.c: prefix length on router-id and interface address add messages not sanity checked. fix. * */*_zebra.c: Prefix length on zebra route read was not checked, and clients use it to write to storage. An evil zebra could overflow client structures by sending overly long prefixlen. Prompted by discussions with: Donald Sharp <sharpd@cumulusnetworks.com>
* *: use an ifindex_t type, defined in lib/if.h, for ifindex valuesPaul Jakma2016-02-2611-24/+29
|
* Merge 'patch-tracking/4/proposed/netdef-solaris' into acceptedPaul Jakma2015-10-281-1/+1
|\
| * ospf6d: fix uninitialized warning in SNMPDavid Lamparter2015-10-161-1/+1
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | lib: zclient.c remove extern struct thread_master *Donald Sharp2015-10-273-4/+4
|/ | | | | | | | | | | | zclient.c depended upon link time inclusion of a extern struct thread_master *master. This is a violation of the namespace of the calling daemon. If a library needs the pointer pass it in and save it for future use. This code change also makes the zclient code consistent with the other lib functions that need to schedule work on your behalf Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* ospf6d: Fix for fast OSPF convergenceMichael Rossberg2015-09-301-1/+1
| | | | | Fixed use of OSPF_MIN_LS_ARRIVAL, which changed its unit from seconds to milliseconds
* build/arm: Arm compilation warning fixDonald Sharp2015-09-241-1/+1
| | | | | | | | | The arm cross compiler is issuing warnings for signed/unsigned comparisons for ntohs. ntohs returns a unsigned int, while the counting variables are signed. Fixed to allow -Werror to work properly Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* build: Remove the old PIC/PIE patch, let libtool sort it outPaul Jakma2015-09-031-2/+1
| | | | | | | * Remove the old change from '08 to add in PIE arguments at automake level. Versions of libtool since then know how to deal with -fpie and do the right thing according to whether its building shared or executable objects. So just pass '-fpie' as CFLAG and let libtool do its thing.
* *: add VRF ID in the API message headerFeng Lu2015-06-032-28/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The API messages are used by zebra to exchange the interfaces, addresses, routes and router-id information with its clients. To distinguish which VRF the information belongs to, a new field "VRF ID" is added in the message header. And hence the message version is increased to 3. * The new field "VRF ID" in the message header: Length (2 bytes) Marker (1 byte) Version (1 byte) VRF ID (2 bytes, newly added) Command (2 bytes) - Client side: - zclient_create_header() adds the VRF ID in the message header. - zclient_read() extracts and validates the VRF ID from the header, and passes the VRF ID to the callback functions registered to the API messages. - All relative functions are appended with a new parameter "vrf_id", including all the callback functions. - "vrf_id" is also added to "struct zapi_ipv4" and "struct zapi_ipv6". Clients need to correctly set the VRF ID when using the API functions zapi_ipv4_route() and zapi_ipv6_route(). - Till now all messages sent from a client have the default VRF ID "0" in the header. - The HELLO message is special, which is used as the heart-beat of a client, and has no relation with VRF. The VRF ID in the HELLO message header will always be 0 and ignored by zebra. - Zebra side: - zserv_create_header() adds the VRF ID in the message header. - zebra_client_read() extracts and validates the VRF ID from the header, and passes the VRF ID to the functions which process the received messages. - All relative functions are appended with a new parameter "vrf_id". * Suppress the messages in a VRF which a client does not care: Some clients may not care about the information in the VRF X, and zebra should not send the messages in the VRF X to those clients. Extra flags are used to indicate which VRF is registered by a client, and a new message ZEBRA_VRF_UNREGISTER is introduced to let a client can unregister a VRF when it does not need any information in that VRF. A client sends any message other than ZEBRA_VRF_UNREGISTER in a VRF will automatically register to that VRF. - lib/vrf: A new utility "VRF bit-map" is provided to manage the flags for VRFs, one bit per VRF ID. - Use vrf_bitmap_init()/vrf_bitmap_free() to initialize/free a bit-map; - Use vrf_bitmap_set()/vrf_bitmap_unset() to set/unset a flag in the given bit-map, corresponding to the given VRF ID; - Use vrf_bitmap_check() to test whether the flag, in the given bit-map and for the given VRF ID, is set. - Client side: - In "struct zclient", the following flags are changed from "u_char" to "vrf_bitmap_t": redist[ZEBRA_ROUTE_MAX] default_information These flags are extended for each VRF, and controlled by the clients themselves (or with the help of zclient_redistribute() and zclient_redistribute_default()). - Zebra side: - In "struct zserv", the following flags are changed from "u_char" to "vrf_bitmap_t": redist[ZEBRA_ROUTE_MAX] redist_default ifinfo ridinfo These flags are extended for each VRF, as the VRF registration flags. They are maintained on receiving a ZEBRA_XXX_ADD or ZEBRA_XXX_DELETE message. When sending an interface/address/route/router-id message in a VRF to a client, if the corresponding VRF registration flag is not set, this message will not be dropped by zebra. - A new function zread_vrf_unregister() is introduced to process the new command ZEBRA_VRF_UNREGISTER. All the VRF registration flags are cleared for the requested VRF. Those clients, who support only the default VRF, will never receive a message in a non-default VRF, thanks to the filter in zebra. * New callback for the event of successful connection to zebra: - zclient_start() is splitted, keeping only the code of connecting to zebra. - Now zclient_init()=>zclient_connect()=>zclient_start() operations are purely dealing with the connection to zbera. - Once zebra is successfully connected, at the end of zclient_start(), a new callback is used to inform the client about connection. - Till now, in the callback of connect-to-zebra event, all clients send messages to zebra to request the router-id/interface/routes information in the default VRF. Of corse in future the client can do anything it wants in this callback. For example, it may send requests for both default VRF and some non-default VRFs. Signed-off-by: Feng Lu <lu.feng@6wind.com> Reviewed-by: Alain Ritoux <alain.ritoux@6wind.com> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: call if_init()/if_terminate() from vrf_init()/vrf_terminate()Feng Lu2015-06-021-2/+3
| | | | | | | | | | | | | | | | | | Later, an interface will belong to a specific VRF, and the interface initialization will be a part of the VRF initialization. So now call if_init() from vrf_init(), and if_terminate() from vrf_terminate(). Daemons have the according changes: - if if_init() was called or "iflist" was initialized, now call vrf_init() instead; - if if_terminate() was called or "iflist" was destroyed, now call vrf_terminate() instead. Signed-off-by: Feng Lu <lu.feng@6wind.com> Reviewed-by: Alain Ritoux <alain.ritoux@6wind.com> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Acked-by: Vincent JARDIN <vincent.jardin@6wind.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d, bgpd: avoid calling if_nametoindexFeng Lu2015-06-022-11/+9
| | | | | | | | | | | | | | As the comments in if.h, it is better to call ifname2ifindex() instead of if_nametoindex(). And ifname2ifindex() can work for VRF by appending a parameter while if_nametoindex() can not. Signed-off-by: Feng Lu <lu.feng@6wind.com> Reviewed-by: Alain Ritoux <alain.ritoux@6wind.com> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Acked-by: Vincent JARDIN <vincent.jardin@6wind.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: assorted warning fixesDavid Lamparter2015-04-211-2/+2
| | | | | | A few warnings slipped through the cracks... Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: add --enable-werrorDavid Lamparter2015-04-211-1/+1
| | | | | | | | | | | | | | | This allows enabling -Werror in a consistent way. Note that this is different from just specifiying it in CFLAGS, since that would either break configure tests (if done on ./configure), or would override configure's CFLAGS (if done on make). Using --enable-werror instead provides a new WERROR variable that is additionally used during make with a consistent set of warning flags. The tests/ directory is exempt. (Rationale being, better to have more tests than pedantically complain about them.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* snmp: fix warningsDavid Lamparter2015-04-211-1/+0
| | | | | | batch-fix all warnings that come up when enabling AgentX SNMP support. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: fix pointer arithmetic warningDavid Lamparter2015-04-211-3/+3
| | | | | | | caddr_t was signed; this buffer size comparison is better done in unsigned. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: oi->cost is uint32, not shortDavid Lamparter2015-04-211-1/+1
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: use existing union, avoid strict-aliasingDavid Lamparter2015-04-211-5/+4
| | | | | | | | There are preexisting fields u.lp.id and u.lp.adv_router in struct prefix that do the same thing as these type-punning pointer derefs. Use these and shut up the strict-aliasing warnings. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: add missing includesDavid Lamparter2015-04-213-0/+4
| | | | | | | 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>
* *: use void * for printing pointersDavid Lamparter2015-04-214-17/+23
| | | | | | | | | 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-193-19/+21
| | | | | | | | | | | | 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>
* build: get rid of INCLUDES, use AM_CPPFLAGSDavid Lamparter2015-02-141-1/+1
| | | | | | | | | | | | INCLUDES in configure.ac was not used at all, and INCLUDES in Makefile.am is supposed to be AM_CPPFLAGS these days. Reduces warnings spewed during bootstrap/autoreconf. Signed-off-by: David Lamparter <equinox@opensourcerouting.org> Acked-by: Greg Troxel <gdt@ir.bbn.com> Acked-by: Feng Lu <lu.feng@6wind.com> Acked-by: Paul Jakma <paul@jakma.org>
* build: remove INRIA, NRL and MUSICA IPv6 quirksDavid Lamparter2015-02-141-6/+0
| | | | | | | | | Valar dohaeris. Signed-off-by: David Lamparter <equinox@opensourcerouting.org> Acked-by: Greg Troxel <gdt@ir.bbn.com> Acked-by: Feng Lu <lu.feng@6wind.com> Acked-by: Paul Jakma <paul@jakma.org>
* Bug in ospf6_lsa_compare()Yasuhiro Ohara2014-10-271-3/+3
| | | | | | | | | | | | | | | | | | This fix is probably correct on 32bit systems, but i think it will not work on 64bit systems. sizeof(signed long) would be 8 and therefore the cast from u_int32_t will map all the values to non-negative part of long int. You would like to use int (like in ospfd) and change the type of seqnuma, seqnumb to that. The type int32_t would be even more proper, but sizeof(int) is 4 on relevant platforms. Signed-off: Ondrej Zajicek <santiago@crfreenet.org> Acked-by: Feng Lu <lu.feng@6wind.com> Acked-by: Yasuhiro Ohara <yasu@jaist.ac.jp>
* ospf6_lsdb: trivial, make it clear that showfunc is set before deref.Paul Jakma2014-09-232-15/+25
|
* Fix most compiler warnings in default GCC build.Paul Jakma2014-09-2312-60/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0416-25/+25
| | | | | | | | | | | | | | 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>
* lib/command.c: rewrite command matching/parsingChristian Franke2014-04-011-3/+0
| | | | | | | | | | Add support for keyword commands. Includes new documentation for DEFUN() in lib/command.h, for preexisting features as well as new keyword specification. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: fix refcounting in ospf6_asbr_lsa_removeChristian Franke2014-03-211-0/+2
| | | | | | | When iterating over a list, also the last node should be unlocked again. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: add "auto-cost reference-bandwidth" commandVincent Bernat2014-03-215-2/+80
| | | | | | | | | | 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-214-17/+91
| | | | | | | | | | | | | | | | | 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: solve segfaults with ospf6d on FreeBSDIngo Flaschberger2014-03-211-0/+7
| | | | | | | | Do not send ospf6d hellos on fresh created interfaces without configuration (ie. no vlan configured). Ospf6d use ip6_mtu, if it's not initalised, Ospf6d tries to alloc indefinite size of memory. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Merge volatile/cumulus_ospf6dDavid Lamparter2014-03-1827-658/+1901
|\ | | | | | | 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: clear lsa->refresh before clearing LSAsDavid Lamparter2014-03-182-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a SEGV when we receive a higher-SeqNum copy of a LSA that we originated ourselves, before a reboot of ospf6d. We create a new copy of the LSA to resync the SeqNum, but then half an hour later the old refresh thread ends up trying to refresh the free()'d old LSA. The SEGV is triggered by this chain: ospf6_lsdb_maxage_remover -> thread_execute(ospf6_lsa_refresh) -> old->refresh = NULL Which assumes that old->refresh is no longer scheduled to run, as it is being run right there. But the thread_execute() doesn't know about old->refresh and therefore didn't remove it. (Found by ANVL OSPFV3-16.17) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * ospf6d: handle missing link local address more gracefullyChristian Franke2014-03-182-6/+22
| | | | | | | | | | | | | | | | | | | | 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-189-35/+94
| | | | | | | | | | | | | | | | 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: set cmsg size correctlyChristian Franke2013-11-201-1/+1
| | | | | | | | | | | | | | | | On both Linux and FreeBSD, msg_controllen should be set to CMSG_LEN, not CMSG_SPACE. This avoids sending 4 bytes of trailing garbage to the kernel. 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-078-11/+180
| | | | | | | | | | | | | | | | 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 'log-adjacency-changes [detail]'Dinesh Dutt2013-11-074-16/+157
| | | | | | | | | | | | | | | | | | | | | | 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: don't send LSAck on an interface if we've flooded the LSU out that i/fDinesh Dutt2013-11-071-13/+8
| | | | | | | | | | | | | | | | | | | | If we flood an LSA back out the same interface we received it from, don't send an LSAck out that interface for that LSA. This is as per RFC 2328, section 13.5 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: handle Prefix and Router Options bits correctlyDinesh Dutt2013-11-073-4/+40
| | | | | | | | | | | | | | | | | | | | Ensure that prefixes with the NU/LA bit set do not get added to the routing table. Ensure that routers with the V6/R bit set do not get added as transit routes. Signed-off-by: Dinesh Dutt <ddutt at cumulusnetworks.com> [DL: adjust to rebase] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * ospf6d: add LSA payload to show summary outputDinesh Dutt2013-11-075-38/+356
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike OSPFv2, the LSID of an LSA isn't sufficient to know what the contents of the LSA are. Its useful for debugging and basic eyeball tests to see the contents of the LSA in the simple tabular format of "show ipv6 ospf6 database". This patch adds that output to the command. It replaces the existing fields of "duration, Chksum and Length" with a single field called Payload which is dependent on the LSA type. For Inter-Area Prefix, Intra-Area Prefix and AS-External LSAs, this will be the advertised prefix/prefix length, for Router LSAs, it is RtrID/IfID etc. 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> [DL: rebase fix, line disappeared in ospf6_abr_originate_summary_to_area] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * ospf6d: increment dbdesc seqnum on SeqNumberMismatch/BadLsReq eventDinesh Dutt2013-11-071-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: don't change SeqNum on initial DbDesc messageDinesh Dutt2013-11-071-1/+2
| | | | | | | | | | | | | | | | | | The code was setting the DbDesc seqnum to the current seconds value of time if this was the initial DbDesc. However, the same code was getting invoked if the initial DbDesc was retransmitted. Caused ANVL test XX.XX to fail. Signed-off-by: Dinesh G Dutt <ddutt at cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * ospf6d: handle seqnum wrappingDinesh Dutt2013-11-073-1/+34
| | | | | | | | | | | | | | | | Signed-off-by: Shrijeet Mukherjee <shm at cumulusnetworks.com> Reviewed-by: Dinesh G Dutt <ddutt at cumulusnetworks.com> [DL: mechanical adjust to rebase] [DL: adjust to removal of timerwheel code] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * ospf6d: add overload supportDinesh Dutt2013-11-076-2/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>