This commit is contained in:
Miek Gieben 2013-06-14 19:42:55 +01:00
parent b697d25ed9
commit 5d094e6e2d
5 changed files with 8 additions and 8 deletions

View File

@ -5,7 +5,7 @@
// EDNS0 // EDNS0
// //
// EDNS0 is an extension mechanism for the DNS defined in RFC 2671 and updated // EDNS0 is an extension mechanism for the DNS defined in RFC 2671 and updated
// by RFC 6891. It defines a standard RR type, the OPT RR, which is then completely // by RFC 6891. It defines a standard RR type, the OPT RR, which is then completely
// abused. // abused.
// Basic use pattern for creating an (empty) OPT RR: // Basic use pattern for creating an (empty) OPT RR:
// //

View File

@ -729,8 +729,8 @@ func TestEUIxx(t *testing.T) {
func TestUserRR(t *testing.T) { func TestUserRR(t *testing.T) {
tests := map[string]string{ tests := map[string]string{
"host.example. IN UID 1234": "host.example.\t3600\tIN\tUID\t1234", "host.example. IN UID 1234": "host.example.\t3600\tIN\tUID\t1234",
"host.example. IN GID 1234556": "host.example.\t3600\tIN\tGID\t1234556", "host.example. IN GID 1234556": "host.example.\t3600\tIN\tGID\t1234556",
"host.example. IN UINFO \"Miek Gieben\"": "host.example.\t3600\tIN\tUINFO\t\"Miek Gieben\"", "host.example. IN UINFO \"Miek Gieben\"": "host.example.\t3600\tIN\tUINFO\t\"Miek Gieben\"",
} }
for i, o := range tests { for i, o := range tests {

View File

@ -71,10 +71,10 @@ Loop:
// End of the domainname // End of the domainname
break Loop break Loop
} }
if off+c>l { if off+c > l {
return false return false
} }
off +=c off += c
case 0xC0: case 0xC0:
// pointer, next byte included, ends domainname // pointer, next byte included, ends domainname

View File

@ -42,8 +42,8 @@ type response struct {
tsigTimersOnly bool tsigTimersOnly bool
tsigRequestMAC string tsigRequestMAC string
tsigSecret map[string]string // the tsig secrets tsigSecret map[string]string // the tsig secrets
udp *net.UDPConn // i/o connection if UDP was used udp *net.UDPConn // i/o connection if UDP was used
tcp *net.TCPConn // i/o connection if TCP was used tcp *net.TCPConn // i/o connection if TCP was used
remoteAddr net.Addr // address of the client remoteAddr net.Addr // address of the client
} }

View File

@ -426,7 +426,7 @@ func setMINFO(h RR_Header, c chan lex, o, f string) (RR, *ParseError) {
rr.Rmail = appendOrigin(rr.Rmail, o) rr.Rmail = appendOrigin(rr.Rmail, o)
} }
} }
<-c // _BLANK <-c // _BLANK
l = <-c l = <-c
rr.Email = l.token rr.Email = l.token
if l.token == "@" { if l.token == "@" {