Commit Graph

794 Commits

Author SHA1 Message Date
Yash Ranjan
e4bacbaac4 ospf6d: Json support added for command "show ipv6 ospf6 database [json]"
Modify code to add JSON format output in show command
"show ipv6 ospf6 database" with proper formating

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2021-01-13 00:06:28 -08:00
Yash Ranjan
de851bf2e3 ospf6d: Structural changes in ospf6d.c
Removes the code redundancy for the show ipv6 ospf6 database
command.

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2021-01-13 00:06:28 -08:00
Russ White
30ff2a502e
Merge pull request #7717 from ranjanyash54/2368
ospf6d: ospfv3 disable on the interface, but interface prefix still s…
2020-12-15 07:29:10 -05:00
Mobashshera Rasool
bb4c56616f ospf6d: Link LSA is not updated when router priority is modified
Issue: #7727

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2020-12-14 07:57:13 +00:00
Yash Ranjan
4a30f0568f ospf6d: ospfv3 disable on the interface, but interface prefix still shown in the output
When the ospfv3 interface is disabled by the command "no interface <eth> area <area-id>
the linked interface prefixes does not get flushed

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2020-12-13 05:50:57 -08:00
Yash Ranjan
08d8fa4587 ospf6d: Fix for "show ipv6 ospf6 database link"
Some prefixes were not shown in the link database
show command, due to issues with pointer calculation.

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2020-12-10 21:25:41 -08:00
Yash Ranjan
8044f7aa55 ospf6d: Fix for "show ipv6 ospf6 database intra-prefix"
Some prefixes were not shown in the intra-prefix database
show command, due to issues with pointer calculation.

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2020-12-10 21:25:41 -08:00
Rafael Zalamena
551e30a5ff
Merge pull request #7492 from Niral-Networks/niral_ospfv3_fix_redist
ospf6d : Code refactoring for route redistribution.
2020-12-10 09:01:12 -03:00
Kaushik
a069482f1f ospf6d : Code refactoring for route redistribution.
1. Created new ospf6_redist structure.
2. Moved the 'route_map' structure from structure 'ospf6' to
   structure 'ospf6_redist'.
3. Added new message type OSPF6_REDISTRIBUTE.
4. Added the placeholder for metric option in structure ospf6_redist
   for redistribute.
5. Added few API's for route redistribute lookup, add & del.

Signed-off-by: Kaushik <kaushik@niralnetworks.com>
2020-12-09 13:27:23 +05:30
Yash Ranjan
786b76d03a ospf6d: Router-ID filter is not filtering the show command "do show ipv6 ospf6 neighbour A.B.C.D"
Compare the neighbour id string from the arguments to the router_id of
the neighbor. If equal then call the show function.

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2020-12-04 04:15:30 -08:00
Igor Ryzhov
d313699058 ospf6: move serv_close to ospf6_delete
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-11-30 17:36:10 +03:00
Igor Ryzhov
1fa5858735 ospf6: fix crash on shutdown
The crash is sometimes reproduced by all_protocol_startup topotest.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-11-30 17:36:10 +03:00
Igor Ryzhov
f5f26b8fca ospf6: get instance from lsdb data
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-11-30 17:36:10 +03:00
Igor Ryzhov
e285b70d3c ospf6: get instance from route table scope
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-11-30 17:36:10 +03:00
Igor Ryzhov
360d6f517f ospf6: don't create instance at startup
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-11-20 01:48:11 +03:00
Donald Sharp
680b8ceb9e ospf6d: More lists being leaked
Apparently the person who wrote this code was big into
cut-n-paste.  Commit 710a61d57c
found the first instance, but upon code inspection this morning
it became evident that 2 other functions had the exact same
problem.

