Commit Graph

1547 Commits

Author SHA1 Message Date
Donald Sharp
2c6592c140
Merge pull request #7309 from mjstapp/fix_ospf_gr_reasons
ospfd: make GR reason string production safer
2020-10-14 19:19:39 -04:00
Mark Stapp
d81937481d ospfd: fix SA warnings in ospfd, ospfclient
Fix some SA warnings in ospf GR and ospfclient code.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-10-14 13:41:00 -04:00
Mark Stapp
d05d5280e6 ospfd: make reason string production safer
Use to-string functions for GR message codes instead of raw
string array indexing; the values used can come in packets
and are not validated.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-10-14 12:51:52 -04:00
Donatas Abraitis
9ed5b22e13
Merge pull request #7283 from donaldsharp/thread_off_semantics
*: Use proper semantics for turning off thread
2020-10-14 14:50:08 +03:00
Jafar Al-Gharaibeh
5875867dba
Merge pull request #7295 from donaldsharp/ospf_crash
ospfd: Prevent crash if transferring config amongst instances
2020-10-13 13:27:55 -05:00
Donald Sharp
aadbfa4918
Merge pull request #7294 from idryzhov/fix-no-ip-ospf-area
ospfd: fix "no ip ospf area"
2020-10-13 13:37:03 -04:00
Donald Sharp
2b0a32da60 ospfd: Prevent crash if transferring config amongst instances
If we enter:

int eth0
  ip ospf area 0
  ip ospf 10 area 0
!

This will crash ospf.  Prevent this from happening.

OSPF instances:

a) Cannot be mixed with non-instance
b) Are their own process.

Since in multi-instance world ospf instances are their own process,
when an ospf processes receives an instance command we must remove
our config( if present ) and allow the new config to be active
in the new process.  The problem here is that if you have not
done a `router ospf` above the lookup of the ospf pointer will
fail and we will just crash.  Put some code in to prevent a crash
in this case.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-10-13 08:16:15 -04:00
Igor Ryzhov
e4129293c7 ospfd: fix "no ip ospf area"
This commit fixes the following behavior:
```
nfware(config)# interface enp2s0
nfware(config-if)# ip ospf area 0
nfware(config-if)# no ip ospf area 0
% [ospfd]: command ignored as it targets an instance that is not running
```

We should be able to use the command without configuring the instance.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-10-13 14:52:38 +03:00
Patrick Ruddy
d2a516dc7a
Merge pull request #7279 from donaldsharp/17_coverity
17 coverity
2020-10-13 11:48:37 +01:00
Russ White
7fabf208b0
Merge pull request #6811 from rgirada/test_helper
ospfd: ospfv2 graceful restart helper support.
2020-10-12 10:16:27 -04:00
Donald Sharp
28ef0ee121 *: Use proper semantics for turning off thread
We have this pattern in the code base:

if (thread)
	THREAD_OFF(thread);

If we look at THREAD_OFF we check to see if thread
is non-null too.  So we have a double check.
This is unnecessary.  Convert to just using THREAD_OFF

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-10-12 08:35:18 -04:00
Donald Sharp
8ced966f39 ospfd: When failing to set socket options just note the failure
Instead of closing the socket, just note the failure and
continue on.  If we actually failed here so many other
things would not be working at all, that actually
closing the fd won't matter.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-10-11 12:56:02 -04:00
ckishimo
96fad84aa0 ospfd: fix typos
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2020-10-07 01:53:13 -07:00
Donald Sharp
7302f333e5
Merge pull request #7228 from idryzhov/vtysh-dynamic-daemons
vtysh: dynamically generate the list of daemons for commands
2020-10-02 18:07:31 -04:00
Igor Ryzhov
31011d9cbe isisd, ospfd: fix missing/excessive docstrings
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-10-02 18:51:12 +03:00
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
Donald Sharp
e2dcd0c2c5
Merge pull request #7132 from volta-networks/fix_ldp_sync_cmds
Fix ldp sync cmds
2020-09-22 14:20:21 -04:00
Russ White
b4b7ca8944
Merge pull request #7122 from ckishimo/type4
ospfd: do not generate type 4 LSA from NSSA ABR
2020-09-22 11:30:06 -04:00
rgirada
caa1cd9eab ospfd: Debug support to ospf GR helper functionality
Description:
	Added the following debug commands to enable debugs
	GR helper functionality.
	[no] debug ospf gr helper

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2020-09-22 03:07:31 -07:00
rgirada
abd5b8c72c ospfd: GR helper specific show commands
Description:
	The following  show commands are added to display helper specific
	information.
	1.show ip ospf graceful-restart helper [detail] [json]
		--> displays user configurations and list of all helpers details.

	2.show ip ospf neighbour detail
		--> diplays helper details

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2020-09-22 00:02:37 -07:00
rgirada
07b33add1d ospfd: GR helper config commands
Description:
	The following commands are added for helper support.
	1.[no] graceful-restart helper-only
	2.[no] graceful-restart helper-only <A.B.C.D>
	3.[no] graceful-restart helper lsa-check-disable
	4.[no] graceful-restart helper supported-grace-time
	5.[no] graceful-restart helper planned-only

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2020-09-22 00:02:37 -07:00
rgirada
df074ec33a ospfd: GR helper exit scenarios
Description:
	The follwoing helper exit scenarios are handled.
	1. Recv Max age grace LSA from RESTARTER.
	2. Grace timer expiry.
	3. Due to topo change if lsa check is enabled.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2020-09-22 00:02:37 -07:00
