mirror of
https://github.com/netbirdio/netbird.git
synced 2025-08-16 18:11:58 +02:00
[client] Fix stale local records (#3776)
This commit is contained in:
@ -66,17 +66,17 @@ func (s SimpleRecord) String() string {
|
||||
func (s SimpleRecord) Len() uint16 {
|
||||
emptyString := s.RData == ""
|
||||
switch s.Type {
|
||||
case 1:
|
||||
case int(dns.TypeA):
|
||||
if emptyString {
|
||||
return 0
|
||||
}
|
||||
return net.IPv4len
|
||||
case 5:
|
||||
case int(dns.TypeCNAME):
|
||||
if emptyString || s.RData == "." {
|
||||
return 1
|
||||
}
|
||||
return uint16(len(s.RData) + 1)
|
||||
case 28:
|
||||
case int(dns.TypeAAAA):
|
||||
if emptyString {
|
||||
return 0
|
||||
}
|
||||
|
Reference in New Issue
Block a user