Slightly change the way we block ipv6

This commit is contained in:
Frank Denis 2018-01-20 22:30:36 +01:00
parent f7b8b70322
commit f80c16ed2a
1 changed files with 6 additions and 0 deletions

View File

@ -37,6 +37,12 @@ func (plugin *PluginBlockIPv6) Eval(pluginsState *PluginsState, msg *dns.Msg) er
if err != nil { if err != nil {
return err return err
} }
hinfo := new(dns.HINFO)
hinfo.Hdr = dns.RR_Header{Name: question.Name, Rrtype: dns.TypeHINFO,
Class: dns.ClassINET, Ttl: 86400}
hinfo.Cpu = "AAAA queries have been locally blocked by dnscrypt-proxy"
hinfo.Os = "Set block_ipv6 to false to disable this feature"
synth.Answer = []dns.RR{hinfo}
pluginsState.synthResponse = synth pluginsState.synthResponse = synth
pluginsState.action = PluginsActionSynth pluginsState.action = PluginsActionSynth
return nil return nil