Commit graph

88 commits

Author SHA1 Message Date
anlan_cs 3522ab21d0 ospfd: Correct one word
Signed-off-by: anlan_cs <anlan_cs@126.com>
2025-01-03 22:57:30 +08:00
Donald Sharp baa0a1df5b *: Fix spelling errors found
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-15 09:19:37 -04:00
Jeevesh Rishi Dindyal (Sarvesh) c824d9792e ospfd: opsf_abr.c memory leak fix, free range
The new create range attribute is send to add to ranges, but not use if the prefix already exist in the ranges.

Signed-off-by: ryndia <dindyalsarvesh@gmail.com>
2023-05-10 10:59:20 +04:00
Renato Westphal f07ff222f8 ospfd: add support for NSSA Type-7 address ranges
Implement NSSA address ranges as specified by RFC 3101:

   NSSA border routers may be configured with Type-7 address ranges.
   Each Type-7 address range is defined as an [address,mask] pair.  Many
   separate Type-7 networks may fall into a single Type-7 address range,
   just as a subnetted network is composed of many separate subnets.
   NSSA border routers may aggregate Type-7 routes by advertising a
   single Type-5 LSA for each Type-7 address range.  The Type-5 LSA
   resulting from a Type-7 address range match will be distributed to
   all Type-5 capable areas.

Syntax:
  area A.B.C.D nssa range A.B.C.D/M [<not-advertise|cost (0-16777215)>]

Example:
  router ospf
   router-id 1.1.1.1
   area 1 nssa
   area 1 nssa range 172.16.0.0/16
   area 1 nssa range 10.1.0.0/16
  !

Since regular area ranges and NSSA ranges have a lot in common,
this commit reuses the existing infrastructure for area ranges as
much as possible to avoid code duplication.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2023-03-31 19:28:15 -03:00
Renato Westphal 271588ace0 ospfd: do not install blackhole routes for ranges with "not-advertise"
Adding blackhole routes is unnecessary in that case.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2023-03-31 19:28:15 -03:00
Renato Westphal 4312d66f9f ospfd: refactor range commands
* Update the "range" helpers to accept an area pointer instead of
  an area ID;
* Always call ospf_area_display_format_set() after every "range"
  command to ensure consistency.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2023-03-31 19:28:15 -03:00
Renato Westphal c2b55093a1 ospfd: use the ospf_area_range_active() helper function more consistently
A small change to improve code readability.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2023-03-31 19:28:15 -03:00
Renato Westphal 017714e3ad ospfd: implement Type-7 default routes for NSSA areas
Add the "default-information-originate" option to the "area X nssa"
command. That option allows the origination of Type-7 default routes
on NSSA ABRs and ASBRs.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2023-03-31 19:28:15 -03: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
Russ White 62bd2580e3
Merge pull request #12366 from manojvn/ospfv2-flood-reduction
ospfd: Support OSPF Refresh and Flooding Reduction RFC4136.
2023-02-21 08:03:06 -05: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
Manoj Naragund 3d4e02e230 ospfd: generation of indication LSAs on area border routers.
Description:

code changes involve changes on abr routers to generate and flush
indication LSAs, on backbone and non-backbone areas in different
scenarios.

Signed-off-by: Manoj Naragund <mnaragund@vmware.com>
2023-01-19 21:03:03 -08:00
sri-mohan1 733c0f3ae6 ospfd: changes code maintainability
these changes are for improving the code maintainability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2022-08-19 12:45:16 +05:30
sri-mohan1 88282a260c ospfd: debug string corrected
Debug string for ospf is corrected

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2022-08-12 18:37:42 +05:30
Donald Sharp be4b502a76 ospfd: Remove usage of inet_ntop
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-07-29 18:31:58 -04:00
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
Renato Westphal 225883cf4d ospfd: fix backbone connection check to account for restarting neighbors
An OSPF ABR, while in the process of announcing summary LSAs,
checks whether it's connected to the backbone area. If not, then
all summary LSAs are invalidated and not announced (or flushed)
while the missing backbone connectivity persists.

The backbone connectivity check consists of assessing whether
there's at least one fully formed adjacency in the backbone area. The
problem is that this check can fail unexpectedly if the router is
acting as a helper for a neighbor that is performing a graceful
restart. This is because there's a short interim of time in which
that neighbor's state will oscillate between ExStart and Full during
the LSDB synchronization process.

