Skip to content

Commit

Permalink
Feature: add name-length of dummy interface too long error (openyurti…
Browse files Browse the repository at this point in the history
  • Loading branch information
8rxn authored and zyjhtangtang committed Apr 16, 2024
1 parent 479757b commit 94718d2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/yurthub/app/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ func (options *YurtHubOptions) Validate() error {
return fmt.Errorf("dummy ip %s is not invalid, %w", options.HubAgentDummyIfIP, err)
}

if len(options.HubAgentDummyIfName) > 15 {
return fmt.Errorf("dummy name %s length should not be more than 15", options.HubAgentDummyIfName)
}

if len(options.CACertHashes) == 0 && !options.UnsafeSkipCAVerification {
return fmt.Errorf("set --discovery-token-unsafe-skip-ca-verification flag as true or pass CACertHashes to continue")
}
Expand Down

0 comments on commit 94718d2

Please sign in to comment.