| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The adj_ok thread event is being added but not killed
when the underlying interface is deleted. I am seeing
this crash:
OSPF6: Received signal 11 at 1636142186 (si_addr 0x0, PC 0x561d7fc42285); aborting...
OSPF6: zlog_signal+0x18c 7f227e93519a 7ffdae024590 /lib/libfrr.so.0 (mapped at 0x7f227e884000)
OSPF6: core_handler+0xe3 7f227e97305e 7ffdae0246b0 /lib/libfrr.so.0 (mapped at 0x7f227e884000)
OSPF6: funlockfile+0x50 7f227e863140 7ffdae024800 /lib/x86_64-linux-gnu/libpthread.so.0 (mapped at 0x7f227e84f000)
OSPF6: ---- signal ----
OSPF6: need_adjacency+0x10 561d7fc42285 7ffdae024db0 /usr/lib/frr/ospf6d (mapped at 0x561d7fbc6000)
OSPF6: adj_ok+0x180 561d7fc42f0b 7ffdae024dc0 /usr/lib/frr/ospf6d (mapped at 0x561d7fbc6000)
OSPF6: thread_call+0xc2 7f227e989e32 7ffdae024e00 /lib/libfrr.so.0 (mapped at 0x7f227e884000)
OSPF6: frr_run+0x217 7f227e92a7f3 7ffdae024ec0 /lib/libfrr.so.0 (mapped at 0x7f227e884000)
OSPF6: main+0xf3 561d7fc0f573 7ffdae024fd0 /usr/lib/frr/ospf6d (mapped at 0x561d7fbc6000)
OSPF6: __libc_start_main+0xea 7f227e6b0d0a 7ffdae025010 /lib/x86_64-linux-gnu/libc.so.6 (mapped at 0x7f227e68a000)
OSPF6: _start+0x2a 561d7fc0f06a 7ffdae0250e0 /usr/lib/frr/ospf6d (mapped at 0x561d7fbc6000)
OSPF6: in thread adj_ok scheduled from ospf6d/ospf6_interface.c:678 dr_election()
The crash is in the on->ospf6_if pointer is NULL. The only way this could
happen from what I can tell is that the event is added to the system
and then we immediately delete the interface, removing the memory
but not freeing up the adj_ok thread event.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I am seeing a crash of ospf6d with this stack trace:
OSPF6: Received signal 11 at 1636042827 (si_addr 0x0, PC 0x55efc2d09ec2); aborting...
OSPF6: zlog_signal+0x18c 7fe20c8ca19a 7ffd08035590 /lib/libfrr.so.0 (mapped at 0x7fe20c819000)
OSPF6: core_handler+0xe3 7fe20c90805e 7ffd080356b0 /lib/libfrr.so.0 (mapped at 0x7fe20c819000)
OSPF6: funlockfile+0x50 7fe20c7f8140 7ffd08035800 /lib/x86_64-linux-gnu/libpthread.so.0 (mapped at 0x7fe20c7e4000)
OSPF6: ---- signal ----
OSPF6: ospf6_neighbor_state_change+0xdc 55efc2d09ec2 7ffd08035d90 /usr/lib/frr/ospf6d (mapped at 0x55efc2c8e000)
OSPF6: exchange_done+0x15c 55efc2d0ab4a 7ffd08035dc0 /usr/lib/frr/ospf6d (mapped at 0x55efc2c8e000)
OSPF6: thread_call+0xc2 7fe20c91ee32 7ffd08035df0 /lib/libfrr.so.0 (mapped at 0x7fe20c819000)
OSPF6: frr_run+0x217 7fe20c8bf7f3 7ffd08035eb0 /lib/libfrr.so.0 (mapped at 0x7fe20c819000)
OSPF6: main+0xf3 55efc2cd7573 7ffd08035fc0 /usr/lib/frr/ospf6d (mapped at 0x55efc2c8e000)
OSPF6: __libc_start_main+0xea 7fe20c645d0a 7ffd08036000 /lib/x86_64-linux-gnu/libc.so.6 (mapped at 0x7fe20c61f000)
OSPF6: _start+0x2a 55efc2cd706a 7ffd080360d0 /usr/lib/frr/ospf6d (mapped at 0x55efc2c8e000)
OSPF6: in thread exchange_done scheduled from ospf6d/ospf6_message.c:2264 ospf6_dbdesc_send_newone()
The stack trace when decoded is:
(gdb) l *(ospf6_neighbor_state_change+0xdc)
0x7bec2 is in ospf6_neighbor_state_change (ospf6d/ospf6_neighbor.c:200).
warning: Source file is more recent than executable.
195 on->name, ospf6_neighbor_state_str[prev_state],
196 ospf6_neighbor_state_str[next_state],
197 ospf6_neighbor_event_string(event));
198 }
199
200 /* Optionally notify about adjacency changes */
201 if (CHECK_FLAG(on->ospf6_if->area->ospf6->config_flags,
202 OSPF6_LOG_ADJACENCY_CHANGES)
203 && (CHECK_FLAG(on->ospf6_if->area->ospf6->config_flags,
204 OSPF6_LOG_ADJACENCY_DETAIL)
OSPFv3 is creating the event without a managing thread and as such
if the event is not run before a deletion event comes in memory
will be freed up and we'll start trying to access memory we should
not. Modify ospfv3 to track the thread and appropriately stop
it when the memory is deleted or it is no longer need to run
that bit of code.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
|\
| |
| | |
*: fix usage of if_lookup_by_index_all_vrf
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
if_lookup_by_index_all_vrf doesn't work correctly with netns VRF backend
as the same index may be used in multiple netns simultaneously.
We always know the OSPF6 instance we work with, so use its VRF id for
the interface lookup.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
in show: 'show ipv6 ospf6' handler command, the reason of SPF
executation is looked up and displayed. At startup, SPF has been
started, but shows no specific reason. Instead of dumping non
initialised string context, reset the string context.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
|
|\ \
| | |
| | | |
lib: Add autocomplete for prefix-list under route-maps
|
| | |
| | |
| | |
| | | |
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
|\ \ \
| |/ /
|/| | |
ospf6d: minor code enhancements.
|
| | |
| | |
| | |
| | | |
Signed-off-by: Manoj Naragund <mnaragund@vmware.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Description:
Code changes involve replacing memcmp with prefix_same,
for comparing prefix structures.
Signed-off-by: Manoj Naragund <mnaragund@vmware.com>
|
| |/
| |
| |
| |
| |
| |
| |
| | |
Description:
code changes involve removal of increment and decrement operators
during function calls. These expressions make code less readable.
Signed-off-by: Manoj Naragund <mnaragund@vmware.com>
|
|\ \
| | |
| | | |
*: fix usage of if_lookup_by_name_all_vrf
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
if_lookup_by_name_all_vrf doesn't work correctly with netns VRF backend
as the same index may be used in multiple netns simultaneously.
Use the appropriate VRF when looking for the interface.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This removes a giant `switch { }` block from lib/zclient.c and
harmonizes all zclient callback function types to be the same (some had
a subset of the args, some had a void return, now they all have
ZAPI_CALLBACK_ARGS and int return.)
Apart from getting rid of the giant switch, this is a minor security
benefit since the function pointers are now in a `const` array, so they
can't be overwritten by e.g. heap overflows for code execution anymore.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|\ \
| | |
| | | |
ospf6d: 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 X:X::X:X/M [<not-advertise|cost (0-16777215)>]
Example:
router ospf6
ospf6 router-id 1.1.1.1
area 1 nssa
area 1 nssa range 2001:db8:1000::/64
area 1 nssa range 2001:db8:2000::/64
!
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Type-7 LSAs and their corresponding Type-5 LSAs don't share the same
LS IDs (unlike in the case of OSPFv2). As such, do not attempt to find
a translated Type-5 LSA using the LS ID of a Type-7 LSA. Instead,
use the LS-ID stored in the OSPF routing table.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commits consists of several changes that positively impact
code reability without introducing any logical change.
Summary of the changes:
* Return earlier in ospf6_abr_range_update() in order to reduce one
level of indentation;
* Remove ospf6_translated_nssa_originate() since it's nothing other
than a useless wrapper around ospf6_lsa_translated_nssa_new();
* Change ospf6_abr_translate_nssa() to return void;
* Change ospf6_abr_process_nssa_translates() checking for NSSA areas
before anything else;
* Remove ospf6_abr_remove_unapproved_translates_apply() since it's a
small function that is only called in one place;
* Change ospf6_abr_check_translate_nssa() to avoid an LSDB lookup when
the router isn't an ABR.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In addition to being unnecessary, this check is problematic for the
upcoming NSSA ranges feature since NSSA ranges aren't added to the
OSPF routing table. Remove this for simplicity.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Stop leaking 4096 bytes for each translated LSA.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This code tries to summarize NSSA Type-7 LSAs using normal ranges
which are intended to summarize Type-3 LSAs only. This is not only
wrong, but the code is incomplete and lacking lots of things. Better
to remove it before implementing NSSA ranges correctly.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The iteration performed on ospf6_abr_unapprove_translates() was
wrong since AS-external LSAs are stored in the global LSDB and not
in the area LSDBs. As such, the "unapproved" flag wasn't being set
in any translated AS-external LSA, leading them to linger forever.
Fix the LSDB iteration and make the required changes to unset the
"unapproved" flag for AS-external LSAs that shouldn't be removed.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The ABR task already takes care of refreshing translated Type-5
LSAs that correspond to self-originated Type-7 LSAs. There's no
need to do that in ospf_external_lsa_install() as well. The ospfd
NSSA code takes the same precaution.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Change ospf6_get_nssa_fwd_addr() to try finding a global address
on any interface of the area and not on the first one only.
Additionally, do a micro-optimization in
ospf6_interface_get_global_address() to return as soon as a global
address is found.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Every received or originated LSA is automatically scheduled to be
refreshed periodically, there's no need to do that manually here.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| | |
| | |
| | |
| | |
| | |
| | | |
This is the only ospf6d memtype that wasn't being declared as static.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This debug message is of little use so remove it instead of adding
a debug guard for it.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It allows FRR to read the interface config even when the necessary VRFs
are not yet created and interfaces are in "wrong" VRFs. Currently, such
config is rejected.
For VRF-lite backend, we don't care at all about the VRF of the inactive
interface. When the interface is created in the OS and becomes active,
we always use its actual VRF instead of the configured one. So there's
no need to reject the config.
For netns backend, we may have multiple interfaces with the same name in
different VRFs. So we care about the VRF of inactive interfaces. And we
must allow to preconfigure the interface in a VRF even before it is
moved to the corresponding netns. From now on, we allow to create
multiple configs for the same interface name in different VRFs and
the necessary config is applied once the OS interface is moved to the
corresponding netns.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
|
|\ \ \
| | | |
| | | | |
ospfd: more GR fixes
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| |_|/
|/| |
| | |
| | |
| | |
| | | |
ospf6_route_create already sets route->ospf6.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
OSPFv3 recently introduced the usage of import route. Switch it
back to using the normal ZEBRA_NEXTHOP_REGISTER command.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
| | | |
|
|\ \ \
| | | |
| | | | |
More struct thread null
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
FRR should only ever use the appropriate THREAD_ON/THREAD_OFF
semantics. This is espacially true for the functions we
end up calling the thread for.
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
|/ / /
| | |
| | |
| | |
| | |
| | | |
Currently, it's not possible to run this command in any VRF other than default.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
|
|\ \ \
| | | |
| | | | |
ospf6: add the ability of specifying router-id/area-id in no debug ospf6
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Add the ability to specify the router-id/area-id when deleting the debug
ospf6 configuration.
The new commands are as follow:
no debug ospf6 border-routers router-id [A.B.C.D]
no debug ospf6 border-routers area-id [A.B.C.D]
Update the doc as well.
Signed-off-by: Ahmad Caracalli <ahmad.caracalli@6wind.com>
|
|\ \ \ \
| | | | |
| | | | | |
ospf6d: minor struct compare issues.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
removal of some of the deadcode in ospf6d.
Signed-off-by: Manoj Naragund <mnaragund@vmware.com>
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem Statement:
Multiple struct compare using memcmp, which might result in issue due to
structure padding/alignment.
Fix:
The code changes involve structure member by member comparison to
remove any issues related to padding/alignment.
Signed-off-by: Manoj Naragund <mnaragund@vmware.com>
(cherry picked from commit 67db821a1d6d68b19862d50b68ed19278c5f2422)
|
|\ \ \ \
| |_|_|/
|/| | | |
ospf6d: ospf6d is crashing upon receiving duplicated Grace LSA.
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Description:
When grace lsa received, DUT is adding
the copy of the lsas to all nbrs retransmission list as part of
flooding procedure and subsequently incrementing the rmt counter in
the original the LSA. This counter is supposed to be decremented
when ack is received by nbr and the lsa will be removed from retransmission list.
But in our current scenario,
Step-1:
When GR helper is disabled, if DUT receives the grace lsa
it adds the lsa copy to nbrs retransmission list but original
LSA will be discarded since GR helper disabled.
Step-2:
GR helper enabled and DUT receives the grace lsa, as part
of flooding process all nbrs have same copy of lsa in their
corresponding rmt list which was added in step -1 due to this
the corresponding rmt counter in the original lsa is not getting
incremented.
Step-3:
If the same copy of the grace lsa received by DUT, It considers
as implicit ack from nbr if the same copy of the lsa exits in its
rmt list and subsequently decrement the rmt counter.
Since counter is zero (because of step-1 and 2) , it is asserting while decrement.
Signed-off-by: Rajesh Girada <rgirada@vmware.com>
|
|\ \ \
| |_|/
|/| | |
cleanup: struct thread = NULL
|
| |/
| |
| |
| |
| |
| |
| |
| | |
FRR should only ever use the appropriate THREAD_ON/THREAD_OFF
semantics. This is espacially true for the functions we
end up calling the thread for.
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|