Commit Graph

861 Commits

Author SHA1 Message Date
Sarita Patra
078110ca60 ospf6d: North-bound implementation for ospf6d rmaps
This commit introduces the implementation for the north-bound
callbacks for the ospf6d-specific route-map match and set clauses.

Signed-off-by: NaveenThanikachalam <nthanikachal@vmware.com>
Signed-off-by: Sarita Patra <saritap@vmware.com>
2021-03-30 22:59:30 +03:00
Russ White
1bed7a6fef
Merge pull request #8057 from ranjanyash54/default-route
ospf6d: Default Route functionality
2021-03-30 10:34:05 -04:00
Russ White
44f6359d08
Merge pull request #8368 from volta-networks/fix_isis_ospfv3_coverity
ospf6d: fix coverity warning
2021-03-30 10:22:05 -04:00
Martin Winter
9b25636e14
Merge pull request #8351 from volta-networks/fix_ospf6_abr_examin_summary_check_cost_change
ospf6d: fix ospf6_abr_examin_summary to check for a path cost change
2021-03-30 01:00:51 +02:00
lynne
4ff390e747 ospf6d: fix coverity warning
Signed-off-by: Lynne Morrison <lynne@voltanet.io>
2021-03-29 13:33:07 -04:00
Yash Ranjan
5f6635b9d4 ospf6d: Minor changes for stub area
Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2021-03-29 06:37:10 -07:00
Yash Ranjan
c4122b55a6 ospf6d: Add logic to set metric if route-map not present
Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2021-03-29 06:37:10 -07:00
Yash Ranjan
b8212e0310 ospf6d: Add logic to change the status of router to ASBR
Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2021-03-29 06:37:10 -07:00
Yash Ranjan
b19502d3b0 ospf6d: Add CLI and logic for default-information originate command
Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2021-03-29 06:37:10 -07:00
Mark Stapp
ee6ccc96b4 ospf6d: fix unguarded debug
Put a debug under a conditional.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-03-26 16:00:25 -04:00
Karen Schoener
d8ff370922 ospf6d: fix ospf6_abr_examin_summary to check for a path cost change
Fixes a regression in test case: anvl-ospfv3-16.14.

Signed-off-by: Karen Schoener <karen@voltanet.io>
2021-03-26 14:20:40 -04:00
Donald Sharp
67bf1a4215
Merge pull request #8329 from volta-networks/fix_unkown_lsa_U_bit
ospf6d: Do not flood unknown LSAs if U-bit is clear
2021-03-25 08:29:13 -04:00
Yash Ranjan
e161c2dc9e ospf6d: Link LSAs are not getting MAX_AGE in neighbor
When the ospf6 daemon goes down, it originates MAX_AGE
LSAs for all the self-originated LSAs so that it gets
flushed from the neighbor's database. But the link-LSAs
are not getting MAX_AGE.
Set the self-originated link-LSAs age to MAX_AGE and
flood it

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2021-03-25 00:25:16 -07:00
Karen Schoener
0889da248b ospf6d: Do not flood unknown LSAs if U-bit is clear
Do not flood unknown LSAs if U-bit is clear.

Signed-off-by: Karen Schoener <karen@voltanet.io>
2021-03-24 13:58:41 -04:00
David Lamparter
30043e4ce2 ospf6d: kill ospf6_memory.h, use MTYPE_STATIC
Same as other commits -- convert most DEFINE_MTYPE into the _STATIC
variant, and move the remaining non-static ones to appropriate places.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-22 19:31:56 +01:00
David Lamparter
771e1fbee0 ospf6d: split off ospf6_lsa_alloc()
... so we can make the MTYPEs static to ospf6_lsa.c

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-22 19:26:02 +01:00
Donatas Abraitis
37916b2b11
Merge pull request #8121 from opensourcerouting/macro-cleanup
*: require ISO C11 + semicolons after file-scope macros
2021-03-22 11:00:34 +02:00
Donald Sharp
6dfe243c38
Merge pull request #8278 from ckishimo/ospfv3_iface
ospf6d: fix iface commands lost when removing from area
2021-03-20 20:11:16 -04:00
Donald Sharp
5b21cd300c
Merge pull request #8248 from volta-networks/fix_ospf6_chunk_msgs
ospfd6: Clear locks when ospf messages need to be chunked
2021-03-17 09:09:28 -04:00
David Lamparter
67b0f40c98 *: require semicolon after FRR_CFG_DEFAULT_*
... again ...

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17 06:18:39 +01:00
David Lamparter
80413c2073 *: require semicolon after FRR_DAEMON_INFO & co.
... again ...

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17 06:18:39 +01:00
David Lamparter
960b9a5383 *: require semicolon after DEFINE_<typesafe...>
Again, see previous commits.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17 06:18:39 +01:00
David Lamparter
96244aca23 *: require semicolon after DEFINE_QOBJ & co.
Again, see previous commits.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17 06:18:37 +01:00
David Lamparter
8451921b70 *: require semicolon after DEFINE_HOOK & co.
See previous commit.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17 06:18:17 +01:00
David Lamparter
bf8d3d6aca *: require semicolon after DEFINE_MTYPE & co
Back when I put this together in 2015, ISO C11 was still reasonably new
and we couldn't require it just yet.  Without ISO C11, there is no
"good" way (only bad hacks) to require a semicolon after a macro that
ends with a function definition.  And if you added one anyway, you'd get
"spurious semicolon" warnings on some compilers...

