| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
We should probably prevent any type of namespace collision
with something else.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This is a first in a series of commits, whose goal is to rename
the thread system in FRR to an event system. There is a continual
problem where people are confusing `struct thread` with a true
pthread. In reality, our entire thread.c is an event system.
In this commit rename the thread.[ch] files to event.[ch].
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
|
|
|
|
|
|
|
|
|
| |
An ABR that is originating inter-area-prefix-LSAs should take into
account the fact that there might be self-originated LSAs for the
same prefixes that were originated prior to a graceful restart. When
that happens, the previous LSA-IDs should be reused to avoid having
duplicate LSAs.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RFC 5340, Section 4.8.3 says:
"Prefixes having the NU-bit set in their PrefixOptions field should
be ignored by the inter-area route calculation".
Fix a bug where, in addition to the NU-bit, ospf6d was also ignoring
prefixes having the LA-bit set when computing inter-area routes. In
practice, this fixes interoperability issues with vendors that set
the LA-bit in loopback prefixes (among other cases).
While here, fix a copy-and-paste error where a log message wasn't
showing accurate information about what happened.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
|
|
|
|
| |
Done with a combination of regex'ing and banging my head against a wall.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
|
|
|
|
|
|
| |
The ospf6_route_cmp_nexthops function was returning 0 for same
and 1 for not same. Let's reverse the polarity and actually make
the returns useful long term.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix issue #11839.
When the user defines a range in an area other than the backbone area, the
summary route will be announced to the backbone area as an inter-area LSA.
However, if the prefix defined in the range is the same prefix as a connected
route in that area, the LSA won't be announced to the backbone area.
This is because when ospf6d is originating the summary route for the
intra-area route, it finds the range configured by the user and tries to
suppress the route by deleting the existing summary route, which happens to be
the one created by the range.
Although the range definition is not necessary in this case, it should not
fail this use case. So let's just keep the summary route there if it is
created from the user defined range.
Signed-off-by: Xiaodong Xu <stid.smth@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #9720. When updating an ECMP inter-area route, we compute
a new route and check whether that already exists. If so, we keep the old
route and only update its nexthops. Previously, we merged the new route's
nexthops into the old one's, but this way, it's impossible to remove
nexthops from the old route, resulting in stale nexthops.
This commit fixes this by first removing all nexthops from the old route and
then copying all nexthops from the new route into it. If the new route has
fewer nexthops, the old one will have as well afterwards.
Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
|
|
|
|
| |
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
|
|
|
|
|
|
| |
Add assert to protect it.
Signed-off-by: anlan_cs <anlan_cs@tom.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In a topology like:
r1(ASBR) ---- 0.0.0.0 ---- r2(ABR) ---- 1.1.1.1 -----r3
where r1 is redistributing statics and area 1.1.1.1 is NSSA, the ABR r2 should
not originate type-4 LSA into the NSSA area. From RFC 3101: "NSSA border routers
should not originate Type-4 summary-LSAs into their NSSAs."
This PR prevents the above LSA of being originated by the ABR r2
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In a topology like:
r1 ---- 0.0.0.0 ---- r2(ABR) ---- 1.1.1.1 -----r3(ASBR)
where r3 is redistributing statics and area 1.1.1.1 is NSSA, the ABR r2 should
not originate type-4 LSA, according to RFC 3101, section 1.3:
"also an NSSA's border routers never originate Type-4 summary-LSAs for the
NSSA's AS boundary routers, since Type-7 AS-external-LSAs are never flooded
beyond the NSSA's border"
r1# sh ipv6 os database inter-router
Area Scoped Link State Database (Area 0.0.0.0)
Type LSId AdvRouter Age SeqNum Payload
IAR 3.3.3.3 2.2.2.2 49 80000001 3.3.3.3
This PR prevents the above LSA of being originated by the ABR r2
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
|
|\
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| | |
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| |
| |
| |
| |
| |
| | |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue #9535 describes how the export-list/import-list commands work
differently on ospfd and ospf6d.
In short:
* On ospfd, "area A.B.C.D export-list" filters which internal
routes an ABR exports to other areas. On ospf6d, instead, that
command filters which inter-area routes an ABR exports to the
configured area (which is quite counter-intuitive). In other words,
both commands do the same but in opposite directions.
* On ospfd, "area A.B.C.D import-list" filters which inter-area
routes an ABR imports into the configured area. On ospf6d, that
command filters which inter-area routes an interior router accepts.
* On both daemons, "area A.B.C.D filter-list prefix NAME <in|out>"
works exactly the same as import/export lists, but using prefix-lists
instead of ACLs.
The inconsistency on how those commands work is undesirable. This
PR proposes to adapt the ospf6d commands to behave like they do
in ospfd.
These changes are obviously backward incompatible and this PR doesn't
propose any mitigation strategy other than warning users about the
changes in the next release notes. Since these ospf6d commands are
undocumented and work in such a peculiar way, it's unlikely many
users will be affected (if any at all).
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|\
| |
| | |
ospf6d: break early on route prefix mismatch
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The route linked list in ospf6d is ordered in prefix batches which
are associated with a the route node denoting the prefix. So if
you look up the prefix in the tree and start walking the list, if you
find a prefix which differs from the one you are interested in then
you have gone beyond the batch of routes for that prefix.
In some cases the route database linked list is used on a per-prefix
basis. The existing code simply does a continue when the prefix does
not match and continues to walk. This works with small numbers of
routes because the walk continues through unrelated prefix batches and
never finds anything to operate on. However if we have many thousands
of routes these walks become expensive and can cause the SPF thread
(amongst others) to run very long, causing issues with adjacencies
where the dead timer is short.
Add a break to these prefix-based loops to exit early if we get a
prefix mismatch to avoid continuing down the route list if we have
overshot.
Signed-off-by: Pat Ruddy <pat@voltanet.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a knob to turn a NSSA area into a totally stub area. In this
configuration a Type-3 default summary route is generated by default.
Syntax: `area A.B.C.D nssa no-summary`.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The prefix of routes to border routers consists of two pieces of
information embedded in a single struct (prefix.u.lp):
struct prefix {
uint8_t family;
uint16_t prefixlen;
union {
[snip]
struct {
struct in_addr id;
struct in_addr adv_router;
} lp;
} u __attribute__((aligned(8)));
};
As such, using prefix2str() (or the %pFX format specifier) isn't
correct when logging such routes.
This commit adds a few special cases here and there to handle
OSPF6_DEST_TYPE_ROUTER routes differently. It'd probably be a good
idea to add a helper function to handle all cases in a single place,
but that can be left for a second moment.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|\ \
| | |
| | | |
Ospfv3 ASBR summarisation feature
|
| | |
| | |
| | |
| | |
| | |
| | | |
Storing the pointer to ospf6 struct in route struct.
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
|
|\ \ \
| |/ /
|/| | |
ospf6d: small batch of random fixes/improvements
|
| |/
| |
| |
| |
| |
| |
| | |
Prefix options are per-prefix, not per-path. As evident by the fact
that the field is never used on ECMP paths. Move it where it belongs.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In RFC 2328 OSPF Version 2, Section 12.4.3.1 "Originating summary-LSAs
into stub areas" mentions that the stub areas should not import external
routes and instead should generate a 'default summary-LSA' set to
default destination.
> In a stub area, instead of importing external routes
> each area border router originates a "default summary-
> LSA" into the area. The Link State ID for the default
> summary-LSA is set to DefaultDestination, and the metric
> set to the (per-area) configurable parameter
> StubDefaultCost. Note that StubDefaultCost need not be
> configured identically in all of the stub area's area
> border routers.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ospf6_is_router_abr is checking to see if ospfv3 is an abr router
and also setting values. Let's rename it too `ospf6_check_and_set_router_abr`
to more accurately reflect what it is doing.
Additionally fix coverity #1505176 where we were not checking the return
value of ospf6_is_router_abr like we did every other time. In this
case we don't care about the return value so indicate that we do not.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following is implemented.
1. Configuring area as NSSA.
2. Generating Type 7 LSA.
3. Conversion of Type 7 to Type 5 ( Default Behavior).
4. NSSA ABR selection.
Reviewed-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Co-authored-by: Kaushik <kaushiknath.null@gmail.com>
Co-authored-by: Soman K.S <somanks@gmail.com>
Signed-off-by: Kaushik <kaushiknath.null@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Ensure that if allocated route is not added to a table then it is
deleted to avoid leaking memory.
Add a new memory type for route table so that ospf6 routes can be
distinguished in the show memory output in isolation.
Signed-off-by: Pat Ruddy <pat@voltanet.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When an "export-filter" or "filter-list out" was configured on an area the
filter was not applied to existing database. The user would either have
to restart the neighboring router in the other area or issue a "clear ipv6
ospf6 interface" to cause the neighbor router to resend it's LSAs. The
new filter would then be applied to these LSAs and permit or deny summary
LSAs from being added/removed from the database. The code now applies the
filters to the existing database without user needing to take any action
to clear ospfv3 adjacencies.
The second part of the problem was if a rule changed the updated filter was
not applied. The code has been modifed to now process the rule update and
reapply the filter.
Signed-off-by: Lynne Morrison <lynne@voltanet.io>
|
|\
| |
| | |
ospf6d: Default Route functionality
|
| |
| |
| |
| | |
Signed-off-by: Yash Ranjan <ranjany@vmware.com>
|
| |
| |
| |
| | |
Signed-off-by: Yash Ranjan <ranjany@vmware.com>
|
|/
|
|
|
|
| |
Fixes a regression in test case: anvl-ospfv3-16.14.
Signed-off-by: Karen Schoener <karen@voltanet.io>
|
|\
| |
| | |
*: 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>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
|
|\
| |
| | |
* : 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>
|
|\ \
| |/
|/| |
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>
|
|/
|
|
| |
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
coccinelle gets stuck in a few locations in ospf6d...
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Processing loop uncovered when there are multiple ABRs also
acting as ASBRs into the same area in ospf6. The problem
was that when looking thru the list of Inter-area router
entries, if the current entry being processed matched, it
still merged next-hops and re-initiated the process. In
this fix, if the route/path matches and the next-hops also
match, there is no need to re-initiate the examine process.
Ticket: CM-28900
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
|