rgirada
5a77dd8feb ospfd: GR Helper functionality changes
Description:
	1. Skipping inactivity timer during  graceful restart to make
	   the RESTARTER active even after dead timer expiry.
	2. Handling HELPER on unplanned outages.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2020-09-22 00:02:37 -07:00
rgirada
ad68699217 ospfd: Grace LSA processing
Description:
	1. Grace LSA processing.
	2. Validations to become a Helper. rfc3623 section 3.1

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2020-09-22 00:02:37 -07:00
rgirada
06bc3110d3 ospfd: ospf GR helper initialization
Description:
	1. Graceful restart helper init/de-init.
	2. Defining dedicated memory for helper.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2020-09-22 00:02:33 -07:00
rgirada
f96f271366 ospfd: ospf GR helper data structure definitions.
Description:
	Graceful restart helper support specific data structure
	changes.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2020-09-21 23:59:59 -07:00
lynne
9919bec70a ospfd: updates to the ldp-sync ospf commands
Improve the output of the show ip ospf mpls ldp-sync command.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
2020-09-21 12:07:13 -04:00
Donald Sharp
68f383438d
Merge pull request #7133 from Niral-Networks/niral_fix_ospf_timer
ospfd : Fix for ospf dead interval and hello due.
2020-09-19 08:18:46 -04:00
Kaushik
182d6bdc16 ospfd : Fix for ospf dead interval and hello due.
1. Ospf dead-interval will be set as 4 times of hello-interval, incase
if it is not set by using "ip ospf dead-interval <dead-val>".
2. On resetting hello-interval using "no ip ospf hello-interval" the
dead interval and hello due will be changed accordingly.

Signed-off-by: Kaushik <kaushik@niralnetworks.com>
2020-09-19 00:29:25 -07:00
Donald Sharp
cb4e6e4665
Merge pull request #7074 from Niral-Networks/acl_fix
ospfd : Resolving conflict in distribute-list update during MaxAge LSA.
2020-09-18 20:46:37 -04:00
Donald Sharp
27baa2c056
Merge pull request #7086 from ckishimo/flush_type5
ospfd: flush type 5 when type 7 is removed
2020-09-18 14:58:14 -04:00
ckishimo
8273ee4448 ospfd: do not generate type 4 LSA from NSSA ABR
In a topology like R1 -- R2 -- R5, with R2 being NSSA ABR and R5 being
ASBR redistributing external routes, the ABR R2 will translate type-7
LSA into type-5 and advertise to the backbone. In the current implementation
R2 is also advertising a type-4 LSA when there is no need.

RFC 3101: "...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..."

With this PR a type-4 LSA will not be advertised

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2020-09-17 07:44:14 -07:00
ckishimo
919714bd3f ospfd: fix debug ospf nssa prints wrong info
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2020-09-15 17:38:33 +02:00
ckishimo
a5f7319294 ospfd: flush type 5 when type 7 is removed
When the ASBR stops announcing a prefix into the NSSA area, the LSA
type 7 is removed from the area. However the ABR is refreshing the
type 5 in its LSDB while removing the Type 7 LSA. Routers outside
the area do not get an update.