To address that issue, update ospf_act_bb_connection() to consider
neighbors performing a graceful restart as if they were fully
adjacent (which is what a GR helper should do).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2021-11-24 20:21:42 -03: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
Alexander Chernavin 1c1c342d2a ospfd: install Type-7 when NSSA area is configured after redistribution
Currently, if NSSA area is configured before redistribution is enabled,
Type-7 LSA's are installed and flooded. But if NSSA area is configured
after redistribution is enabled, Type-7 LSA's are not installed.

With this change, when NSSA area is configured, schedule a task that
scans for external LSA's. If they exist, install Type-7 and flood to
all NSSA Areas.

There already was an attempt to fix this problem in 0f321812f where
ospf_asbr_nssa_redist_task() was triggered in ospf_abr_task_timer().
This turns out to be incorrect place for this operation because it's
a one-off operation needed only after "area <ID> nssa" execution. And
ospf_abr_task_timer() is a periodic operation. Triggering
ospf_asbr_nssa_redist_task() in ospf_abr_task_timer() caused a problem
that was fixed in 945eec2b6 making the problem with NSSA area
configured after redistribution actual again.

Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2021-04-12 09:34:20 -04:00
ckishimo c317eddbce ospfd: add support for suppress_fa
This command will trigger the OSPF forwarding address suppression in
translated type-5 LSAs, causing a NSSA ABR to use 0.0.0.0 as a forwarding
address instead of copying the address from the type-7 LSA

Example: In a topology like: R1 --- R2(ABR) --- R3(ASBR)

R3 is announcing a type-7 LSA that is translated to type-5 by the R2 ABR.
The forwarding address in the type-5 is by default copied from the type-7

    r1# sh ip os da external

                    AS External Link States

      LS age: 6
      Options: 0x2  : *|-|-|-|-|-|E|-
      LS Flags: 0x6
      LS Type: AS-external-LSA
      Link State ID: 3.3.3.3 (External Network Number)
      Advertising Router: 10.0.25.2
      LS Seq Number: 80000001
      Checksum: 0xcf99
      Length: 36

      Network Mask: /32
            Metric Type: 2 (Larger than any link state path)
            TOS: 0
            Metric: 20
            Forward Address: 10.0.23.3    <--- address copied from type-7 lsa
            External Route Tag: 0

    r2# sh ip os database

                    NSSA-external Link States (Area 0.0.0.1 [NSSA])

    Link ID         ADV Router      Age  Seq#       CkSum  Route
    3.3.3.3         10.0.23.3          8 0x80000001 0x431d E2 3.3.3.3/32 [0x0]

                    AS External Link States

    Link ID         ADV Router      Age  Seq#       CkSum  Route
    3.3.3.3         10.0.25.2          0 0x80000001 0xcf99 E2 3.3.3.3/32 [0x0]

    r2# conf t
    r2(config)# router ospf
    r2(config-router)# area 1 nssa suppress-fa
    r2(config-router)# exit
    r2(config)# exit

    r2# sh ip os database

                    NSSA-external Link States (Area 0.0.0.1 [NSSA])

    Link ID         ADV Router      Age  Seq#       CkSum  Route
    3.3.3.3         10.0.23.3         66 0x80000001 0x431d E2 3.3.3.3/32 [0x0]

                    AS External Link States

    Link ID         ADV Router      Age  Seq#       CkSum  Route
    3.3.3.3         10.0.25.2         16 0x80000002 0x0983 E2 3.3.3.3/32 [0x0]

    r1# sh ip os da external

           OSPF Router with ID (11.11.11.11)

                    AS External Link States

      LS age: 34
      Options: 0x2  : *|-|-|-|-|-|E|-
      LS Flags: 0x6
      LS Type: AS-external-LSA
      Link State ID: 3.3.3.3 (External Network Number)
      Advertising Router: 10.0.25.2
      LS Seq Number: 80000002
      Checksum: 0x0983
      Length: 36

      Network Mask: /32
            Metric Type: 2 (Larger than any link state path)
            TOS: 0
            Metric: 20
            Forward Address: 0.0.0.0       <--- address set to 0
            External Route Tag: 0

    r2# conf t
    r2(config)# router ospf
    r2(config-router)# no area 1 nssa suppress-fa
    r2(config-router)# exit

    r1# sh ip os da external

           OSPF Router with ID (11.11.11.11)

                    AS External Link States

      LS age: 1
      Options: 0x2  : *|-|-|-|-|-|E|-
      LS Flags: 0x6
      LS Type: AS-external-LSA
      Link State ID: 3.3.3.3 (External Network Number)
      Advertising Router: 10.0.25.2
      LS Seq Number: 80000003
      Checksum: 0xcb9b
      Length: 36
      Network Mask: /32
            Metric Type: 2 (Larger than any link state path)
            TOS: 0
            Metric: 20
            Forward Address: 0.0.0.0       <--- address set to 0
            External Route Tag: 0

    r2# conf t
    r2(config)# router ospf
    r2(config-router)# no area 1 nssa suppress-fa
    r2(config-router)# exit

    r1# sh ip os da external

           OSPF Router with ID (11.11.11.11)

                    AS External Link States

      LS age: 1
      Options: 0x2  : *|-|-|-|-|-|E|-
      LS Flags: 0x6
      LS Type: AS-external-LSA
      Link State ID: 3.3.3.3 (External Network Number)
      Advertising Router: 10.0.25.2
      LS Seq Number: 80000003
      Checksum: 0xcb9b
      Length: 36

      Network Mask: /32
            Metric Type: 2 (Larger than any link state path)
            TOS: 0
            Metric: 20
            Forward Address: 10.0.23.3    <--- address copied from type-7 lsa
            External Route Tag: 0

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-03-24 16:06:38 +01:00
ckishimo 0124b46b94 ospfd: fix NSSA translator
Having 2 ABR in NSSA area where R3 is the elected translator

