mirror of
https://github.com/slackhq/nebula.git
synced 2025-12-06 02:30:57 -08:00
add configurable punching delay because of race-condition-y conntracks (#210)
* add configurable punching delay because of race-condition-y conntracks * add changelog * fix tests * only do one punch per query * Coalesce punchy config * It is not is not set * Add tests Co-authored-by: Nate Brown <nbrown.us@gmail.com>
This commit is contained in:
parent
add1b21777
commit
1297090af3
9 changed files with 116 additions and 18 deletions
8
main.go
8
main.go
|
|
@ -177,8 +177,8 @@ func Main(configPath string, configTest bool, buildVersion string) {
|
|||
go hostMap.Promoter(config.GetInt("promoter.interval"))
|
||||
*/
|
||||
|
||||
punchy := config.GetBool("punchy", false)
|
||||
if punchy == true {
|
||||
punchy := NewPunchyFromConfig(config)
|
||||
if punchy.Punch {
|
||||
l.Info("UDP hole punching enabled")
|
||||
go hostMap.Punchy(udpServer)
|
||||
}
|
||||
|
|
@ -193,7 +193,6 @@ func Main(configPath string, configTest bool, buildVersion string) {
|
|||
port = int(uPort.Port)
|
||||
}
|
||||
|
||||
punchBack := config.GetBool("punch_back", false)
|
||||
amLighthouse := config.GetBool("lighthouse.am_lighthouse", false)
|
||||
|
||||
// warn if am_lighthouse is enabled but upstream lighthouses exists
|
||||
|
|
@ -222,7 +221,8 @@ func Main(configPath string, configTest bool, buildVersion string) {
|
|||
config.GetInt("lighthouse.interval", 10),
|
||||
port,
|
||||
udpServer,
|
||||
punchBack,
|
||||
punchy.Respond,
|
||||
punchy.Delay,
|
||||
)
|
||||
|
||||
//TODO: Move all of this inside functions in lighthouse.go
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue