|
@@ -6,7 +6,6 @@ import (
|
|
|
"encoding/binary"
|
|
"encoding/binary"
|
|
|
"net/url"
|
|
"net/url"
|
|
|
"sync"
|
|
"sync"
|
|
|
- "sync/atomic"
|
|
|
|
|
"time"
|
|
"time"
|
|
|
|
|
|
|
|
"github.com/quic-go/quic-go"
|
|
"github.com/quic-go/quic-go"
|
|
@@ -35,7 +34,6 @@ type QUICNameServer struct {
|
|
|
ips map[string]record
|
|
ips map[string]record
|
|
|
pub *pubsub.Service
|
|
pub *pubsub.Service
|
|
|
cleanup *task.Periodic
|
|
cleanup *task.Periodic
|
|
|
- reqID uint32
|
|
|
|
|
name string
|
|
name string
|
|
|
destination net.Destination
|
|
destination net.Destination
|
|
|
connection quic.Connection
|
|
connection quic.Connection
|
|
@@ -149,7 +147,7 @@ func (s *QUICNameServer) updateIP(req *dnsRequest, ipRec *IPRecord) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func (s *QUICNameServer) newReqID() uint16 {
|
|
func (s *QUICNameServer) newReqID() uint16 {
|
|
|
- return uint16(atomic.AddUint32(&s.reqID, 1))
|
|
|
|
|
|
|
+ return 0
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func (s *QUICNameServer) sendQuery(ctx context.Context, domain string, clientIP net.IP, option dns_feature.IPOption) {
|
|
func (s *QUICNameServer) sendQuery(ctx context.Context, domain string, clientIP net.IP, option dns_feature.IPOption) {
|