| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
See previous commit.
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Some mistakes have crept in again.
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
|
|
| |
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
|\
| |
| | |
ospf6d: fix LSA 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>
|
| |
| |
| |
| | |
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
|
|\ \
| | |
| | | |
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>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\ \
| | |
| | | |
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>
|
|\ \
| |/
|/| |
*: remove more sprintf()
|
| |
| |
| |
| |
| |
| |
| | |
Should be just a couple non-development, non-test occurrences of this
function left now.
Signed-off-by: Quentin Young <qlyoung@qlyoung.net>
|
|\ \
| | |
| | | |
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>
|
|/ /
| |
| |
| | |
Signed-off-by: Yash Ranjan <ranjany@vmware.com>
|
|\ \
| | |
| | | |
ospf6d: Don't send hellos on loopback interface
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When ospf6 passive is turned off on a loopback interface don't start
sending ospf6 hellos.
Signed-off-by: Lynne Morrison <lynne@voltanet.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Issue: When a path in the inter area ecmp route is deleted, the route is removed
Fix: The fix is to remove the specific path from the inter area route using
ospf6_abr_old_route_remove() when abr route entry is not found.
In the function ospf6_abr_old_route_remove() the path to be removed needs
to match adv router and link state ID
Fixed memory leak in ospf6_intra_prefix_update_route_origin() caused by
route node lock not getting released.
Signed-off-by: kssoman <somanks@gmail.com>
|
|\ \ \
| |_|/
|/| | |
Fix ospf6 LSA formatting out-of-bounds access
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Check whether full struct ospf6_router_lsdesc/ospf6_prefix is accessible
before accessing its contents. Previously, we only checked for the first
byte in ospf6_router_lsa_get_nbr_id() or not even that (due to an additional
off-by-one error) in ospf6_link_lsa_get_prefix_str() and
ospf6_intra_prefix_lsa_get_prefix_str().
Also check *before* accessing the first prefix instead of starting the
checks only at the 2nd prefix.
The previous code could cause out-of-bounds accesses with valid LSAs in case
of ospf6_link_lsa_get_prefix_str() and
ospf6_intra_prefix_lsa_get_prefix_str() and with specially crafted LSAs
(bad length field) in case of ospf6_router_lsa_get_nbr_id().
Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
|
|\ \ \
| | | |
| | | | |
ospf6d: Fix LSA formatting inconsistent retvals
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Make return values for lh_get_prefix_str LSA handlers consistent, i.e.
return NULL in case of error without having written to the passed buffer
and non-NULL (address of buffer) if a string was written to the buffer.
Previously, it was possible in certain cases (bogus LSAs) to not initialize
(and 0-terminate) the buffer but still return non-NULL, causing the caller
to print random junk.
Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
|
|\ \ \
| | | |
| | | | |
ospf6d: add CLI to control maximum paths for routes.
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
CLI added:
maximum-paths (1-64)
Issue: #7961
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
|
|\ \ \
| | | |
| | | | |
Valgrind cleanups
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Valgrind reports:
2437395-==2437395== Invalid read of size 8
2437395:==2437395== at 0x40B610: ospf6_asbr_update_route_ecmp_path (ospf6_asbr.c:327)
2437395-==2437395== by 0x40BC7C: ospf6_asbr_lsa_add (ospf6_asbr.c:544)
2437395-==2437395== by 0x40C5DF: ospf6_asbr_lsentry_add (ospf6_asbr.c:829)
2437395-==2437395== by 0x42D88D: ospf6_top_brouter_hook_add (ospf6_top.c:185)
2437395-==2437395== by 0x4188E3: ospf6_intra_brouter_calculation (ospf6_intra.c:2320)
2437395-==2437395== by 0x42C624: ospf6_spf_calculation_thread (ospf6_spf.c:638)
2437395-==2437395== by 0x4904B7E: thread_call (thread.c:1681)
2437395-==2437395== by 0x48CAA27: frr_run (libfrr.c:1126)
2437395-==2437395== by 0x40AF43: main (ospf6_main.c:232)
2437395-==2437395== Address 0x5c668a8 is 24 bytes inside a block of size 256 free'd
2437395:==2437395== at 0x48399AB: free (vg_replace_malloc.c:538)
2437395-==2437395== by 0x429027: ospf6_route_delete (ospf6_route.c:419)
2437395-==2437395== by 0x429027: ospf6_route_unlock (ospf6_route.c:460)
2437395-==2437395== by 0x429027: ospf6_route_remove (ospf6_route.c:887)
2437395-==2437395== by 0x40B343: ospf6_asbr_update_route_ecmp_path (ospf6_asbr.c:318)
2437395-==2437395== by 0x40BC7C: ospf6_asbr_lsa_add (ospf6_asbr.c:544)
2437395-==2437395== by 0x40C5DF: ospf6_asbr_lsentry_add (ospf6_asbr.c:829)
2437395-==2437395== by 0x42D88D: ospf6_top_brouter_hook_add (ospf6_top.c:185)
2437395-==2437395== by 0x4188E3: ospf6_intra_brouter_calculation (ospf6_intra.c:2320)
2437395-==2437395== by 0x42C624: ospf6_spf_calculation_thread (ospf6_spf.c:638)
2437395-==2437395== by 0x4904B7E: thread_call (thread.c:1681)
2437395-==2437395== by 0x48CAA27: frr_run (libfrr.c:1126)
2437395-==2437395== by 0x40AF43: main (ospf6_main.c:232)
2437395-==2437395== Block was alloc'd at
2437395:==2437395== at 0x483AB65: calloc (vg_replace_malloc.c:760)
2437395-==2437395== by 0x48D2A32: qcalloc (memory.c:115)
2437395-==2437395== by 0x427CE4: ospf6_route_create (ospf6_route.c:402)
2437395-==2437395== by 0x40BA8A: ospf6_asbr_lsa_add (ospf6_asbr.c:490)
2437395-==2437395== by 0x40C5DF: ospf6_asbr_lsentry_add (ospf6_asbr.c:829)
2437395-==2437395== by 0x42D88D: ospf6_top_brouter_hook_add (ospf6_top.c:185)
2437395-==2437395== by 0x4188E3: ospf6_intra_brouter_calculation (ospf6_intra.c:2320)
2437395-==2437395== by 0x42C624: ospf6_spf_calculation_thread (ospf6_spf.c:638)
2437395-==2437395== by 0x4904B7E: thread_call (thread.c:1681)
2437395-==2437395== by 0x48CAA27: frr_run (libfrr.c:1126)
2437395-==2437395== by 0x40AF43: main (ospf6_main.c:232)
ospfv3 loops through the ecmp routes to decide what to clean up. In some
situations the code free's up an existing route at the head of the list.
Cleaning the pointers in the list but never touching the original pointer.
In that case notice and update the old pointer.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
|\ \ \
| |/ /
|/| | |
ospf6d: Json support added for command "show ipv6 ospf6 route [json]"
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Modify code to add JSON format output in show command
"show ipv6 ospf6 interface prefix" with proper formating
Signed-off-by: Yash Ranjan <ranjany@vmware.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Modify code to add JSON format output in show command
"show ipv6 ospf6 route [<intra-area|inter-area|external-1|
external-2|X:X::X:X|X:X::X:X/M|detail|summary>]"
with proper formating
Signed-off-by: Yash Ranjan <ranjany@vmware.com>
|
|/ /
| |
| |
| |
| |
| |
| | |
The earliest that some of this code is 2018. There is not
much point in keeping this code around.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When removing ospfv3 from an interface that has been previously
put into wait state, there is a possible use after free of the
oi because the wait_timer could have been started for the interface.
This is because the wait_timer was not tracked by the interface
and we just created a thread for it without storing the thread
pointer.
Issue: #7932
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
When redistributing multiple route types into ospfv3
the code must create a new array per route type into
the the json code.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
|
| |
Removes the code redundancy for the show ipv6 ospf6 database
command.
Signed-off-by: Yash Ranjan <ranjany@vmware.com>
|
|\
| |
| | |
ospf6d: ospfv3 disable on the interface, but interface prefix still s…
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
| |
Issue: #7727
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| | |
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
|