Skip to content

Commit

Permalink
Feature: add name-length of dummy interface too long error (#1952)
Browse files Browse the repository at this point in the history
(cherry picked from commit 5ab2b82)

Co-authored-by: Raj Aryan <[email protected]>
  • Loading branch information
github-actions[bot] and 8rxn authored Feb 20, 2024
1 parent 98ee53c commit a53a13e
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 a53a13e

Please sign in to comment.