diff --git a/modules/dns_proxy/dns_proxy_js_query.go b/modules/dns_proxy/dns_proxy_js_query.go index 263ca213..79b55e2a 100644 --- a/modules/dns_proxy/dns_proxy_js_query.go +++ b/modules/dns_proxy/dns_proxy_js_query.go @@ -159,12 +159,25 @@ func jsPropToUint64(obj map[string]interface{}, key string) uint64 { } } break + case "uint64": + if v, ok := prop.(uint64); ok { + return v + } + break } } log.Error("error converting JS property to uint64 where key is: %s", key) return uint64(0) } +func uint16ArrayToInt64Array(arr []uint16, key string) []int64 { + vArr := make([]int64, 0, len(arr)) + for _, item := range arr { + vArr = append(vArr, int64(item)) + } + return vArr +} + func (j *JSQuery) NewHash() string { answers, _ := json.Marshal(j.Answers) extras, _ := json.Marshal(j.Extras)