Commit Graph

761 Commits

Author SHA1 Message Date
Donald Sharp
42e122614b
Merge pull request #7448 from mjstapp/fix_gcc10_formats
* : clean up format specifiers for gcc-10
2020-11-10 11:23:02 -05:00
Russ White
087336f5de
Merge pull request #7445 from ranjanyash54/dev_4
ospf6d: Json support added for command "show ipv6 ospf6 neighbor [json]"
2020-11-10 11:15:02 -05:00
Donald Sharp
9811fcdca3
Merge pull request #7137 from kssoman/ospf
ospf6d : Intra area route for connected prefix not installed
2020-11-05 11:57:50 -05:00
github login name
6a5bb30062 ospf6d: Json support added for command "show ipv6 ospf6 neighbor [json]"
Modify code to add JSON format output in show command
"show ipv6 ospf6 neighbor" with proper formating

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2020-11-04 22:44:21 -08:00
Mark Stapp
72327cf3e7 * : clean up format specifiers for gcc-10
gcc 10 complains about some of our format specs, fix them. Use
atomic size_t in thread stats, to work around platform
differences.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-11-04 16:56:17 -05:00
Rafael Zalamena
7c62dc76d4
Merge pull request #7261 from Niral-Networks/niral_dev_vrf_ospf6
ospf6d : Transformation changes for ospf6 vrf support.
2020-11-03 11:59:38 -03:00
harios_niral
96117716ba ospf6d : Transformation changes for ospf6 vrf support.
1. Reviews comments taken care.

Signed-off-by: harios_niral <hari@niralnetworks.com>
2020-11-02 08:24:21 -08:00
harios_niral
beadc736bb ospf6d : Transformation changes for ospf6 vrf support.
1. All the changes are related to handle ospf6 with different vrf.
2. The dependancy of global ospf6 is removed.

Co-authored-by: Kaushik <kaushik@niralnetworks.com>
Signed-off-by: harios_niral <hari@niralnetworks.com>
2020-10-30 23:50:08 -07:00
Donald Sharp
130830323d ospf6d: Give a bit more data when sendmsg fails
When sendmsg fails add a bit more data in hopes we can
figure out what is going wrong.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-10-29 08:53:43 -04:00
Donald Sharp
b66ec22ca9 ospf6d: ifindex should not be a pointer for ospf6_sendmsg
Let's cleanup the ospf6_sendmsg api and not pass in a pointer
to the ifindex to use.  It's an integer.

Also remove the assert(*ifindex);  We never use ifindex of 0

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-10-29 07:01:40 -04:00
Donald Sharp
01d8acff73 ospf6d: Clean up ospf6_network.h header
Make it compliant.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-10-29 06:55:04 -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
Donald Sharp
299ce4b3bd ospf6d: Convert to using %pFX
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-10-17 13:39:10 -04:00
Donald Sharp
c10e14e96d *: Create/Use accessor functions for lock count
Create appropriate accessor functions for the rn->lock
data.  We should be accessing this data through accessor
functions since it is private data to the data structure.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-10-17 13:39:10 -04:00
Donald Sharp
2e37407f9d ospf6d, tests: Prevent use after free
The code pattern:

for (ALL_LSDB(lsdb, lsa)) {
	remove_lsa(lsa)
}

has a use after free in ALL_LSDB, since we ask for the next pointer,
after it has been freed.

Modify the code such that we grab the next pointer before we can
possibly free it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-10-11 11:16:44 -04:00
Donald Sharp
62270cc3ee ospf6d: Make ospf6_lsa_lock follow normal FRR pattern
The normal ospf6_lsa_lock call should return the pointer
to the lock data structure we are holding.  This is the
normal pattern for locking a data structure in FRR.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-10-11 11:14:45 -04:00
Renato Westphal
8b6b6b694d
Merge pull request #7222 from idryzhov/fix-debug
fix debug commands node inconsistencies
2020-10-09 21:58:24 -03:00
Donald Sharp
c527acf1eb ospf6d: Move header includes around to reflect reality
ospf6_network.h needs ospf6_top.h to be included
first.