R3# show ip ospf
  We are an ABR and the NSSA Elected Translator.
R2# show ip ospf
  We are an ABR, but not the NSSA Elected Translator.

When R3 loses the Border condition by shutting down the interface
to the backbone, we end up with no translator in the NSSA area. It
is expected R2 to take over the translator role

R3# sh ip ospf
  It is not ABR, therefore not Translator.
R2# show ip ospf
   We are an ABR, but not the NSSA Elected Translator.

This PR forces the ABR to reevaluate the translator condition, so
R2 becomes the elected Translator

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2020-11-18 23:23:14 -08: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
Donatas Abraitis 2dbe669bdf :* Convert prefix2str to %pFX
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-10-22 09:07:41 +03:00
Russ White 742e0f4428
Merge pull request #7206 from ckishimo/fix7086
ospfd: flush type 5 when type 7 is removed
2020-10-20 09:28:13 -04:00
Donald Sharp ae32e1c298 ospfd: Convert to using %pFX
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-10-17 13:39:10 -04:00
ckishimo ab1464ddb0 ospfd: flush type 5 when type 7 is removed
When the ASBR stops announcing a prefix into the NSSA area, the LSA
type 7 is removed from the area. However the ABR is refreshing the
type 5 in its LSDB while removing the Type 7 LSA. Routers outside
the area do not get an update.

With the following topology: r1---r2---r3, with r3 being the ASBR
announcing type 7 LSA:

r3 configuration
router ospf
 redistribute static
 network 10.0.23.0/24 area 1
 area 1 nssa
!

We stop announcing prefix 3.3.3.3 in the ASBR
r3# conf
r3(config)# router ospf
r3(config-router)# no redistribute static
r3(config-router)#

r2 (ABR)
r2# sh ip os database

                NSSA-external Link States (Area 0.0.0.1 [NSSA])

Link ID         ADV Router      Age  Seq#       CkSum  Route
3.3.3.3         33.33.33.33     3600 0x8000002f 0x13be E2 3.3.3.3/32 [0x0]  <-- flushed

                AS External Link States

Link ID         ADV Router      Age  Seq#       CkSum  Route
3.3.3.3         10.0.25.2          7 0x8000002f 0x73c7 E2 3.3.3.3/32 [0x0]  <-- refreshed(?)

With PR#7086 the LSA type 5 is flushed from the LSDB in r2 and the change is
announced to routers outside the area (r1)

r2# sh ip os da

                NSSA-external Link States (Area 0.0.0.1 [NSSA])

