Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
comms
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
comms
Commits
a8d408ee
Commit
a8d408ee
authored
4 years ago
by
Josh Brooks
Browse files
Options
Downloads
Patches
Plain Diff
Respond to MR commentS
parent
60622bd8
No related branches found
No related tags found
1 merge request
!58
Revert "Modify waiting lock"
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
network/dataStructures/roundData.go
+1
-1
1 addition, 1 deletion
network/dataStructures/roundData.go
network/instance.go
+11
-3
11 additions, 3 deletions
network/instance.go
network/instance_test.go
+2
-2
2 additions, 2 deletions
network/instance_test.go
with
14 additions
and
6 deletions
network/dataStructures/roundData.go
+
1
−
1
View file @
a8d408ee
This diff is collapsed.
Click to expand it.
network/instance.go
+
11
−
3
View file @
a8d408ee
...
@@ -38,6 +38,10 @@ type Instance struct {
...
@@ -38,6 +38,10 @@ type Instance struct {
ipOverride
*
ds
.
IpOverrideList
ipOverride
*
ds
.
IpOverrideList
// Determines whether auth is enabled
// on communication with gateways
gatewayAuth
bool
// Network Health
// Network Health
networkHealth
chan
Heartbeat
networkHealth
chan
Heartbeat
...
@@ -614,9 +618,7 @@ func (i *Instance) updateConns(def *ndf.NetworkDefinition, isGateway, isNode boo
...
@@ -614,9 +618,7 @@ func (i *Instance) updateConns(def *ndf.NetworkDefinition, isGateway, isNode boo
gwParams
:=
connect
.
GetDefaultHostParams
()
gwParams
:=
connect
.
GetDefaultHostParams
()
gwParams
.
MaxRetries
=
3
gwParams
.
MaxRetries
=
3
gwParams
.
EnableCoolOff
=
true
gwParams
.
EnableCoolOff
=
true
if
i
.
comm
.
Id
.
GetType
()
!=
id
.
Gateway
{
gwParams
.
AuthEnabled
=
i
.
gatewayAuth
gwParams
.
AuthEnabled
=
false
}
_
,
err
:=
i
.
comm
.
AddHost
(
gwid
,
addr
,
[]
byte
(
gateway
.
TlsCertificate
),
gwParams
)
_
,
err
:=
i
.
comm
.
AddHost
(
gwid
,
addr
,
[]
byte
(
gateway
.
TlsCertificate
),
gwParams
)
if
err
!=
nil
{
if
err
!=
nil
{
return
errors
.
WithMessagef
(
err
,
"Could not add gateway host %s"
,
gwid
)
return
errors
.
WithMessagef
(
err
,
"Could not add gateway host %s"
,
gwid
)
...
@@ -686,3 +688,9 @@ func (i *Instance) updateConns(def *ndf.NetworkDefinition, isGateway, isNode boo
...
@@ -686,3 +688,9 @@ func (i *Instance) updateConns(def *ndf.NetworkDefinition, isGateway, isNode boo
}
}
return
nil
return
nil
}
}
// SetGatewayAuth will force authentication on all communications with gateways
// intended for use between Gateway <-> Gateway communications
func
(
i
*
Instance
)
SetGatewayAuthentication
()
{
i
.
gatewayAuth
=
true
}
This diff is collapsed.
Click to expand it.
network/instance_test.go
+
2
−
2
View file @
a8d408ee
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment