Commit graph

64 commits

Author SHA1 Message Date
Acee 7ac19946b5 ospfd: Assure OSPF AS External routes are installed after link flap
OSPF intra/inter area routes were previously marked to assure they
are re-installed after a fast link flap in the commit:

commit effee18744
Author: Donald Sharp <sharpd@nvidia.com>
Date:   Mon May 24 13:45:29 2021 -0400

    ospfd: Fix quick interface down up event handling in ospf

This commit extends this fix to OSPF AS External routes as well.

Signed-off-by: Acee <aceelindem@gmail.com>
2024-03-21 16:18:59 -04:00
Renato Westphal ab749e7eea ospfd: add support for unplanned graceful restart
In practical terms, unplanned GR refers to the act of recovering
from a software crash without affecting the forwarding plane.

Unplanned GR and Planned GR work virtually the same, except for the
following difference: on planned GR, the router sends the Grace-LSAs
*before* restarting, whereas in unplanned GR the router sends the
Grace-LSAs immediately *after* restarting.

For unplanned GR to work, ospf6d was modified to send a
ZEBRA_CLIENT_GR_CAPABILITIES message to zebra as soon as GR is
enabled.  This causes zebra to freeze the OSPF routes in the RIB as
soon as the ospfd daemon dies, for as long as the configured grace
period (the defaults is 120 seconds). Similarly, ospfd now stores in
non-volatile memory that GR is enabled as soon as GR is configured.
Those two things are no longer done during the GR preparation phase,
which only happens for planned GRs.

Unplanned GR will only take effect when the daemon is killed
abruptly (e.g. SIGSEGV, SIGKILL), otherwise all OSPF routes will
be uninstalled while ospfd is exiting.  Once ospfd starts, it will
check whether GR is enabled and enter in the GR mode if necessary,
sending Grace-LSAs out all operational interfaces.

One disadvantage of unplanned GR is that the neighboring routers
might time out their corresponding adjacencies if ospfd takes too
long to come back up. This is especially the case when short dead
intervals are used (or BFD). For this and other reasons, planned
GR should be preferred whenever possible.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2023-05-08 21:47:44 -03:00
Jafar Al-Gharaibeh 6af89f8f03 ospfd: use rib metric as the base for set metric +/-
When using route maps with external routes in OSPF as follows:
```
   set metric +10
 ```
The current behavior is to use the default ospf metric as the base and then add
to 10 to it. The behavior isn't useful as-is. A value 30 (20 dfeault + 10) can
be set directly instead. the behavior is also not consistent with bgp. bgp does
use the rib metric in this case as the base. The current behavior also doesn't
allow the metric to accumulate when crossing different routing domains such as
vrfs causing the metric to reset every time the route enters a new vrf with a new
ospf network.

This PR changes the behavior such that the rib metric is used as a base for
ospf exteral routes when used with `set metric -/+`

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2023-04-18 00:21:05 -05:00
Donald Sharp 24a58196dd *: Convert event.h to frrevent.h
We should probably prevent any type of namespace collision
with something else.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24 08:32:17 -04:00
Donald Sharp e16d030c65 *: Convert THREAD_XXX macros to EVENT_XXX macros
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24 08:32:17 -04:00
Donald Sharp 907a2395f4 *: Convert thread_add_XXX functions to event_add_XXX
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24 08:32:17 -04:00
Donald Sharp e6685141aa *: Rename struct thread to struct event
Effectively a massive search and replace of
`struct thread` to `struct event`.  Using the
term `thread` gives people the thought that
this event system is a pthread when it is not

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24 08:32:17 -04:00
Donald Sharp cb37cb336a *: Rename thread.[ch] to event.[ch]
This is a first in a series of commits, whose goal is to rename
the thread system in FRR to an event system.  There is a continual
problem where people are confusing `struct thread` with a true
pthread.  In reality, our entire thread.c is an event system.

