summaryrefslogtreecommitdiff
path: root/vendor/github.com/miekg/dns/zduplicate.go
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2023-02-27 10:51:12 +0100
committerLibravatar GitHub <noreply@github.com>2023-02-27 10:51:12 +0100
commit8696a8cdf0ecb6ae6b324dc4b9d691aa398c06da (patch)
tree3759ea8648cdd8575b8af0259572b966cfccc638 /vendor/github.com/miekg/dns/zduplicate.go
parent[chore] Better diff for envparsing test (#1562) (diff)
downloadgotosocial-8696a8cdf0ecb6ae6b324dc4b9d691aa398c06da.tar.xz
[chore]: Bump github.com/miekg/dns from 1.1.50 to 1.1.51 (#1566)
Bumps [github.com/miekg/dns](https://github.com/miekg/dns) from 1.1.50 to 1.1.51. - [Release notes](https://github.com/miekg/dns/releases) - [Changelog](https://github.com/miekg/dns/blob/master/Makefile.release) - [Commits](https://github.com/miekg/dns/compare/v1.1.50...v1.1.51) --- 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>
Diffstat (limited to 'vendor/github.com/miekg/dns/zduplicate.go')
-rw-r--r--vendor/github.com/miekg/dns/zduplicate.go58
1 files changed, 58 insertions, 0 deletions
diff --git a/vendor/github.com/miekg/dns/zduplicate.go b/vendor/github.com/miekg/dns/zduplicate.go
index 9eb1dac29..450bbbc29 100644
--- a/vendor/github.com/miekg/dns/zduplicate.go
+++ b/vendor/github.com/miekg/dns/zduplicate.go
@@ -43,6 +43,32 @@ func (r1 *AFSDB) isDuplicate(_r2 RR) bool {
return true
}
+func (r1 *AMTRELAY) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*AMTRELAY)
+ if !ok {
+ return false
+ }
+ _ = r2
+ if r1.Precedence != r2.Precedence {
+ return false
+ }
+ if r1.GatewayType != r2.GatewayType {
+ return false
+ }
+ switch r1.GatewayType {
+ case IPSECGatewayIPv4, IPSECGatewayIPv6:
+ if !r1.GatewayAddr.Equal(r2.GatewayAddr) {
+ return false
+ }
+ case IPSECGatewayHost:
+ if !isDuplicateName(r1.GatewayHost, r2.GatewayHost) {
+ return false
+ }
+ }
+
+ return true
+}
+
func (r1 *ANY) isDuplicate(_r2 RR) bool {
r2, ok := _r2.(*ANY)
if !ok {
@@ -423,6 +449,38 @@ func (r1 *HTTPS) isDuplicate(_r2 RR) bool {
return true
}
+func (r1 *IPSECKEY) isDuplicate(_r2 RR) bool {
+ r2, ok := _r2.(*IPSECKEY)
+ if !ok {
+ return false
+ }
+ _ = r2
+ if r1.Precedence != r2.Precedence {
+ return false
+ }
+ if r1.GatewayType != r2.GatewayType {
+ return false
+ }
+ if r1.Algorithm != r2.Algorithm {
+ return false
+ }
+ switch r1.GatewayType {
+ case IPSECGatewayIPv4, IPSECGatewayIPv6:
+ if !r1.GatewayAddr.Equal(r2.GatewayAddr) {
+ return false
+ }
+ case IPSECGatewayHost:
+ if !isDuplicateName(r1.GatewayHost, r2.GatewayHost) {
+ return false
+ }
+ }
+
+ if r1.PublicKey != r2.PublicKey {
+ return false
+ }
+ return true
+}
+
func (r1 *KEY) isDuplicate(_r2 RR) bool {
r2, ok := _r2.(*KEY)
if !ok {