Link ID         ADV Router      Age  Seq#       CkSum  Route
3.3.3.3         33.33.33.33     3600 0x80000002 0x6d91 E2 3.3.3.3/32 [0x0]  <-- flushed

                AS External Link States

Link ID         ADV Router      Age  Seq#       CkSum  Route
3.3.3.3         10.0.25.2       3600 0x80000002 0xcd9a E2 3.3.3.3/32 [0x0]  <-- flushed

r1# sh ip os da

                AS External Link States

Link ID         ADV Router      Age  Seq#       CkSum  Route
3.3.3.3         10.0.25.2       3600 0x80000002 0xcd9a E2 3.3.3.3/32 [0x0]  <-- flushed

Unfortunately I just realized that with PR#7086 I'm introducing a new bug, as Type-5 LSA
are not being refreshed when reaching MaxAge

r2# sh ip os da

                NSSA-external Link States (Area 0.0.0.1 [NSSA])

Link ID         ADV Router      Age  Seq#       CkSum  Route
3.3.3.3         33.33.33.33       35 0x80000002 0x6d91 E2 3.3.3.3/32 [0x0]  <--- refreshed

                AS External Link States

Link ID         ADV Router      Age  Seq#       CkSum  Route
3.3.3.3         10.0.25.2       3600 0x80000002 0xcd9a E2 3.3.3.3/32 [0x0]  <--- not refreshed!

So this PR should fix the original issue and the bug introduced later, so when stopping
redistribution in the ASBR, both type 5 and type 7 are flushed:

r2# sh ip os da

                NSSA-external Link States (Area 0.0.0.1 [NSSA])

Link ID         ADV Router      Age  Seq#       CkSum  Route
3.3.3.3         33.33.33.33     3600 0x80000002 0x6d91 E2 3.3.3.3/32 [0x0]

                AS External Link States

Link ID         ADV Router      Age  Seq#       CkSum  Route
3.3.3.3         10.0.25.2       3600 0x80000002 0xcd9a E2 3.3.3.3/32 [0x0]

Routers outside the area are also notified

r1# sh ip os da

Link ID         ADV Router      Age  Seq#       CkSum  Route
3.3.3.3         10.0.25.2       3600 0x80000002 0xcd9a E2 3.3.3.3/32 [0x0]

Re-enabling redistribution, both LSA will be advertised again

r3# conf
r3(config)# router ospf
r3(config-router)# no redistribute static
r3(config-router)# redistribute static
r3(config-router)#

r2# sh ip os da

                NSSA-external Link States (Area 0.0.0.1 [NSSA])

Link ID         ADV Router      Age  Seq#       CkSum  Route
3.3.3.3         33.33.33.33       19 0x80000001 0x6f90 E2 3.3.3.3/32 [0x0]

                AS External Link States

Link ID         ADV Router      Age  Seq#       CkSum  Route
3.3.3.3         10.0.25.2         11 0x80000001 0xcf99 E2 3.3.3.3/32 [0x0]

and they are refreshed when reaching MaxAge

                NSSA-external Link States (Area 0.0.0.1 [NSSA])

Link ID         ADV Router      Age  Seq#       CkSum  Route
3.3.3.3         33.33.33.33       10 0x80000002 0x6d91 E2 3.3.3.3/32 [0x0] <-- Seq 2

                AS External Link States

Link ID         ADV Router      Age  Seq#       CkSum  Route
3.3.3.3         10.0.25.2          2 0x80000002 0xcd9a E2 3.3.3.3/32 [0x0] <-- Seq 2

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2020-09-29 13:58:49 -07:00
Russ White b4b7ca8944
Merge pull request #7122 from ckishimo/type4
ospfd: do not generate type 4 LSA from NSSA ABR
2020-09-22 11:30:06 -04:00
ckishimo 8273ee4448 ospfd: do not generate type 4 LSA from NSSA ABR
In a topology like R1 -- R2 -- R5, with R2 being NSSA ABR and R5 being
ASBR redistributing external routes, the ABR R2 will translate type-7
LSA into type-5 and advertise to the backbone. In the current implementation
R2 is also advertising a type-4 LSA when there is no need.