In this commit rename the thread.[ch] files to event.[ch].

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24 08:32:16 -04:00
David Lamparter acddc0ed3c *: auto-convert to SPDX License IDs
Done with a combination of regex'ing and banging my head against a wall.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-02-09 14:09:11 +01:00
sri-mohan1 70ad0b6627 ospfd: changes for code maintainability
these changes are for improving the code maintainability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2022-08-28 20:48:29 +05:30
Donald Sharp cc9f21da22 *: Change thread->func to return void instead of int
The int return value is never used.  Modify the code
base to just return a void instead.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-23 19:56:04 -05:00
rgirada bf4b7559a0 ospfd: ospf routing table update upon Changing area from normal to nssa
Description:
	When changing the area from normal to NSSA, previous area's
	ASBR router's type-5 also calculated and added to routing table along
	with Type-7 lsas.
	Made a change in route calculation such that it will not consider Type-5
	lsas in calculation if it is originated from NSSA ASBR router.
	These lsas will be age out at MAX age.

  log:
  frr(config-router)# do show ip route
	Codes: K - kernel route, C - connected, S - static, R - RIP,
         O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
         T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
         f - OpenFabric,
         > - selected route, * - FIB route, q - queued, r - rejected, b - backup
         t - trapped, o - offload failure

	K>* 0.0.0.0/0 [0/0] via 10.112.157.253, ens160, 00:32:47
	C>* 10.112.156.0/23 is directly connected, ens160, 00:32:47
	S>* 22.22.22.2/32 [1/0] is directly connected, ens192, weight 1, 00:20:03
	O>* 33.33.33.0/24 [110/20] via 100.1.1.220, ens192, weight 1, 00:08:55
				   via 100.1.1.220, ens192, weight 1, 00:08:55
	O   100.1.1.0/24 [110/10] is directly connected, ens192, weight 1, 00:21:32
	C>* 100.1.1.0/24 is directly connected, ens192, 00:23:11
  frr(config-router)# do show ip ospf  route
	============ OSPF network routing table ============
	N    100.1.1.0/24          [10] area: 0.0.0.1
                           directly attached to ens192

	============ OSPF router routing table =============
	R    2.2.2.2               [10] area: 0.0.0.1, ASBR
                           via 100.1.1.220, ens192

	============ OSPF external routing table ===========
	N E2 33.33.33.0/24         [10/20] tag: 0
                           via 100.1.1.220, ens192
                           via 100.1.1.220, ens192

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2021-11-19 00:09:29 -08:00
Renato Westphal 1051417011 ospfd: introduce support for Graceful Restart (restarting mode)
RFC 3623 specifies the Graceful Restart enhancement to the OSPF
routing protocol. This PR implements support for the restarting mode,
whereas the helper mode was implemented by #6811.

This work is based on #6782, which implemented the pre-restart part
and settled the foundations for the post-restart part (behavioral
changes, GR exit conditions, and on-exit actions).

Here's a quick summary of how the GR restarting mode works:
* GR can be enabled on a per-instance basis using the `graceful-restart
  [grace-period (1-1800)]` command;
* To perform a graceful shutdown, the `graceful-restart prepare ospf`
  EXEC-level command needs to be issued before restarting the ospfd
  daemon (there's no specific requirement on how the daemon should
  be restarted);
* `graceful-restart prepare ospf` will initiate the graceful restart
  for all GR-enabled instances by taking the following actions:
  o Flooding Grace-LSAs over all interfaces
  o Freezing the OSPF routes in the RIB
  o Saving the end of the grace period in non-volatile memory (a JSON
    file stored in `$frr_statedir`)
* Once ospfd is started again, it will follow the procedures
  described in RFC 3623 until it detects it's time to exit the graceful
  restart (either successfully or unsuccessfully).

Testing done:
* New topotest featuring a multi-area OSPF topology (including stub
  and NSSA areas);
* Successful interop tests against IOS-XR routers acting as helpers.