With C11, `_Static_assert()` at the end of a macro will make it so that
the semicolon is properly required, consumed, and not warned about.

Consistently requiring semicolons after "file-level" macros matches
Linux kernel coding style and helps some editors against mis-syntax'ing
these macros.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17 06:18:17 +01:00
David Lamparter
247c7e27a9 snmp: change -std=gnu99 to -std=gnu11
The point of the `-std=gnu99` was to override a `-std=c99` that may be
coming in from net-snmp.  However, we want C11, not C99.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17 06:18:17 +01:00
ckishimo
800cc91882 ospf6d: fix warning message when interfae disabled
When removing an interface from an existing area,
the warning message we get is not correct

  interface r1-r2-eth0
   ipv6 address 2013:12::1/64
   ipv6 ospf6 dead-interval 4
   ipv6 ospf6 hello-interval 1
  !
  interface dummy
   ipv6 ospf6 dead-interval 4
   ipv6 ospf6 hello-interval 1
   ipv6 ospf6 network point-to-point
  !
  router ospf6
   ospf6 router-id 1.1.1.1
   interface r1-r2-eth0 area 0.0.0.0
  !

  r1(config-if)# router ospf6
  r1(config-ospf6)# no interface dummy area 0.0.0.0
  No such Area-ID: 0.0.0.0   <--- area 0.0.0.0 exists

This is fixing the error message

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-03-17 00:14:32 +01:00
ckishimo
d100d0b00c ospf6d: remove interface prefix when area is removed
This bug was first reported in PR#7717. When removing an interface
from the area, the interface prefix is still shown

  r1# sh ipv6 ospf6 interface prefix
  *N IA 2013:12::/64       ::1      r1-r2-eth0 00:00:12

  r1# conf t
  r1(config)# router ospf6
  r1(config-ospf6)# no interface r1-r2-eth0 area 0.0.0.0
  r1(config-ospf6)# exit

  r1# sh ipv6 ospf6 interface prefix
  *N IA 2013:12::/64       ::1      r1-r2-eth0 00:00:22

This fix will check if the interface is disabled so the
prefix is not shown

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-03-17 00:01:22 +01:00
ckishimo
5ac69ec52a ospf6d: fix iface commands lost when removing from area
In OSPFv3 when removing the interface from an area, all ospf6
interface commands are lost, so when changing the area you need
to reconfigure all ospf6 interface commands again

  r1# sh run
  interface r1-r2-eth0
   ipv6 address 2013:12::1/64
   ipv6 ospf6 dead-interval 4
   ipv6 ospf6 hello-interval 1
   ipv6 ospf6 network point-to-point
  !
  router ospf6
   ospf6 router-id 1.1.1.1
   interface r1-r2-eth0 area 0.0.0.0
  !

  r1# conf t
  r1(config)# router ospf6
  r1(config-ospf6)# no interface r1-r2-eth0 area 0.0.0.0
  r1(config-ospf6)# exit

  r1# sh run
  interface r1-r2-eth0
   ipv6 address 2013:12::1/64
  !                            <----- missing all ipv6 ospf6 commands
  router ospf6
   ospf6 router-id 1.1.1.1
  !

