mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 15:32:24 -05:00 
			
		
		
		
	[chore]: Bump github.com/miekg/dns from 1.1.62 to 1.1.63 (#3695)
Bumps [github.com/miekg/dns](https://github.com/miekg/dns) from 1.1.62 to 1.1.63. - [Changelog](https://github.com/miekg/dns/blob/master/Makefile.release) - [Commits](https://github.com/miekg/dns/compare/v1.1.62...v1.1.63) --- updated-dependencies: - dependency-name: github.com/miekg/dns dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
		
					parent
					
						
							
								5c96702cb5
							
						
					
				
			
			
				commit
				
					
						3428bc9633
					
				
			
		
					 11 changed files with 102 additions and 44 deletions
				
			
		
							
								
								
									
										2
									
								
								go.mod
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								go.mod
									
										
									
									
									
								
							|  | @ -60,7 +60,7 @@ require ( | ||||||
| 	github.com/jackc/pgx/v5 v5.7.2 | 	github.com/jackc/pgx/v5 v5.7.2 | ||||||
| 	github.com/k3a/html2text v1.2.1 | 	github.com/k3a/html2text v1.2.1 | ||||||
| 	github.com/microcosm-cc/bluemonday v1.0.27 | 	github.com/microcosm-cc/bluemonday v1.0.27 | ||||||
| 	github.com/miekg/dns v1.1.62 | 	github.com/miekg/dns v1.1.63 | ||||||
| 	github.com/minio/minio-go/v7 v7.0.81 | 	github.com/minio/minio-go/v7 v7.0.81 | ||||||
| 	github.com/mitchellh/mapstructure v1.5.0 | 	github.com/mitchellh/mapstructure v1.5.0 | ||||||
| 	github.com/ncruces/go-sqlite3 v0.22.0 | 	github.com/ncruces/go-sqlite3 v0.22.0 | ||||||
|  |  | ||||||
							
								
								
									
										4
									
								
								go.sum
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								go.sum
									
										
									
										generated
									
									
									
								
							|  | @ -407,8 +407,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE | ||||||
| github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= | github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= | ||||||
| github.com/microcosm-cc/bluemonday v1.0.27 h1:MpEUotklkwCSLeH+Qdx1VJgNqLlpY2KXwXFM08ygZfk= | github.com/microcosm-cc/bluemonday v1.0.27 h1:MpEUotklkwCSLeH+Qdx1VJgNqLlpY2KXwXFM08ygZfk= | ||||||
| github.com/microcosm-cc/bluemonday v1.0.27/go.mod h1:jFi9vgW+H7c3V0lb6nR74Ib/DIB5OBs92Dimizgw2cA= | github.com/microcosm-cc/bluemonday v1.0.27/go.mod h1:jFi9vgW+H7c3V0lb6nR74Ib/DIB5OBs92Dimizgw2cA= | ||||||
| github.com/miekg/dns v1.1.62 h1:cN8OuEF1/x5Rq6Np+h1epln8OiyPWV+lROx9LxcGgIQ= | github.com/miekg/dns v1.1.63 h1:8M5aAw6OMZfFXTT7K5V0Eu5YiiL8l7nUAkyN6C9YwaY= | ||||||
| github.com/miekg/dns v1.1.62/go.mod h1:mvDlcItzm+br7MToIKqkglaGhlFMHJ9DTNNWONWXbNQ= | github.com/miekg/dns v1.1.63/go.mod h1:6NGHfjhpmr5lt3XPLuyfDJi5AXbNIPM9PY6H6sF1Nfs= | ||||||
| github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= | github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= | ||||||
| github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= | github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= | ||||||
| github.com/minio/minio-go/v7 v7.0.81 h1:SzhMN0TQ6T/xSBu6Nvw3M5M8voM+Ht8RH3hE8S7zxaA= | github.com/minio/minio-go/v7 v7.0.81 h1:SzhMN0TQ6T/xSBu6Nvw3M5M8voM+Ht8RH3hE8S7zxaA= | ||||||
|  |  | ||||||
							
								
								
									
										1
									
								
								vendor/github.com/miekg/dns/README.md
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								vendor/github.com/miekg/dns/README.md
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -85,6 +85,7 @@ A not-so-up-to-date-list-that-may-be-actually-current: | ||||||
| * https://github.com/wintbiit/NineDNS | * https://github.com/wintbiit/NineDNS | ||||||
| * https://linuxcontainers.org/incus/ | * https://linuxcontainers.org/incus/ | ||||||
| * https://ifconfig.es | * https://ifconfig.es | ||||||
|  | * https://github.com/zmap/zdns | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| Send pull request if you want to be listed here. | Send pull request if you want to be listed here. | ||||||
|  |  | ||||||
							
								
								
									
										42
									
								
								vendor/github.com/miekg/dns/dnssec.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										42
									
								
								vendor/github.com/miekg/dns/dnssec.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -250,14 +250,6 @@ func (d *DS) ToCDS() *CDS { | ||||||
| // zero, it is used as-is, otherwise the TTL of the RRset is used as the | // zero, it is used as-is, otherwise the TTL of the RRset is used as the | ||||||
| // OrigTTL. | // OrigTTL. | ||||||
| func (rr *RRSIG) Sign(k crypto.Signer, rrset []RR) error { | func (rr *RRSIG) Sign(k crypto.Signer, rrset []RR) error { | ||||||
| 	if k == nil { |  | ||||||
| 		return ErrPrivKey |  | ||||||
| 	} |  | ||||||
| 	// s.Inception and s.Expiration may be 0 (rollover etc.), the rest must be set |  | ||||||
| 	if rr.KeyTag == 0 || len(rr.SignerName) == 0 || rr.Algorithm == 0 { |  | ||||||
| 		return ErrKey |  | ||||||
| 	} |  | ||||||
| 
 |  | ||||||
| 	h0 := rrset[0].Header() | 	h0 := rrset[0].Header() | ||||||
| 	rr.Hdr.Rrtype = TypeRRSIG | 	rr.Hdr.Rrtype = TypeRRSIG | ||||||
| 	rr.Hdr.Name = h0.Name | 	rr.Hdr.Name = h0.Name | ||||||
|  | @ -272,6 +264,18 @@ func (rr *RRSIG) Sign(k crypto.Signer, rrset []RR) error { | ||||||
| 		rr.Labels-- // wildcard, remove from label count | 		rr.Labels-- // wildcard, remove from label count | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | 	return rr.signAsIs(k, rrset) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | func (rr *RRSIG) signAsIs(k crypto.Signer, rrset []RR) error { | ||||||
|  | 	if k == nil { | ||||||
|  | 		return ErrPrivKey | ||||||
|  | 	} | ||||||
|  | 	// s.Inception and s.Expiration may be 0 (rollover etc.), the rest must be set | ||||||
|  | 	if rr.KeyTag == 0 || len(rr.SignerName) == 0 || rr.Algorithm == 0 { | ||||||
|  | 		return ErrKey | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
| 	sigwire := new(rrsigWireFmt) | 	sigwire := new(rrsigWireFmt) | ||||||
| 	sigwire.TypeCovered = rr.TypeCovered | 	sigwire.TypeCovered = rr.TypeCovered | ||||||
| 	sigwire.Algorithm = rr.Algorithm | 	sigwire.Algorithm = rr.Algorithm | ||||||
|  | @ -370,9 +374,12 @@ func (rr *RRSIG) Verify(k *DNSKEY, rrset []RR) error { | ||||||
| 	if rr.Algorithm != k.Algorithm { | 	if rr.Algorithm != k.Algorithm { | ||||||
| 		return ErrKey | 		return ErrKey | ||||||
| 	} | 	} | ||||||
| 	if !strings.EqualFold(rr.SignerName, k.Hdr.Name) { | 
 | ||||||
|  | 	signerName := CanonicalName(rr.SignerName) | ||||||
|  | 	if !equal(signerName, k.Hdr.Name) { | ||||||
| 		return ErrKey | 		return ErrKey | ||||||
| 	} | 	} | ||||||
|  | 
 | ||||||
| 	if k.Protocol != 3 { | 	if k.Protocol != 3 { | ||||||
| 		return ErrKey | 		return ErrKey | ||||||
| 	} | 	} | ||||||
|  | @ -384,9 +391,18 @@ func (rr *RRSIG) Verify(k *DNSKEY, rrset []RR) error { | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	// IsRRset checked that we have at least one RR and that the RRs in | 	// IsRRset checked that we have at least one RR and that the RRs in | ||||||
| 	// the set have consistent type, class, and name. Also check that type and | 	// the set have consistent type, class, and name. Also check that type, | ||||||
| 	// class matches the RRSIG record. | 	// class and name matches the RRSIG record. | ||||||
| 	if h0 := rrset[0].Header(); h0.Class != rr.Hdr.Class || h0.Rrtype != rr.TypeCovered { | 	// Also checks RFC 4035 5.3.1 the number of labels in the RRset owner | ||||||
|  | 	// name MUST be greater than or equal to the value in the RRSIG RR's Labels field. | ||||||
|  | 	// RFC 4035 5.3.1 Signer's Name MUST be the name of the zone that [contains the RRset]. | ||||||
|  | 	// Since we don't have SOA info, checking suffix may be the best we can do...? | ||||||
|  | 	if h0 := rrset[0].Header(); h0.Class != rr.Hdr.Class || | ||||||
|  | 		h0.Rrtype != rr.TypeCovered || | ||||||
|  | 		uint8(CountLabel(h0.Name)) < rr.Labels || | ||||||
|  | 		!equal(h0.Name, rr.Hdr.Name) || | ||||||
|  | 		!strings.HasSuffix(CanonicalName(h0.Name), signerName) { | ||||||
|  | 
 | ||||||
| 		return ErrRRset | 		return ErrRRset | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | @ -400,7 +416,7 @@ func (rr *RRSIG) Verify(k *DNSKEY, rrset []RR) error { | ||||||
| 	sigwire.Expiration = rr.Expiration | 	sigwire.Expiration = rr.Expiration | ||||||
| 	sigwire.Inception = rr.Inception | 	sigwire.Inception = rr.Inception | ||||||
| 	sigwire.KeyTag = rr.KeyTag | 	sigwire.KeyTag = rr.KeyTag | ||||||
| 	sigwire.SignerName = CanonicalName(rr.SignerName) | 	sigwire.SignerName = signerName | ||||||
| 	// Create the desired binary blob | 	// Create the desired binary blob | ||||||
| 	signeddata := make([]byte, DefaultMsgSize) | 	signeddata := make([]byte, DefaultMsgSize) | ||||||
| 	n, err := packSigWire(sigwire, signeddata) | 	n, err := packSigWire(sigwire, signeddata) | ||||||
|  |  | ||||||
							
								
								
									
										36
									
								
								vendor/github.com/miekg/dns/edns.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										36
									
								
								vendor/github.com/miekg/dns/edns.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -58,7 +58,7 @@ func makeDataOpt(code uint16) EDNS0 { | ||||||
| 	case EDNS0EDE: | 	case EDNS0EDE: | ||||||
| 		return new(EDNS0_EDE) | 		return new(EDNS0_EDE) | ||||||
| 	case EDNS0ESU: | 	case EDNS0ESU: | ||||||
| 		return &EDNS0_ESU{Code: EDNS0ESU} | 		return new(EDNS0_ESU) | ||||||
| 	default: | 	default: | ||||||
| 		e := new(EDNS0_LOCAL) | 		e := new(EDNS0_LOCAL) | ||||||
| 		e.Code = code | 		e.Code = code | ||||||
|  | @ -66,8 +66,7 @@ func makeDataOpt(code uint16) EDNS0 { | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // OPT is the EDNS0 RR appended to messages to convey extra (meta) information. | // OPT is the EDNS0 RR appended to messages to convey extra (meta) information. See RFC 6891. | ||||||
| // See RFC 6891. |  | ||||||
| type OPT struct { | type OPT struct { | ||||||
| 	Hdr    RR_Header | 	Hdr    RR_Header | ||||||
| 	Option []EDNS0 `dns:"opt"` | 	Option []EDNS0 `dns:"opt"` | ||||||
|  | @ -144,8 +143,6 @@ func (*OPT) parse(c *zlexer, origin string) *ParseError { | ||||||
| 
 | 
 | ||||||
| func (rr *OPT) isDuplicate(r2 RR) bool { return false } | func (rr *OPT) isDuplicate(r2 RR) bool { return false } | ||||||
| 
 | 
 | ||||||
| // return the old value -> delete SetVersion? |  | ||||||
| 
 |  | ||||||
| // Version returns the EDNS version used. Only zero is defined. | // Version returns the EDNS version used. Only zero is defined. | ||||||
| func (rr *OPT) Version() uint8 { | func (rr *OPT) Version() uint8 { | ||||||
| 	return uint8(rr.Hdr.Ttl & 0x00FF0000 >> 16) | 	return uint8(rr.Hdr.Ttl & 0x00FF0000 >> 16) | ||||||
|  | @ -236,8 +233,8 @@ type EDNS0 interface { | ||||||
| //	e.Nsid = "AA" | //	e.Nsid = "AA" | ||||||
| //	o.Option = append(o.Option, e) | //	o.Option = append(o.Option, e) | ||||||
| type EDNS0_NSID struct { | type EDNS0_NSID struct { | ||||||
| 	Code uint16 // Always EDNS0NSID | 	Code uint16 // always EDNS0NSID | ||||||
| 	Nsid string // This string needs to be hex encoded | 	Nsid string // string needs to be hex encoded | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (e *EDNS0_NSID) pack() ([]byte, error) { | func (e *EDNS0_NSID) pack() ([]byte, error) { | ||||||
|  | @ -275,7 +272,7 @@ func (e *EDNS0_NSID) copy() EDNS0           { return &EDNS0_NSID{e.Code, e.Nsid} | ||||||
| // When packing it will apply SourceNetmask. If you need more advanced logic, | // When packing it will apply SourceNetmask. If you need more advanced logic, | ||||||
| // patches welcome and good luck. | // patches welcome and good luck. | ||||||
| type EDNS0_SUBNET struct { | type EDNS0_SUBNET struct { | ||||||
| 	Code          uint16 // Always EDNS0SUBNET | 	Code          uint16 // always EDNS0SUBNET | ||||||
| 	Family        uint16 // 1 for IP, 2 for IP6 | 	Family        uint16 // 1 for IP, 2 for IP6 | ||||||
| 	SourceNetmask uint8 | 	SourceNetmask uint8 | ||||||
| 	SourceScope   uint8 | 	SourceScope   uint8 | ||||||
|  | @ -399,8 +396,8 @@ func (e *EDNS0_SUBNET) copy() EDNS0 { | ||||||
| // | // | ||||||
| // There is no guarantee that the Cookie string has a specific length. | // There is no guarantee that the Cookie string has a specific length. | ||||||
| type EDNS0_COOKIE struct { | type EDNS0_COOKIE struct { | ||||||
| 	Code   uint16 // Always EDNS0COOKIE | 	Code   uint16 // always EDNS0COOKIE | ||||||
| 	Cookie string // Hex-encoded cookie data | 	Cookie string // hex encoded cookie data | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (e *EDNS0_COOKIE) pack() ([]byte, error) { | func (e *EDNS0_COOKIE) pack() ([]byte, error) { | ||||||
|  | @ -430,7 +427,7 @@ func (e *EDNS0_COOKIE) copy() EDNS0           { return &EDNS0_COOKIE{e.Code, e.C | ||||||
| //	e.Lease = 120 // in seconds | //	e.Lease = 120 // in seconds | ||||||
| //	o.Option = append(o.Option, e) | //	o.Option = append(o.Option, e) | ||||||
| type EDNS0_UL struct { | type EDNS0_UL struct { | ||||||
| 	Code     uint16 // Always EDNS0UL | 	Code     uint16 // always EDNS0UL | ||||||
| 	Lease    uint32 | 	Lease    uint32 | ||||||
| 	KeyLease uint32 | 	KeyLease uint32 | ||||||
| } | } | ||||||
|  | @ -469,7 +466,7 @@ func (e *EDNS0_UL) unpack(b []byte) error { | ||||||
| // EDNS0_LLQ stands for Long Lived Queries: http://tools.ietf.org/html/draft-sekar-dns-llq-01 | // EDNS0_LLQ stands for Long Lived Queries: http://tools.ietf.org/html/draft-sekar-dns-llq-01 | ||||||
| // Implemented for completeness, as the EDNS0 type code is assigned. | // Implemented for completeness, as the EDNS0 type code is assigned. | ||||||
| type EDNS0_LLQ struct { | type EDNS0_LLQ struct { | ||||||
| 	Code      uint16 // Always EDNS0LLQ | 	Code      uint16 // always EDNS0LLQ | ||||||
| 	Version   uint16 | 	Version   uint16 | ||||||
| 	Opcode    uint16 | 	Opcode    uint16 | ||||||
| 	Error     uint16 | 	Error     uint16 | ||||||
|  | @ -515,7 +512,7 @@ func (e *EDNS0_LLQ) copy() EDNS0 { | ||||||
| 
 | 
 | ||||||
| // EDNS0_DAU implements the EDNS0 "DNSSEC Algorithm Understood" option. See RFC 6975. | // EDNS0_DAU implements the EDNS0 "DNSSEC Algorithm Understood" option. See RFC 6975. | ||||||
| type EDNS0_DAU struct { | type EDNS0_DAU struct { | ||||||
| 	Code    uint16 // Always EDNS0DAU | 	Code    uint16 // always EDNS0DAU | ||||||
| 	AlgCode []uint8 | 	AlgCode []uint8 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -539,7 +536,7 @@ func (e *EDNS0_DAU) copy() EDNS0 { return &EDNS0_DAU{e.Code, e.AlgCode} } | ||||||
| 
 | 
 | ||||||
| // EDNS0_DHU implements the EDNS0 "DS Hash Understood" option. See RFC 6975. | // EDNS0_DHU implements the EDNS0 "DS Hash Understood" option. See RFC 6975. | ||||||
| type EDNS0_DHU struct { | type EDNS0_DHU struct { | ||||||
| 	Code    uint16 // Always EDNS0DHU | 	Code    uint16 // always EDNS0DHU | ||||||
| 	AlgCode []uint8 | 	AlgCode []uint8 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -563,7 +560,7 @@ func (e *EDNS0_DHU) copy() EDNS0 { return &EDNS0_DHU{e.Code, e.AlgCode} } | ||||||
| 
 | 
 | ||||||
| // EDNS0_N3U implements the EDNS0 "NSEC3 Hash Understood" option. See RFC 6975. | // EDNS0_N3U implements the EDNS0 "NSEC3 Hash Understood" option. See RFC 6975. | ||||||
| type EDNS0_N3U struct { | type EDNS0_N3U struct { | ||||||
| 	Code    uint16 // Always EDNS0N3U | 	Code    uint16 // always EDNS0N3U | ||||||
| 	AlgCode []uint8 | 	AlgCode []uint8 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -588,7 +585,7 @@ func (e *EDNS0_N3U) copy() EDNS0 { return &EDNS0_N3U{e.Code, e.AlgCode} } | ||||||
| 
 | 
 | ||||||
| // EDNS0_EXPIRE implements the EDNS0 option as described in RFC 7314. | // EDNS0_EXPIRE implements the EDNS0 option as described in RFC 7314. | ||||||
| type EDNS0_EXPIRE struct { | type EDNS0_EXPIRE struct { | ||||||
| 	Code   uint16 // Always EDNS0EXPIRE | 	Code   uint16 // always EDNS0EXPIRE | ||||||
| 	Expire uint32 | 	Expire uint32 | ||||||
| 	Empty  bool // Empty is used to signal an empty Expire option in a backwards compatible way, it's not used on the wire. | 	Empty  bool // Empty is used to signal an empty Expire option in a backwards compatible way, it's not used on the wire. | ||||||
| } | } | ||||||
|  | @ -668,7 +665,7 @@ func (e *EDNS0_LOCAL) unpack(b []byte) error { | ||||||
| // EDNS0_TCP_KEEPALIVE is an EDNS0 option that instructs the server to keep | // EDNS0_TCP_KEEPALIVE is an EDNS0 option that instructs the server to keep | ||||||
| // the TCP connection alive. See RFC 7828. | // the TCP connection alive. See RFC 7828. | ||||||
| type EDNS0_TCP_KEEPALIVE struct { | type EDNS0_TCP_KEEPALIVE struct { | ||||||
| 	Code uint16 // Always EDNSTCPKEEPALIVE | 	Code uint16 // always EDNSTCPKEEPALIVE | ||||||
| 
 | 
 | ||||||
| 	// Timeout is an idle timeout value for the TCP connection, specified in | 	// Timeout is an idle timeout value for the TCP connection, specified in | ||||||
| 	// units of 100 milliseconds, encoded in network byte order. If set to 0, | 	// units of 100 milliseconds, encoded in network byte order. If set to 0, | ||||||
|  | @ -839,13 +836,12 @@ func (e *EDNS0_EDE) unpack(b []byte) error { | ||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // The EDNS0_ESU option for ENUM Source-URI Extension | // The EDNS0_ESU option for ENUM Source-URI Extension. | ||||||
| type EDNS0_ESU struct { | type EDNS0_ESU struct { | ||||||
| 	Code uint16 | 	Code uint16 // always EDNS0ESU | ||||||
| 	Uri  string | 	Uri  string | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // Option implements the EDNS0 interface. |  | ||||||
| func (e *EDNS0_ESU) Option() uint16        { return EDNS0ESU } | func (e *EDNS0_ESU) Option() uint16        { return EDNS0ESU } | ||||||
| func (e *EDNS0_ESU) String() string        { return e.Uri } | func (e *EDNS0_ESU) String() string        { return e.Uri } | ||||||
| func (e *EDNS0_ESU) copy() EDNS0           { return &EDNS0_ESU{e.Code, e.Uri} } | func (e *EDNS0_ESU) copy() EDNS0           { return &EDNS0_ESU{e.Code, e.Uri} } | ||||||
|  |  | ||||||
|  | @ -3,9 +3,15 @@ | ||||||
| 
 | 
 | ||||||
| package dns | package dns | ||||||
| 
 | 
 | ||||||
| import "net" | import ( | ||||||
|  | 	"fmt" | ||||||
|  | 	"net" | ||||||
|  | ) | ||||||
| 
 | 
 | ||||||
| const supportsReusePort = false | const ( | ||||||
|  | 	supportsReusePort = false | ||||||
|  | 	supportsReuseAddr = false | ||||||
|  | ) | ||||||
| 
 | 
 | ||||||
| func listenTCP(network, addr string, reuseport, reuseaddr bool) (net.Listener, error) { | func listenTCP(network, addr string, reuseport, reuseaddr bool) (net.Listener, error) { | ||||||
| 	if reuseport || reuseaddr { | 	if reuseport || reuseaddr { | ||||||
|  | @ -15,8 +21,6 @@ func listenTCP(network, addr string, reuseport, reuseaddr bool) (net.Listener, e | ||||||
| 	return net.Listen(network, addr) | 	return net.Listen(network, addr) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| const supportsReuseAddr = false |  | ||||||
| 
 |  | ||||||
| func listenUDP(network, addr string, reuseport, reuseaddr bool) (net.PacketConn, error) { | func listenUDP(network, addr string, reuseport, reuseaddr bool) (net.PacketConn, error) { | ||||||
| 	if reuseport || reuseaddr { | 	if reuseport || reuseaddr { | ||||||
| 		// TODO(tmthrgd): return an error? | 		// TODO(tmthrgd): return an error? | ||||||
|  | @ -24,3 +28,13 @@ func listenUDP(network, addr string, reuseport, reuseaddr bool) (net.PacketConn, | ||||||
| 
 | 
 | ||||||
| 	return net.ListenPacket(network, addr) | 	return net.ListenPacket(network, addr) | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | // this is just for test compatibility | ||||||
|  | func checkReuseport(fd uintptr) (bool, error) { | ||||||
|  | 	return false, fmt.Errorf("not supported") | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // this is just for test compatibility | ||||||
|  | func checkReuseaddr(fd uintptr) (bool, error) { | ||||||
|  | 	return false, fmt.Errorf("not supported") | ||||||
|  | } | ||||||
|  | @ -39,10 +39,40 @@ func reuseaddrControl(network, address string, c syscall.RawConn) error { | ||||||
| 	return opErr | 	return opErr | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | func reuseaddrandportControl(network, address string, c syscall.RawConn) error { | ||||||
|  | 	err := reuseaddrControl(network, address, c) | ||||||
|  | 	if err != nil { | ||||||
|  | 		return err | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	return reuseportControl(network, address, c) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // this is just for test compatibility | ||||||
|  | func checkReuseport(fd uintptr) (bool, error) { | ||||||
|  | 	v, err := unix.GetsockoptInt(int(fd), unix.SOL_SOCKET, unix.SO_REUSEPORT) | ||||||
|  | 	if err != nil { | ||||||
|  | 		return false, err | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	return v == 1, nil | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // this is just for test compatibility | ||||||
|  | func checkReuseaddr(fd uintptr) (bool, error) { | ||||||
|  | 	v, err := unix.GetsockoptInt(int(fd), unix.SOL_SOCKET, unix.SO_REUSEADDR) | ||||||
|  | 	if err != nil { | ||||||
|  | 		return false, err | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	return v == 1, nil | ||||||
|  | } | ||||||
|  | 
 | ||||||
| func listenTCP(network, addr string, reuseport, reuseaddr bool) (net.Listener, error) { | func listenTCP(network, addr string, reuseport, reuseaddr bool) (net.Listener, error) { | ||||||
| 	var lc net.ListenConfig | 	var lc net.ListenConfig | ||||||
| 	switch { | 	switch { | ||||||
| 	case reuseaddr && reuseport: | 	case reuseaddr && reuseport: | ||||||
|  | 		lc.Control = reuseaddrandportControl | ||||||
| 	case reuseport: | 	case reuseport: | ||||||
| 		lc.Control = reuseportControl | 		lc.Control = reuseportControl | ||||||
| 	case reuseaddr: | 	case reuseaddr: | ||||||
|  | @ -56,6 +86,7 @@ func listenUDP(network, addr string, reuseport, reuseaddr bool) (net.PacketConn, | ||||||
| 	var lc net.ListenConfig | 	var lc net.ListenConfig | ||||||
| 	switch { | 	switch { | ||||||
| 	case reuseaddr && reuseport: | 	case reuseaddr && reuseport: | ||||||
|  | 		lc.Control = reuseaddrandportControl | ||||||
| 	case reuseport: | 	case reuseport: | ||||||
| 		lc.Control = reuseportControl | 		lc.Control = reuseportControl | ||||||
| 	case reuseaddr: | 	case reuseaddr: | ||||||
							
								
								
									
										1
									
								
								vendor/github.com/miekg/dns/server.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								vendor/github.com/miekg/dns/server.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -226,6 +226,7 @@ type Server struct { | ||||||
| 	// If NotifyStartedFunc is set it is called once the server has started listening. | 	// If NotifyStartedFunc is set it is called once the server has started listening. | ||||||
| 	NotifyStartedFunc func() | 	NotifyStartedFunc func() | ||||||
| 	// DecorateReader is optional, allows customization of the process that reads raw DNS messages. | 	// DecorateReader is optional, allows customization of the process that reads raw DNS messages. | ||||||
|  | 	// The decorated reader must not mutate the data read from the conn. | ||||||
| 	DecorateReader DecorateReader | 	DecorateReader DecorateReader | ||||||
| 	// DecorateWriter is optional, allows customization of the process that writes raw DNS messages. | 	// DecorateWriter is optional, allows customization of the process that writes raw DNS messages. | ||||||
| 	DecorateWriter DecorateWriter | 	DecorateWriter DecorateWriter | ||||||
|  |  | ||||||
							
								
								
									
										3
									
								
								vendor/github.com/miekg/dns/sig0.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								vendor/github.com/miekg/dns/sig0.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -7,7 +7,6 @@ import ( | ||||||
| 	"crypto/rsa" | 	"crypto/rsa" | ||||||
| 	"encoding/binary" | 	"encoding/binary" | ||||||
| 	"math/big" | 	"math/big" | ||||||
| 	"strings" |  | ||||||
| 	"time" | 	"time" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
|  | @ -151,7 +150,7 @@ func (rr *SIG) Verify(k *KEY, buf []byte) error { | ||||||
| 	} | 	} | ||||||
| 	// If key has come from the DNS name compression might | 	// If key has come from the DNS name compression might | ||||||
| 	// have mangled the case of the name | 	// have mangled the case of the name | ||||||
| 	if !strings.EqualFold(signername, k.Header().Name) { | 	if !equal(signername, k.Header().Name) { | ||||||
| 		return &Error{err: "signer name doesn't match key name"} | 		return &Error{err: "signer name doesn't match key name"} | ||||||
| 	} | 	} | ||||||
| 	sigend := offset | 	sigend := offset | ||||||
|  |  | ||||||
							
								
								
									
										2
									
								
								vendor/github.com/miekg/dns/version.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/github.com/miekg/dns/version.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -3,7 +3,7 @@ package dns | ||||||
| import "fmt" | import "fmt" | ||||||
| 
 | 
 | ||||||
| // Version is current version of this library. | // Version is current version of this library. | ||||||
| var Version = v{1, 1, 62} | var Version = v{1, 1, 63} | ||||||
| 
 | 
 | ||||||
| // v holds the version of this library. | // v holds the version of this library. | ||||||
| type v struct { | type v struct { | ||||||
|  |  | ||||||
							
								
								
									
										2
									
								
								vendor/modules.txt
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/modules.txt
									
										
									
									
										vendored
									
									
								
							|  | @ -489,7 +489,7 @@ github.com/mattn/go-isatty | ||||||
| ## explicit; go 1.19 | ## explicit; go 1.19 | ||||||
| github.com/microcosm-cc/bluemonday | github.com/microcosm-cc/bluemonday | ||||||
| github.com/microcosm-cc/bluemonday/css | github.com/microcosm-cc/bluemonday/css | ||||||
| # github.com/miekg/dns v1.1.62 | # github.com/miekg/dns v1.1.63 | ||||||
| ## explicit; go 1.19 | ## explicit; go 1.19 | ||||||
| github.com/miekg/dns | github.com/miekg/dns | ||||||
| # github.com/minio/md5-simd v1.1.2 | # github.com/minio/md5-simd v1.1.2 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue