@@ -45,6 +45,8 @@ var (
const (
// https://tools.ietf.org/html/rfc1035#section-3.2.2
RRTypeTXT = 16
+ // https://tools.ietf.org/html/rfc6891#section-6.1.1
+ RRTypeOPT = 41
// https://tools.ietf.org/html/rfc1035#section-3.2.4
ClassIN = 1
@@ -211,6 +211,16 @@ func (c *DNSPacketConn) send(udpConn net.PacketConn, p []byte, addr net.Addr) er
Class: dns.ClassIN,
},
+ // EDNS(0)
+ Additional: []dns.RR{
+ {
+ Name: dns.Name{},
+ Type: dns.RRTypeOPT,
+ Class: 4096, // requestor's UDP payload size
+ TTL: 0, // extended RCODE and flags
+ Data: []byte{},
+ },
}
buf, err := query.WireFormat()
if err != nil {