mirror of
https://github.com/slackhq/nebula.git
synced 2026-01-23 04:52:32 -08:00
Merge 43bdf9066e into 0b02d982b2
This commit is contained in:
commit
0b6a3e705f
1 changed files with 0 additions and 6 deletions
|
|
@ -396,7 +396,6 @@ func (c *certificateV2) validate() error {
|
|||
return NewErrInvalidCertificateProperties("non-CA certificate must contain at least 1 network")
|
||||
}
|
||||
|
||||
hasV4Networks := false
|
||||
hasV6Networks := false
|
||||
for _, network := range c.details.networks {
|
||||
if !network.IsValid() || !network.Addr().IsValid() {
|
||||
|
|
@ -415,7 +414,6 @@ func (c *certificateV2) validate() error {
|
|||
return NewErrInvalidCertificateProperties("4in6 networks are not allowed: %s", network)
|
||||
}
|
||||
|
||||
hasV4Networks = hasV4Networks || network.Addr().Is4()
|
||||
hasV6Networks = hasV6Networks || network.Addr().Is6()
|
||||
}
|
||||
|
||||
|
|
@ -439,10 +437,6 @@ func (c *certificateV2) validate() error {
|
|||
if !hasV6Networks {
|
||||
return NewErrInvalidCertificateProperties("IPv6 unsafe networks require an IPv6 address assignment: %s", network)
|
||||
}
|
||||
} else if network.Addr().Is4() {
|
||||
if !hasV4Networks {
|
||||
return NewErrInvalidCertificateProperties("IPv4 unsafe networks require an IPv4 address assignment: %s", network)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue