From 2fa7c464f019f67c5c0494aaf5ac0f5ecc1ee7a7 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Tue, 16 Jan 2018 12:03:31 -0500 Subject: Updated dependencies and added avct/uasurfer (#8089) * Updated dependencies and added avct/uasurfer * Added uasurfer to NOTICE.txt --- vendor/github.com/miekg/dns/udp_linux_test.go | 68 --------------------------- 1 file changed, 68 deletions(-) delete mode 100644 vendor/github.com/miekg/dns/udp_linux_test.go (limited to 'vendor/github.com/miekg/dns/udp_linux_test.go') diff --git a/vendor/github.com/miekg/dns/udp_linux_test.go b/vendor/github.com/miekg/dns/udp_linux_test.go deleted file mode 100644 index 14a8acefd..000000000 --- a/vendor/github.com/miekg/dns/udp_linux_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// +build linux,!appengine - -package dns - -import ( - "bytes" - "net" - "testing" -) - -func TestParseUDPSocketDst(t *testing.T) { - // dst is :ffff:100.100.100.100 - oob := []byte{36, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 100, 100, 100, 100, 2, 0, 0, 0} - dst, err := parseUDPSocketDst(oob) - if err != nil { - t.Fatalf("error parsing ipv6 oob: %v", err) - } - dst4 := dst.To4() - if dst4 == nil { - t.Errorf("failed to parse ipv4: %v", dst) - } else if dst4.String() != "100.100.100.100" { - t.Errorf("unexpected ipv4: %v", dst4) - } - - // dst is 2001:db8::1 - oob = []byte{36, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 50, 0, 0, 0, 32, 1, 13, 184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0} - dst, err = parseUDPSocketDst(oob) - if err != nil { - t.Fatalf("error parsing ipv6 oob: %v", err) - } - dst6 := dst.To16() - if dst6 == nil { - t.Errorf("failed to parse ipv6: %v", dst) - } else if dst6.String() != "2001:db8::1" { - t.Errorf("unexpected ipv6: %v", dst4) - } - - // dst is 100.100.100.100 but was received on 10.10.10.10 - oob = []byte{28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, 10, 10, 10, 10, 100, 100, 100, 100, 0, 0, 0, 0} - dst, err = parseUDPSocketDst(oob) - if err != nil { - t.Fatalf("error parsing ipv4 oob: %v", err) - } - dst4 = dst.To4() - if dst4 == nil { - t.Errorf("failed to parse ipv4: %v", dst) - } else if dst4.String() != "100.100.100.100" { - t.Errorf("unexpected ipv4: %v", dst4) - } -} - -func TestMarshalUDPSocketSrc(t *testing.T) { - // src is 100.100.100.100 - exoob := []byte{28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 100, 100, 100, 100, 0, 0, 0, 0, 0, 0, 0, 0} - oob := marshalUDPSocketSrc(net.ParseIP("100.100.100.100")) - if !bytes.Equal(exoob, oob) { - t.Errorf("expected ipv4 oob:\n%v", exoob) - t.Errorf("actual ipv4 oob:\n%v", oob) - } - - // src is 2001:db8::1 - exoob = []byte{36, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 50, 0, 0, 0, 32, 1, 13, 184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0} - oob = marshalUDPSocketSrc(net.ParseIP("2001:db8::1")) - if !bytes.Equal(exoob, oob) { - t.Errorf("expected ipv6 oob:\n%v", exoob) - t.Errorf("actual ipv6 oob:\n%v", oob) - } -} -- cgit v1.2.3-1-g7c22