summaryrefslogtreecommitdiffhomepage
path: root/src/cookie_test.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2017-11-17 17:25:45 +0100
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2017-11-17 17:25:58 +0100
commitfa399a91d5da9874cbf248e00db8dbd87b587e91 (patch)
tree8aaca42f4a3cc11666c12d5077e8ed5ac35200a8 /src/cookie_test.go
parente1227d3af480eae72639cde842b4d538c58936dc (diff)
Ported remaining netns.sh
- Ported remaining netns.sh tests - Begin work on generic implementation of bind interface
Diffstat (limited to 'src/cookie_test.go')
-rw-r--r--src/cookie_test.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cookie_test.go b/src/cookie_test.go
index 193a76e..d745fe7 100644
--- a/src/cookie_test.go
+++ b/src/cookie_test.go
@@ -1,7 +1,6 @@
package main
import (
- "net"
"testing"
)
@@ -25,7 +24,7 @@ func TestCookieMAC1(t *testing.T) {
// check mac1
- src, _ := net.ResolveUDPAddr("udp", "192.168.13.37:4000")
+ src := []byte{192, 168, 13, 37, 10, 10, 10}
checkMAC1 := func(msg []byte) {
generator.AddMacs(msg)
@@ -128,12 +127,12 @@ func TestCookieMAC1(t *testing.T) {
msg[5] ^= 0x20
- srcBad1, _ := net.ResolveUDPAddr("udp", "192.168.13.37:4001")
+ srcBad1 := []byte{192, 168, 13, 37, 40, 01}
if checker.CheckMAC2(msg, srcBad1) {
t.Fatal("MAC2 generation/verification failed")
}
- srcBad2, _ := net.ResolveUDPAddr("udp", "192.168.13.38:4000")
+ srcBad2 := []byte{192, 168, 13, 38, 40, 01}
if checker.CheckMAC2(msg, srcBad2) {
t.Fatal("MAC2 generation/verification failed")
}