Skip to content

Commit

Permalink
parse HTTPS, SVCB Rdata
Browse files Browse the repository at this point in the history
  • Loading branch information
edglynes committed Feb 9, 2021
1 parent da2407d commit 91a6aad
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions configdns-v2/record_lookup.go
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,24 @@ func ParseRData(rtype string, rdata []string) map[string]interface{} {
break
}

case "SVCB":
for _, rcontent := range rdata {
parts := strings.Split(rcontent, " ")
fieldMap["svc_priority"], _ = strconv.Atoi(parts[0])
fieldMap["target_name"] = parts[1]
fieldMap["svc_params"] = parts[2]
break
}

case "HTTPS":
for _, rcontent := range rdata {
parts := strings.Split(rcontent, " ")
fieldMap["svc_priority"], _ = strconv.Atoi(parts[0])
fieldMap["target_name"] = parts[1]
fieldMap["svc_params"] = parts[2]
break
}

default:
for _, rcontent := range rdata {
newrdata = append(newrdata, rcontent)
Expand Down

0 comments on commit 91a6aad

Please sign in to comment.