This makes newer versions of gcc much much happier.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-10-08 20:44:23 -04:00
Kaushik
7df1f3623e ospf6d : Socket change for ospf6d vrf support.
1. The socket() call is changed to vrf_socket().
2. The ospf6 instance creation api added.
3. The global socket fd is replaced with ospf6->fd.
4. All dependency of the global socket is resolved.
5. Added the ospf6 receive timer in the global structure.
6. Performed the thread off on receive timer when we do "no router ospf6".

Co-authored-by: harios <hari@niralnetworks.com>
Signed-off-by: Kaushik <kaushik@niralnetworks.com>
2020-10-06 21:23:54 -07:00
Olivier Dugeon
24d7ccfabd
Merge pull request #7202 from gromit1811/proposed_fix_7030
ospf6d: Fix flooding of old copies of self-originated LSAs
2020-10-06 16:42:41 +02:00
Soman K S
cad3ca4cf9 ospf6d : Intra area route for connected prefix not installed
Issue: When ospfv3 is configured on interface between routers in different network,
       the intra area route for the remote connected prefix is not installed in ospf
       route table and zebra

Fix: When the advertising router is directly connected but in different network
     the interface lookup in the intra area lsa processing does not provide
     the matching interface and valid nexthop. Therefore the nexthop is
     copied from the link state entry which contains valid
     ifindex required for installing the route.

Signed-off-by: kssoman <somanks@gmail.com>
2020-10-04 22:00:07 +05:30
Igor Ryzhov
d7b86ae4fe vtysh: dynamically generate the list of daemons for commands
Some daemons were actually missing from the static definitions: nhrpd,
babeld, eigrpd and bfdd.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-10-02 15:06:27 +03:00
Igor Ryzhov
dd73744d8c *: move "show debugging ..." commands to enable node
Use the same node for "show debugging" commands in all daemons.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-10-02 15:06:05 +03:00
Martin Buck
4c63a76a63 ospf6d: Fix flooding of old copies of self-originated LSAs
When receiving old copies (e.g. originated before the local ospf6d was
restarted) of supposedly self-originated LSAs which we previously tried to
flush from the network (by setting them to MaxAge), neither flood them nor
add them to our LSDB. Instead, keep the MaxAge version until we actually
(re-)originate them.

Possible fix for #7030. Testcase in #7168
(tests/topotests/ospf6-dr-no-netlsa-bug7030).

Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
2020-09-29 23:07:40 +02:00
Mark Stapp
f6d11a9bf6 ospf6d: fix SA warning
Fix an SA issue in ospf6_interface.c.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-09-03 12:57:36 -04:00
Kaushik
c5d28568c6 ospf6d : Preparing for ospf6d VRF support.
1. Removed the VRF_DEFAULT dependency from ospf6d.
2. The dependency on show command still exist
   will be fixed when the ospf6 master is available.

Co-authored-by: Harios <hari@niralnetworks.com>
Signed-off-by: Kaushik <kaushik@niralnetworks.com>
2020-09-01 03:02:46 -07:00
Quentin Young
25ee44b522
Merge pull request #6732 from opensourcerouting/printfrr-prep
*: preparations for printfrr coccinelle run
2020-07-29 14:29:34 -04:00
Quentin Young
65b86778c1
Merge pull request #6711 from GalaxyGorilla/bfd_isis_profiles
Add BFD profiles for IS-IS
2020-07-21 14:45:31 -04:00
David Lamparter
a5d68ac07a
Merge pull request #6700 from deastoe/ospf6-interface-decimal-area 2020-07-21 13:42:59 +02:00
Patrick Ruddy
de842255f9 ospf6d: decimal area format in interface command
The ospf6 "interface <blah> area <x>" command only allows the area to
be specified in the ipv4 address format, whereas the show run command
always shows it in the format in which the area was created. This causes
the frr-reload script to be unable to remove ospfv3 interfaces when the
area was created in decimal format. The solution is to allow both formats
to be configured as they can be for other area commands.

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
2020-07-14 17:50:54 +01:00
David Lamparter
dc13886849 ospf6d: pre-fix coccinelle hang points
coccinelle gets stuck in a few locations in ospf6d...

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-07-14 11:27:41 +02:00
David Lamparter
858f9c0822 ospf6d: use in_addr_t for area/router IDs
Signed-off-by: David Lamparter <equinox@diac24.net>
2020-07-14 11:16:01 +02: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
GalaxyGorilla
4affdba79e *: add BFD profile support for IS-IS
BFD profiles can now be used on the interface level like this:

	interface eth1
	  ip router isis 1
          isis bfd
          isis bfd profile default