Co-authored-by: GalaxyGorilla <sascha@netdef.org>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2021-07-05 11:43:02 -03:00
Donald Sharp 59293b8e70 ospfd: Remove #if 0 code
The #if 0 code in ospfd, has not been compiled since at least
2012.  If we are at least 9 years old at this point with no effort
to use or save, we should just get rid of it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-28 13:21:12 -05:00
Mobashshera Rasool 87627de6c0 ospfd: deleting ospf process is leading to crash at no_router_ospf
Topology diagram:
    -------------------------
          +---+  A0       +---+
          +R1 +------------+R2 |
          +-+-+-           +--++
            |  --        --  |
            |    -- A0 --    |
          A0|      ----      |
            |      ----      | A0
            |    --    --    |
            |  --        --  |
          +-+-+-            +-+-+
          +R0 +-------------+R3 |
          +---+     A0     +---+

    Steps to reproduce:
    --------------------------
    1. Bring up the base config as per the topology
    2. Configure OSPF on all the routers of the topology.
    3. Configure 5 static routes from the same network on R0 , 5 static routes from different networks and redistribute in R0
    4. Configure External Route summary in R0 to summarise 5 routes to one route.
    5. Delete the configured summary
    6. configure the summary again and delete static routes .
    7. Add back static routes.
    8. Configure new static route which is matching the configured summary.
    9. Delete one of the static route.
    10. Configure redistribute connected and configure ospf external summary address to summarise the connected routes.
    11. Clear ospf process and check for any errors.

    [New LWP 2346]
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
    Core was generated by `/usr/lib/frr/ospfd'.
    Program terminated with signal SIGABRT, Aborted.
    54      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
    (gdb) bt
    0  0x00007f296f278428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
    1  0x00007f296f27a02a in __GI_abort () at abort.c:89
    2  0x00007f296fca4110 in core_handler (signo=11, siginfo=0x7ffcd52044f0, context=<optimized out>) at lib/sigevent.c:254
    3  <signal handler called>
    4  0x000055949b9dfdff in ospf_lsdb_lookup (lsdb=lsdb@entry=0x55949bfd3688, lsa=lsa@entry=0x55949bfe1290) at ospfd/ospf_lsdb.c:179
    5  0x000055949ba28fbe in ospf_ls_retransmit_lookup (lsa=0x55949bfe1290, nbr=0x55949bfd3610) at ospfd/ospf_flood.c:918
    6  ospf_ls_retransmit_delete_nbr_if (oi=oi@entry=0x55949bfd2590, lsa=lsa@entry=0x55949bfe1290) at ospfd/ospf_flood.c:932
    7  0x000055949ba2916b in ospf_ls_retransmit_delete_nbr_if (lsa=0x55949bfe1290, oi=0x55949bfd2590) at ospfd/ospf_flood.c:928
    8  ospf_ls_retransmit_delete_nbr_as (ospf=ospf@entry=0x55949bfbdb30, lsa=lsa@entry=0x55949bfe1290) at ospfd/ospf_flood.c:959
    9  0x000055949b9dcd7e in ospf_discard_from_db (ospf=ospf@entry=0x55949bfbdb30, lsdb=<optimized out>, lsa=lsa@entry=0x55949bfe1630) at ospfd/ospf_lsa.c:2552
    10 0x000055949b9df1b3 in ospf_maxage_lsa_remover (thread=0x55949bfde930) at ospfd/ospf_lsa.c:2848
    11 0x00007f296fcb1770 in thread_call (thread=0x55949bfde930) at lib/thread.c:1557
    12 0x00007f296fcb19d6 in funcname_thread_execute (m=0x55949be0a630, func=func@entry=0x55949b9df0a0 <ospf_maxage_lsa_remover>, arg=arg@entry=0x55949bfbdb30, val=val@entry=0,
        funcname=funcname@entry=0x55949ba31b41 "ospf_maxage_lsa_remover", schedfrom=schedfrom@entry=0x55949ba31917 "ospfd/ospf_lsa.c", fromln=3364) at lib/thread.c:1628
    13 0x000055949b9de90b in ospf_flush_self_originated_lsas_now (ospf=ospf@entry=0x55949bfbdb30) at ospfd/ospf_lsa.c:3364
    14 0x000055949ba19a55 in ospf_process_refresh_data (ospf=0x55949bfbdb30, reset=reset@entry=true) at ospfd/ospfd.c:138
    15 0x000055949ba1aeef in ospf_process_reset (ospf=<optimized out>) at ospfd/ospfd.c:206
    16 0x000055949ba0729b in clear_ip_ospf_process_magic (self=<optimized out>, vty=<optimized out>, argc=<optimized out>, argv=<optimized out>, instance_str=<optimized out>,
        instance=<optimized out>) at ospfd/ospf_vty.c:11930
    17 clear_ip_ospf_process (self=<optimized out>, vty=0x55949bfe2600, argc=<optimized out>, argv=<optimized out>) at ./ospfd/ospf_vty_clippy.c:306
    18 0x00007f296fc66523 in cmd_execute_command_real (vline=vline@entry=0x55949bfd2fb0, vty=vty@entry=0x55949bfe2600, cmd=cmd@entry=0x0, filter=FILTER_RELAXED) at lib/command.c:1060
    19 0x00007f296fc6869a in cmd_execute_command (vline=vline@entry=0x55949bfd2fb0, vty=vty@entry=0x55949bfe2600, cmd=0x0, vtysh=vtysh@entry=0) at lib/command.c:1119
    20 0x00007f296fc68817 in cmd_execute (vty=vty@entry=0x55949bfe2600, cmd=cmd@entry=0x55949bfe7f80 "clear ip ospf pro", matched=matched@entry=0x0, vtysh=vtysh@entry=0)
        at lib/command.c:1275
    21 0x00007f296fcb6c13 in vty_command (vty=vty@entry=0x55949bfe2600, buf=0x55949bfe7f80 "clear ip ospf pro") at lib/vty.c:514
    22 0x00007f296fcb6ea6 in vty_execute (vty=vty@entry=0x55949bfe2600) at lib/vty.c:1281
    23 0x00007f296fcb97f4 in vtysh_read (thread=<optimized out>) at lib/vty.c:2123
    24 0x00007f296fcb1770 in thread_call (thread=thread@entry=0x7ffcd5209590) at lib/thread.c:1557
    25 0x00007f296fc82e78 in frr_run (master=0x55949be0a630) at lib/libfrr.c:1026
    26 0x000055949b9d0f07 in main (argc=1, argv=0x7ffcd52098b8) at ospfd/ospf_main.c:230

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-01-12 11:31:17 +00:00
Mobashshera Rasool f91ce319d3 ospfd: Clear ip ospf process and clear ip ospf neighbor
Implement the below 2 CLIs to clear the current data in the process
and neighbor data structure.
1. clear ip ospf process
2. clear ip ospf neighbor

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-01-12 10:52:42 +00:00
Donatas Abraitis 3a6290bdd1 *: Replace s_addr check agains 0 with INADDR_ANY
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-12-14 21:03:38 +02:00
Mark Stapp 96b663a381 ospfd: replace inet_ntoa
Stop using inet_ntoa, use %pI4 etc or inet_ntop instead

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-10-22 13:37:25 -04:00
David Lamparter 3efd0893d0 *: un-split strings across lines
Remove mid-string line breaks, cf. workflow doc:

  .. [#tool_style_conflicts] For example, lines over 80 characters are allowed
     for text strings to make it possible to search the code for them: please
     see `Linux kernel style (breaking long lines and strings)
     <https://www.kernel.org/doc/html/v4.10/process/coding-style.html#breaking-long-lines-and-strings>`_
     and `Issue #1794 <https://github.com/FRRouting/frr/issues/1794>`_.

