Documentation
¶
Overview ¶
Package siit implements a plugin that performs AAAA to A translation.
See: RFC 6052 (https://www.rfc-editor.org/info/rfc6052/) See: RFC 7757 (https://www.rfc-editor.org/info/rfc7757/)
Index ¶
- Variables
- type SIIT
- func (d *SIIT) DoSIIT(ctx context.Context, w dns.ResponseWriter, r *dns.Msg, origResponse *dns.Msg) (*dns.Msg, bool, error)
- func (d *SIIT) Name() string
- func (d *SIIT) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error)
- func (d *SIIT) Synthesize(origReq, origResponse, resp *dns.Msg) (*dns.Msg, bool)
- type UpstreamInt
Constants ¶
This section is empty.
Variables ¶
var ( // RequestsTranslatedCount is the number of DNS requests translated by siit. RequestsTranslatedCount = promauto.NewCounterVec(prometheus.CounterOpts{ Namespace: plugin.Namespace, Subsystem: pluginName, Name: "requests_translated_total", Help: "Counter of DNS requests translated by siit.", }, []string{"server"}) )
Functions ¶
This section is empty.
Types ¶
type SIIT ¶
type SIIT struct {
Next plugin.Handler
IPv6Prefix *net.IPNet
Eam4 map[string]net.IP
Upstream UpstreamInt
}
SIIT performs SIIT.
func (*SIIT) DoSIIT ¶
func (d *SIIT) DoSIIT(ctx context.Context, w dns.ResponseWriter, r *dns.Msg, origResponse *dns.Msg) (*dns.Msg, bool, error)
DoSIIT takes an (empty) response to an A question, issues the AAAA request, and synthesizes the answer. Returns the response message, or error on internal failure.
func (*SIIT) Synthesize ¶
Synthesize merges the AAAA response and the records from the A response. The bool return reports whether at least one AAAA record was actually translated into a synthetic A record. false means the caller got back origResponse unchanged — nothing in the AAAA answer was mappable (no EAM entry, and the address wasn't in ipv6_prefix) — and this must not be counted as a translated request.