Here the 'default' profile needs to be specified as usual in the
bfdd configuration.

Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2020-07-10 11:28:43 +00:00
Rafael Zalamena
c2aab69336 *: add filter northbound support
Allow all daemons to work with filter northbound.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-05 14:31:26 -03:00
Russ White
cb47b207f5
Merge pull request #6407 from donaldsharp/revert_ospfv3_fix
ospf6d: Revert "ospf6d: Prevent use after free"
2020-05-21 15:15:07 -04:00
Donald Sharp
e2e60c48bf ospf6d: Revert "ospf6d: Prevent use after free"
This reverts commit 0f9f74baeb.

This commit was causing crashes and the goal of this commit
was to make coverity sanity happy.  I'd rather have coverity
sad and not have ospfv3 crash

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-14 15:35:19 -04:00
Don Slice
780d4bdd80 ospf6d: withdraw redistributed prefixes based on prefix-list changes
Problem reported that when an a previously advertised redistributed
route should be withdrawn based on a prefix-list change or route-map
deletion, the external LSAs would remain in the database and not be
withdrawn from peers. This fix does the withdraw when the prefix-list
is changed or route-map is deleted.

Ticket: CM-28944
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
2020-05-05 13:18:15 +00:00
David Lamparter
2768748b88 build: use VPATH for vtysh_scan
No need to put $(top_srcdir) everywhere.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-04-27 09:30:01 +02:00
David Lamparter
c334a16ef1
Merge pull request #6262 from qlyoung/remove-sprintf 2020-04-23 20:27:26 +02:00
Mark Stapp
4b0e09d878 ospf6d: fix SA warnings
Clean up some SA warnings in use of ospf6_lsa_unlock()

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-04-21 11:01:18 -04: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
Donald Sharp
744ba56969 ospf6d: Prevent use after free
ospf6_lsa_unlock may free the lsa data structure as such
we cannot use the passed in data structure after freeing it.

Provide a mechanism to know if the data has been freed
using the same usage patterns of other _unlock functions
in FRR.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-04-18 08:35:06 -04:00
Donald Sharp
a83014ccd6
Merge pull request #6247 from FRRouting/nb_conversions
Merge nb_converions branch to master
2020-04-16 19:39:14 -04:00
Chirag Shah
6fd8972aef *: include vrf northbound module in init
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:00:15 -07:00
David Lamparter
f4b8291fcb *: move CLI node names to cmd_node->name
And again for the name.  Why on earth would we centralize this, just so
people can forget to update it?

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-16 12:53:59 +02:00
David Lamparter
243895805a *: move CLI parent data to cmd_node->parent_node
Same as before, instead of shoving this into a big central list we can
just put the parent node in cmd_node.

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-16 12:53:00 +02:00
David Lamparter
612c2c15d8 *: remove second parameter on install_node()
There is really no reason to not put this in the cmd_node.

And while we're add it, rename from pointless ".func" to ".config_write".

[v2: fix forgotten ldpd config_write]

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-16 12:53:00 +02:00
David Lamparter
249a771b63 *: remove cmd_node->vtysh
The only nodes that have this as 0 don't have a "->func" anyway, so the
entire thing is really just pointless.

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-16 12:53:00 +02:00
David Lamparter
62b346eefa *: clean up cmd_node initializers
... and use named assignments everywhere (so I can change the struct.)

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-16 12:53:00 +02:00