mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-26 22:25:52 -05:00
Pass DNSConfig to nodes in MapResponse
This commit is contained in:
parent
e77c16b55a
commit
01e781e546
8
api.go
8
api.go
@ -14,7 +14,6 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/klauspost/compress/zstd"
|
"github.com/klauspost/compress/zstd"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
"inet.af/netaddr"
|
|
||||||
"tailscale.com/tailcfg"
|
"tailscale.com/tailcfg"
|
||||||
"tailscale.com/types/wgkey"
|
"tailscale.com/types/wgkey"
|
||||||
)
|
)
|
||||||
@ -248,7 +247,12 @@ func (h *Headscale) getMapResponse(mKey wgkey.Key, req tailcfg.MapRequest, m Mac
|
|||||||
KeepAlive: false,
|
KeepAlive: false,
|
||||||
Node: node,
|
Node: node,
|
||||||
Peers: *peers,
|
Peers: *peers,
|
||||||
DNS: []netaddr.IP{},
|
//TODO(kradalby): As per tailscale docs, if DNSConfig is nil,
|
||||||
|
// it means its not updated, maybe we can have some logic
|
||||||
|
// to check and only pass updates when its updates.
|
||||||
|
// This is probably more relevant if we try to implement
|
||||||
|
// "MagicDNS"
|
||||||
|
DNSConfig: h.cfg.DNSConfig,
|
||||||
SearchPaths: []string{},
|
SearchPaths: []string{},
|
||||||
Domain: "headscale.net",
|
Domain: "headscale.net",
|
||||||
PacketFilter: *h.aclRules,
|
PacketFilter: *h.aclRules,
|
||||||
|
Loading…
Reference in New Issue
Block a user