Scripted commit, idempotent to running:
```
python3 tools/stringmangle.py --unwrap `git ls-files | egrep '\.[ch]$'`
```

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-07-14 10:37:25 +02:00
Quentin Young 772270f3b6 *: sprintf -> snprintf
Replace sprintf with snprintf where straightforward to do so.

- sprintf's into local scope buffers of known size are replaced with the
  equivalent snprintf call
- snprintf's into local scope buffers of known size that use the buffer
  size expression now use sizeof(buffer)
- sprintf(buf + strlen(buf), ...) replaced with snprintf() into temp
  buffer followed by strlcat

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-04-20 19:14:33 -04:00
David Lamparter 63efca0e95 *: remove line breaks from log messages
Line break at the end of the message is implicit for zlog_* and flog_*,
don't put it in the string.  Mid-message line breaks are currently
unsupported.  (LF is "end of message" in syslog.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-03-24 19:43:18 +01:00
Donatas Abraitis 975a328e2e *: Replace s_addr 0 => INADDR_ANY
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-02-06 09:00:12 +02:00
Quentin Young c258527bd2 *: strip trailing whitespace
Some of it has snuck by CI

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-09-30 16:44:43 +00:00
David Lamparter 6a154c8812 *: list_delete_and_null() -> list_delete()
Signed-off-by: David Lamparter <equinox@diac24.net>
2018-10-02 11:40:52 +02:00
Chirag Shah 96065dc310 ospfd: interface speed change during intf add
The problem is seen where speed mismatch caused ECMP route
not being reflected with correct number paths (NHs).

During cold boot, some interface speed updated by zebra as
part of one shot timer and triggers interface add to clients.
In this case, ospf already have created interface (bond interface),
but speed was not updated, trigger to do interface speed change
as part of interface add, which will trigger all Router LSA to
use updated speed into cost calculation.

Ticket:CM-22170
Testing Done:
Bring up CLOS config with Spine and leafs. Leaf have CLAG pair,
with same VRR ip address.
At spine one of the bond connecting to leaf node was having
higher speed than the paired device, With this fix, at spine (DUT)
bond interface speed is equal from all peer nodes.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2018-08-24 15:26:42 -07:00
F. Aragon 2ffc213bf8
ospfd pimd: null check (PVS-Studio)
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-07-06 00:49:24 +02:00
paco 39050c7e0d
lib ospfd: dead code (Coverity 1302503 1302502)
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-26 21:39:56 +02:00
Quentin Young d7c0a89a3a
*: use C99 standard fixed-width integer types
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>
2018-03-27 15:13:34 -04:00
Lou Berger 996c93142d *: conform with COMMUNITY.md formatting rules, via 'make indent'
Signed-off-by: Lou Berger <lberger@labn.net>
2018-03-06 14:04:32 -05:00
Donald Sharp 044506e7f8 ospfd: LSDB_LOOP treat it as a loop.
Inform the .clang-format file about LSDB_LOOP and
put the proper indentation for this loop into the
code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-17 13:29:58 -05:00
Chirag Shah 05ba78e4d9 ospfd: Set filter to unbound debug logs
Ticket:CM-19213

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-12-27 10:13:38 -08:00
Donald Sharp acdf5e2510 *: Convert list_free usage to list_delete
list_free is occassionally being used to delete the
list and accidently not deleting all the nodes.
We keep running across this usage pattern.  Let's
remove the temptation and only allow list_delete
to handle list deletion.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-05 10:53:17 -04:00
Donald Sharp affe9e9983 *: Convert list_delete(struct list *) to ** to allow nulling
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>
2017-10-05 10:53:13 -04:00
Chirag Shah b5a8894de6 ospfd: OSPFv2 VRF Support
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-10-03 09:15:19 -07:00
whitespace / reindent d62a17aede *: reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'`

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-17 14:04:07 +02:00
David Lamparter 896014f4bc *: make consistent & update GPLv2 file headers
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>
2017-05-15 16:37:41 +02:00
Quentin Young ffa2c8986d *: remove THREAD_ON macros, add nullity check
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>
2017-05-09 20:44:19 +00:00
David Lamparter cf672a8654 *: use monotime()
This is largely a bulk-replace made with coccinelle.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-01-23 18:26:32 +01:00
Christian Franke e7331dea73 ospfd: Update route in zebra when tag changes
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2016-10-07 21:05:05 -04:00
David Lamparter 8f2c16aab0 *: use long long to print time_t
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>
(cherry picked from commit ef008d2f8dc8f7160d8a3d24a15f2fad79ef3242)
2016-05-29 21:08:04 -04:00
Joakim Tjernlund d8d939a61e ospfd: ospf_ase.c, external_lsa locking fixes.
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Acked-by: Feng Lu <lu.feng@6wind.com>
(cherry picked from commit fc363cd8a02ad1ac8a6ca57013fd8c531d45926a)
2016-05-26 15:33:31 +00:00
Joakim Tjernlund 58a1e062da ospfd: Move route_unlock_node() in ospf_ase_incremental_update()
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Acked-by: Feng Lu <lu.feng@6wind.com>
(cherry picked from commit d5643f5a477e099a3dcae4a707ccb5ca66bfee66)
2016-05-26 15:33:31 +00:00
Donald Sharp ed2eb093c7 ospfd: ospfd-warnings.patch
Remove compile warnings for the ospfd/ospf6d directory
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by:
2015-05-19 18:29:14 -07:00
Donald Sharp cf744958ba ospfd-spf-stats.patch
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>
2015-05-19 16:36:05 -07:00
Denis Ovsienko 72f062b6eb ospfd: address more trivial compiler warnings
* ospf_ase.c
  * ospf_ase_complete_direct_routes(): dismiss unused variable
2012-01-08 11:43:07 +00:00
Paul Jakma e8f2226195 ospfd: Fix various route_unlock discrepencies
* ospf_ase.c: (ospf_ase_calculate_route) Fix compiler warning about eval
  needing brackets.
  (various) add defensive asserts.
* ospf_lsdb.c: (ospf_lsdb_add) add missing node unlock if same lsa already
  was indexed.
  (ospf_lsdb_delete) check it's actually the same as specified lsa before
  deleting
  (ospf_lsdb_lookup_by_id_next) fix another corner case - no result =>
  don't go on.
2010-12-08 17:11:18 +00:00
Stephen Hemminger 3408afe2ac ospfd: comment out unused function 2009-12-03 19:18:26 +03:00
Joakim Tjernlund a8ba847ff9 ospfd: Change struct ospf_path *oi to ifindex.
* 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.
2009-08-03 16:52:30 +01:00
Joakim Tjernlund 77a1c4e05c [ospfd] compare ifIndex too when matching paths
ospf_path_lookup(), ospf_route_match_same() and
ospf_ase_route_match_same() needs to
compare if the interface matches too.
2009-06-25 15:36:08 +01:00
Joakim Tjernlund 3d8617b853 [ospfd] external LSA route_unlock_node() fixes
A few route_unlock_node() calls was missing.
2009-06-25 14:00:40 +01:00