With this change the LSA type 5 is flushed from the LSDB and the
change is announced to routers outside the area

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2020-09-12 11:42:24 -07:00
Kaushik
e6baea10a4 ospfd : Resolving conflict in distribute-list update during MaxAge LSA.
1. Fix for duplicating calls of ospf_external_lsa_refresh()
   in ospf_distribute_list_update_timer().
2. Added the comment and change from PR 6981.

Signed-off-by: Kaushik <kaushik@niralnetworks.com>
2020-09-12 06:24:30 -07:00
Renato Westphal
beb91114ec
Merge pull request #6789 from volta-networks/feat_ldp_igp_sync
ldpd: Add support for LDP-IGP Synchronization
2020-09-11 15:55:04 -03:00
lynne
132a782eb8 ospfd: ldp-igp-sync feature: adding ospf support
Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Signed-off-by: Karen Schoener <karen@voltanet.io>
2020-09-09 14:38:44 -04:00
Santosh P K
d6165cf543
Merge pull request #6982 from achernavin22/ospf_nssa_after_redist
ospfd: install Type-7 when NSSA enabled after redistribution
2020-09-07 18:24:41 +05:30
Alexander Chernavin
0f321812f5 ospfd: install Type-7 when NSSA enabled after redistribution
If NSSA is enabled before redistribution is configured, Type-7 LSA's
are installed. But if NSSA is enabled after redistribution is
configured, Type-7 LSAs are missing.

With this change, when NSSA is enabled, scan for external LSA's and
if they exist, install Type-7.

Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2020-09-03 08:12:05 -04:00
Santosh P K
371ded520b
Merge pull request #6987 from Niral-Networks/acl_fix
lib, ospf : Fix when redist is performed with route-map using access-list
2020-09-03 09:51:21 +05:30
Kaushik
e641623d90 ospfd : Fix in lsa refresh when redist is done with route-map using access-list.
1. Minor change in distribute-list update timer based on lsa flag.

Co-authored-by: harios <hari@niralnetworks.com>
Signed-off-by: Kaushik <kaushik@niralnetworks.com>
2020-09-02 02:44:25 -07:00
Olivier Dugeon
2e5b029865
Merge pull request #7003 from GalaxyGorilla/ospf_ti_lfa_prep
ospfd: use a new vertex list for every SPF run
2020-09-01 16:39:29 +02:00
Donald Sharp
2f826685a7
Merge pull request #7005 from Orange-OpenSource/dev_ospf_sr
ospfd: Coverity corrections
2020-08-27 07:15:38 -04:00
GalaxyGorilla
81443a283b ospfd: use a new vertex list for every SPF run
In the context of TI-LFA it is necessary to have multiple
representations of SPFs for so called P and Q spaces. Hence it makes
sense to start with fresh vertex lists, and only delete them when
the SPF calculation is not a 'dry run'.

Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2020-08-27 09:05:51 +00:00
Olivier Dugeon
83df36e845 ospfd: Coverity corrections
Following PR #6726, Coverity Scan detected some new errors in the OSPF Segment
Routing code. This patch corrects them.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2020-08-26 17:27:16 +02:00
Renato Westphal
cd8ce25a70
Merge pull request #6726 from Orange-OpenSource/dev_ospf_sr
ospfd: Segment Routing Improvement
2020-08-24 16:23:45 -03:00
Olivier Dugeon
4f4eed1cff
Merge pull request #6912 from GalaxyGorilla/ospf_ti_lfa_prep
ospfd: preparation for TI-LFA
2020-08-24 18:12:03 +02:00
Jakub Urbańczyk
a92706bb83 ospfd: make proactive ARP configurable
OSPFD sends ARP proactively to speed up convergence for /32 networks
on a p2p connection. It is only an optimization, so it can be disabled.

It is enabled by default.

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
2020-08-20 17:19:25 +02:00
Olivier Dugeon
0d174b6697 OSPFd: Correct Extended Prefix flooding for SR
PR #6416 that solves opsf crash when segment routing is restarted, introduce a
regression in Extended Prefix flooding: when segment routing prefix is modified
or removed, new segment routing prefix is no more flooded. This patch correct
this regression.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2020-08-20 15:51:48 +02:00
Olivier Dugeon
f786c4d7c9 OSPFd: Explicit Null option for Segment-Routing
Add new option to `segment-routing prefix` command to set the
Explcit Null flag in addition to the No-PHP flag. MPLS LFIB configuration
has been also updated to take into account the Explicit Null flag.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2020-08-20 15:51:48 +02:00