Fix.  Note I have not cleaned up the cut-n-paste code for
two reasons: a) I'm chasing something else b) this code
has been fairly un-maintained for a very long time.  No
need to start up now.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-11-19 08:04:51 -05:00
Donald Sharp
b84696e6c0
Merge pull request #7454 from ranjanyash54/dev_8
ospf6d: Json support added for command "show ipv6 ospf6 interface traffic [json]"
2020-11-18 18:37:30 -05:00
Donald Sharp
74c6aba12e
Merge pull request #7455 from ranjanyash54/dev_3
ospf6d: Json support added for command "show ipv6 ospf6 redistribute [json]"
2020-11-18 18:33:09 -05:00
Donald Sharp
c3f5f46868
Merge pull request #7296 from YashRanjanVMWare/dev_1
ospf6d: Json support added for command "show ipv6 ospf6 [json]"
2020-11-18 17:50:42 -05:00
Mark Stapp
abed797ef5
Merge pull request #7556 from donaldsharp/memory_shenanigans
Memory shenanigans
2020-11-18 17:31:03 -05:00
Mark Stapp
84c709bc6e
Merge pull request #7555 from idryzhov/cppcheck-fixes
fix a couple of issues found by cppcheck
2020-11-18 14:29:25 -05:00
Donald Sharp
710a61d57c ospf6d: Free up list memory
OSPFv3 snmp code creates a list but never deletes the actual
list.  Do so.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-11-18 11:42:50 -05:00
Igor Ryzhov
0db96688aa ospf6d: fix compilation of debug code
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-11-18 19:06:10 +03:00
Mark Stapp
926bc58f78
Merge pull request #7478 from donaldsharp/buffer
Buffer
2020-11-18 08:30:47 -05:00
Russ White
b1545a5c59
Merge pull request #7450 from ranjanyash54/dev_5
ospf6d: Json support added for command "show ipv6 ospf6 zebra [json]"
2020-11-17 07:55:10 -05:00
Russ White
4b5eb21a66
Merge pull request #7453 from ranjanyash54/dev_7
ospf6d: Json support added for command "show ipv6 ospf6 interface [json]"
2020-11-17 07:53:41 -05:00
github login name
f16ae8cf5d ospf6d: Json support added for command "show ipv6 ospf6 interface [json]"
Modify code to add JSON format output in show command
"show ipv6 ospf6 interface" with proper formating

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2020-11-16 21:18:39 -08:00
github login name
9ebb75c56b ospf6d: Json support added for command "show ipv6 ospf6 zebra [json]"
Modify code to add JSON format output in show command
"show ipv6 ospf6 zebra" with proper formating

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2020-11-16 19:44:06 -08:00
github login name
35a45deada ospf6d: Json support added for command "show ipv6 ospf6 [json]"
Modify code to add JSON format output in show command
"show ipv6 ospf6" with proper formating.

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2020-11-16 19:37:26 -08:00
github login name
ba30b37677 ospf6d: Json support added for command "show ipv6 ospf6 interface traffic [json]"
Modify code to add JSON format output in show command
"show ipv6 ospf6 interface traffic" with proper formating

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2020-11-15 21:16:10 -08:00
github login name
dd726234aa ospf6d: Json support added for command "show ipv6 ospf6 redistribute [json]"
Modify code to add JSON format output in show command
"show ipv6 ospf6 redistribute" with proper formating

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2020-11-15 21:11:30 -08:00
Donald Sharp
8a3f8f2e4a bgpd, lib, sharpd: Add enum for zclient_send_message return
Add a `enum zclient_send_status` for appropriate handling
of return codes from zclient_send_message.  Touch all the places
where we handle this.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-11-15 14:50:17 -05:00
Donald Sharp
1782514fb9 *: Remove route_map_object_t from the system
The route_map_object_t was being used to track what protocol we were
being called against.  But each protocol was only ever calling itself.
So we had a variable that was only ever being passed in from route_map_apply
that had to be carried against and everyone was testing if that variable
was for their own stack.

Clean up this route_map_object_t from the entire system.  We should
speed some stuff up.  Yes I know not a bunch but this will add up.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-11-13 19:35:20 -05:00
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