This is because the interface is being deleted instead of disabled
(see PR#7717) I believe the interface should be left as disabled
(not deleted) when removing the interface from the area

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-03-16 23:47:23 +01:00
lynne
1f4a8543d7 ospf6d: Fix coverity errors
Signed-off-by: Lynne Morrison <lynne@voltanet.io>
2021-03-16 16:08:59 -04:00
lynne
ccf260c4c8 ospfd6: Clear locks when ospf messages need to be chunked
When there are too many LSA updates to be sent in a packet the code needs to
correctly clear the locks that are taken while walking the lists and then wait
for the appropriate timer to expire to continue walking the list.   The routine
that was being called would not properly remove all the locks that needed to be
cleared, and would also try to incorrectly delete the lsa/route.   The code now
clears the locks and leaves the lsa on the list.  When the timers fire again
the code continues walking the list to send the rest of the lsas to the
neighbor.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
2021-03-16 11:34:17 -04:00
David Lamparter
5145a17261 *: fix printf extension types
Some mistakes have crept in again.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-14 22:56:07 +01:00
Donald Sharp
d47b448de5 ospf6d: Convert to use builtin printf functionality
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-03-14 22:56:07 +01:00
Russ White
846706b0e1
Merge pull request #8138 from ckishimo/ospfv3_prefix
ospf6d: fix LSA prefix options
2021-03-09 10:56:54 -05:00
Donald Sharp
133d893124
Merge pull request #8185 from volta-networks/fix_ospf6_changing_area_to_stub
ospf6d: Don't advertise AS-External LSAs into stub area
2021-03-07 09:02:58 -05:00
lynne
bac66c5c64 ospf6d: Don't advertise AS-External LSAs into stub area
If area is a normal area and has adjacencies up and then the user changes
the area to a stub area, the code was leaving existing AS-External LSAs in
the database and was sending AS-External LSAs into the stub area causing
the adjacency to stay in Ex-Start.   With this change we now cleanup the
AS-External LSAs that existed when area was not a stub and do not advertise
AS-External LSAs into the stub area.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
2021-03-03 09:20:36 -05:00
Emanuele Di Pascale
7bfc5ae813 ospf6d: fix setting NOAUTOCOST flag
ospf6 keeps a flag to remember whether the cost for an interface
was manually added via config or computed automatically, but if
the configured value matches the auto-computed one we were not
setting this flag, meaning that the config would not show up in
the config.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2021-03-03 10:56:51 +01:00
Yash Ranjan
305b639bca ospf6d: Json support added for command "show ipv6 ospf6 spf tree [json]"
Modify code to add JSON format output in show command
"show ipv6 ospf6 spf tree" with proper formating

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2021-03-02 02:14:57 -08:00
Donald Sharp
1bc19a9e1a ospf6d: turn some info->debug
The log is being spammed every spf interval:

Feb 27 16:19:34  ospf6d[462371]: SPF processing: # Areas: 1, SPF runtime: 0 sec 2043 usec, Reason: R+, R-, N+
Feb 27 16:20:59  ospf6d[462371]: SPF: Scheduled in 0 msec
Feb 27 16:20:59  ospf6d[462371]: SPF processing: # Areas: 1, SPF runtime: 0 sec 2284 usec, Reason: R+, R-
Feb 27 16:21:01  ospf6d[462371]: SPF: Scheduled in 0 msec
Feb 27 16:21:01  ospf6d[462371]: SPF processing: # Areas: 1, SPF runtime: 0 sec 2153 usec, Reason: R+, R-, N-

There is no reason to do this

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-02-27 10:42:07 -05:00
Donald Sharp
30b3fb20d4
Merge pull request #8139 from volta-networks/fix_ospf6_show_database
ospf6d: fix display of unknown LSAs in show ipv6 ospf6 database command
2021-02-25 06:34:52 -05:00
Mark Stapp
15869cd81d
Merge pull request #8035 from qlyoung/remove-more-sprintf
*: remove more sprintf()
2021-02-23 15:55:02 -05:00
lynne
3e67830c5f ospf6d: fix display of unknown LSAs in show ipv6 ospf6 database command
When an unknown LSA is in the database and the user issues the
"show ipv6 ospf6 database" command there is a crash.  The code currently
doesn't properly handle display of unknown LSAs.

Signed-off-by: Lynne Morrison <lynne@voltaio.net>
2021-02-23 13:04:06 -05:00
ckishimo
600d28e311 ospf6d: add DN bit in prefix options
According to RFC 5340 appendix A.4.1.1

     0  1  2  3  4  5  6  7
    +--+--+--+--+--+-+--+--+
    |  |  |  |DN| P|x|LA|NU|
    +--+--+--+--+--+-+--+--+

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-02-23 18:04:27 +01:00
ckishimo
8ae79ff269 ospf6d: remove redundant code when printing prefix options
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-02-23 18:04:18 +01:00
ckishimo
66721aaee7 ospf6d: print prefix options for lsa type 3 and 5
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-02-23 15:39:25 +01:00
Donald Sharp
ba877ace25
Merge pull request #8102 from volta-networks/fix_ospf6_error_logs
ospf6d: Update logs that indicate why ospf6 adjacency is not coming up.
2021-02-19 08:22:47 -05:00
Yash Ranjan
2727b66027 ospf6d: Metric option in intra-prefix LSA detail
Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2021-02-18 20:36:13 -08:00
lynne
ff99e5b648 ospf6d: Update logs that indicate why ospf6 adjacency is not coming up.
Add more details to these logs to help make it easier to determine why
ospf6 adjacency is not coming up.   Also make these logs show up without
having to turn on debug logging, again making it easier to debug the
misconfiguration.

Signed-off-by: Lynne Morrison <lynne@voltaio.net>
2021-02-18 10:24:51 -05:00
Russ White
67821bf2ad
Merge pull request #8051 from volta-networks/fix_ospf6_hello_lo
ospf6d: Don't send hellos on loopback interface
2021-02-16 11:42:01 -05:00
David Lamparter
1d5453d607 *: remove tabs & newlines from log messages
Neither tabs nor newlines are acceptable in syslog messages.  They also
break line-based parsing of file logs.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-02-14 15:36:51 +01:00