From fa399a91d5da9874cbf248e00db8dbd87b587e91 Mon Sep 17 00:00:00 2001 From: Mathias Hall-Andersen Date: Fri, 17 Nov 2017 17:25:45 +0100 Subject: Ported remaining netns.sh - Ported remaining netns.sh tests - Begin work on generic implementation of bind interface --- src/cookie_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/cookie_test.go') 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") } -- cgit v1.2.3