RFC 3101: "...NSSA's border routers never originate Type-4 summary-LSAs
for the NSSA's AS boundary routers, since Type-7 AS-external-LSAs are
never flooded beyond the NSSA's border..."

With this PR a type-4 LSA will not be advertised

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2020-09-17 07:44:14 -07:00
ckishimo a5f7319294 ospfd: flush type 5 when type 7 is removed
When the ASBR stops announcing a prefix into the NSSA area, the LSA
type 7 is removed from the area. However the ABR is refreshing the
type 5 in its LSDB while removing the Type 7 LSA. Routers outside
the area do not get an update.

With this change the LSA type 5 is flushed from the LSDB and the
change is announced to routers outside the area

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2020-09-12 11:42:24 -07:00
Alexander Chernavin 0f321812f5 ospfd: install Type-7 when NSSA enabled after redistribution
If NSSA is enabled before redistribution is configured, Type-7 LSA's
are installed. But if NSSA is enabled after redistribution is
configured, Type-7 LSAs are missing.

With this change, when NSSA is enabled, scan for external LSA's and
if they exist, install Type-7.

Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2020-09-03 08:12:05 -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
Donatas Abraitis c4efd0f423 *: Do not cast to the same type
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-04-08 17:15:06 +03:00
Donald Sharp 6e3e2c6d5f ospfd: Cleanup set but unused variables
There existed some variables set but never used.  Clean this up.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-02-27 09:41:58 -05: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
Sarita Patra 990baca057 ospfd: handling of OSPF_AREA_RANGE_ADVERTISE flag
Issue: # https://github.com/FRRouting/frr/issues/1836

Issue 1: if the router ospf current configuration is "area 0.0.0.2
range 1.0.0.0/24 cost 23" and user try to configure "area 0.0.0.2
range 1.0.0.0/24 not-advertise", the existing o/p is "area 0.0.0.2
range 1.0.0.0/24 cost 23 not-advertise". The keywords "not-advertise"
& "cost" are multually exclusive, so they should not come together.
The vice versa way configuration is working fine.

Fix: When ospf area range "not-advertise", the cost should be initialized
to OSPF_AREA_RANGE_COST_UNSPEC.

Issue 2: if the router ospf current configuration "area 0.0.0.2 range
1.0.0.0/24 substitute 2.0.0.0/24" and user try to configure "area 0.0.0.2
range 1.0.0.0/24 not-advertise" the existing o/p is "area 0.0.0.2 range
1.0.0.0/24 not-advertise substitute 2.0.0.0/24". The keywords
"not-advertise" & "substiture" are multually exclusive, so they should
not come together. The vice versa way configuration is working fine.

Fix: When ospf area range "not-advertise" is configured,
ospf_area_range_substitute_unset() should be get called.

Issue 3: if the router ospf6 current configuration is "area 0.0.0.2
range 2001::/64 cost 23" and user try to configure "area 0.0.0.2 range
2001::/64 advertise", the existing o/p is area 0.0.0.2 range 2001::/64.
The keyword "cost 23" disappears.

Fix: When ospf area range "advertise" is configured and the range is not
NULL, the cost should not be modified.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2018-09-24 21:46:16 -07:00
Quentin Young cf444bcf40 ospfd: OSPF_[ERR|WARN] -> EC_OSPF
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-09-13 18:56:04 +00:00
Donald Sharp 733fb9177f ospfd: Modify ospf_abr.c to use new error-code subsystem
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00: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 b5a8894de6 ospfd: OSPFv2 VRF Support
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-10-03 09:15:19 -07:00
Chirag Shah a64356180f ospfd: fix route_node_get
Call apply_mask() where route_node_get() is performed,
for the prefix to fetch correct node.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-08-27 16:09:24 -07:00
David Lamparter 9d303b37d7 Revert "*: reindent pt. 2"
This reverts commit c14777c6bf.

clang 5 is not widely available enough for people to indent with.  This
is particularly problematic when rebasing/adjusting branches.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-22 14:52:33 +02:00
whitespace / reindent c14777c6bf
*: reindent pt. 2
w/ clang 5

* reflow comments
* struct members go 1 per line
* binpack algo was adjusted
2017-07-17 15:26:02 -04: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
Donald Sharp 9e962de4b6 Merge remote-tracking branch 'origin/stable/3.0' 2017-05-24 11:22:35 -04:00