run hack/update-netparse-cve.sh
This commit is contained in:
@@ -20,11 +20,12 @@ package ipvs
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"reflect"
|
||||
"syscall"
|
||||
"testing"
|
||||
|
||||
netutils "k8s.io/utils/net"
|
||||
|
||||
libipvs "github.com/moby/ipvs"
|
||||
)
|
||||
|
||||
@@ -65,7 +66,7 @@ func Test_toVirtualServer(t *testing.T) {
|
||||
PEName: "",
|
||||
},
|
||||
VirtualServer{
|
||||
Address: net.ParseIP("0.0.0.0"),
|
||||
Address: netutils.ParseIPSloppy("0.0.0.0"),
|
||||
Protocol: "TCP",
|
||||
Port: 80,
|
||||
Scheduler: "",
|
||||
@@ -85,11 +86,11 @@ func Test_toVirtualServer(t *testing.T) {
|
||||
Timeout: 100,
|
||||
Netmask: 128,
|
||||
AddressFamily: syscall.AF_INET6,
|
||||
Address: net.ParseIP("2012::beef"),
|
||||
Address: netutils.ParseIPSloppy("2012::beef"),
|
||||
PEName: "",
|
||||
},
|
||||
VirtualServer{
|
||||
Address: net.ParseIP("2012::beef"),
|
||||
Address: netutils.ParseIPSloppy("2012::beef"),
|
||||
Protocol: "UDP",
|
||||
Port: 33434,
|
||||
Scheduler: "wlc",
|
||||
@@ -109,11 +110,11 @@ func Test_toVirtualServer(t *testing.T) {
|
||||
Timeout: 0,
|
||||
Netmask: 0xffffffff,
|
||||
AddressFamily: syscall.AF_INET,
|
||||
Address: net.ParseIP("1.2.3.4"),
|
||||
Address: netutils.ParseIPSloppy("1.2.3.4"),
|
||||
PEName: "",
|
||||
},
|
||||
VirtualServer{
|
||||
Address: net.ParseIP("1.2.3.4"),
|
||||
Address: netutils.ParseIPSloppy("1.2.3.4"),
|
||||
Protocol: "",
|
||||
Port: 0,
|
||||
Scheduler: "lc",
|
||||
@@ -137,7 +138,7 @@ func Test_toVirtualServer(t *testing.T) {
|
||||
PEName: "",
|
||||
},
|
||||
VirtualServer{
|
||||
Address: net.ParseIP("::0"),
|
||||
Address: netutils.ParseIPSloppy("::0"),
|
||||
Protocol: "",
|
||||
Port: 0,
|
||||
Scheduler: "wrr",
|
||||
@@ -161,7 +162,7 @@ func Test_toVirtualServer(t *testing.T) {
|
||||
PEName: "",
|
||||
},
|
||||
VirtualServer{
|
||||
Address: net.ParseIP("0.0.0.0"),
|
||||
Address: netutils.ParseIPSloppy("0.0.0.0"),
|
||||
Protocol: "SCTP",
|
||||
Port: 80,
|
||||
Scheduler: "",
|
||||
@@ -204,11 +205,11 @@ func Test_toIPVSService(t *testing.T) {
|
||||
Timeout: 0,
|
||||
Netmask: 0xffffffff,
|
||||
AddressFamily: syscall.AF_INET,
|
||||
Address: net.ParseIP("0.0.0.0"),
|
||||
Address: netutils.ParseIPSloppy("0.0.0.0"),
|
||||
PEName: "",
|
||||
},
|
||||
VirtualServer{
|
||||
Address: net.ParseIP("0.0.0.0"),
|
||||
Address: netutils.ParseIPSloppy("0.0.0.0"),
|
||||
Protocol: "TCP",
|
||||
Port: 80,
|
||||
Scheduler: "",
|
||||
@@ -226,11 +227,11 @@ func Test_toIPVSService(t *testing.T) {
|
||||
Timeout: 100,
|
||||
Netmask: 128,
|
||||
AddressFamily: syscall.AF_INET6,
|
||||
Address: net.ParseIP("2012::beef"),
|
||||
Address: netutils.ParseIPSloppy("2012::beef"),
|
||||
PEName: "",
|
||||
},
|
||||
VirtualServer{
|
||||
Address: net.ParseIP("2012::beef"),
|
||||
Address: netutils.ParseIPSloppy("2012::beef"),
|
||||
Protocol: "UDP",
|
||||
Port: 33434,
|
||||
Scheduler: "wlc",
|
||||
@@ -248,11 +249,11 @@ func Test_toIPVSService(t *testing.T) {
|
||||
Timeout: 0,
|
||||
Netmask: 0xffffffff,
|
||||
AddressFamily: syscall.AF_INET,
|
||||
Address: net.ParseIP("1.2.3.4"),
|
||||
Address: netutils.ParseIPSloppy("1.2.3.4"),
|
||||
PEName: "",
|
||||
},
|
||||
VirtualServer{
|
||||
Address: net.ParseIP("1.2.3.4"),
|
||||
Address: netutils.ParseIPSloppy("1.2.3.4"),
|
||||
Protocol: "",
|
||||
Port: 0,
|
||||
Scheduler: "lc",
|
||||
@@ -270,11 +271,11 @@ func Test_toIPVSService(t *testing.T) {
|
||||
Timeout: 0,
|
||||
Netmask: 128,
|
||||
AddressFamily: syscall.AF_INET6,
|
||||
Address: net.ParseIP("::0"),
|
||||
Address: netutils.ParseIPSloppy("::0"),
|
||||
PEName: "",
|
||||
},
|
||||
VirtualServer{
|
||||
Address: net.ParseIP("::0"),
|
||||
Address: netutils.ParseIPSloppy("::0"),
|
||||
Protocol: "",
|
||||
Port: 0,
|
||||
Scheduler: "wrr",
|
||||
@@ -305,10 +306,10 @@ func Test_toRealServer(t *testing.T) {
|
||||
Port: 54321,
|
||||
ConnectionFlags: 0,
|
||||
Weight: 1,
|
||||
Address: net.ParseIP("1.2.3.4"),
|
||||
Address: netutils.ParseIPSloppy("1.2.3.4"),
|
||||
},
|
||||
RealServer{
|
||||
Address: net.ParseIP("1.2.3.4"),
|
||||
Address: netutils.ParseIPSloppy("1.2.3.4"),
|
||||
Port: 54321,
|
||||
Weight: 1,
|
||||
},
|
||||
@@ -318,10 +319,10 @@ func Test_toRealServer(t *testing.T) {
|
||||
Port: 53,
|
||||
ConnectionFlags: 0,
|
||||
Weight: 1,
|
||||
Address: net.ParseIP("2002::cafe"),
|
||||
Address: netutils.ParseIPSloppy("2002::cafe"),
|
||||
},
|
||||
RealServer{
|
||||
Address: net.ParseIP("2002::cafe"),
|
||||
Address: netutils.ParseIPSloppy("2002::cafe"),
|
||||
Port: 53,
|
||||
Weight: 1,
|
||||
},
|
||||
@@ -345,7 +346,7 @@ func Test_toIPVSDestination(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
RealServer{
|
||||
Address: net.ParseIP("1.2.3.4"),
|
||||
Address: netutils.ParseIPSloppy("1.2.3.4"),
|
||||
Port: 54321,
|
||||
Weight: 1,
|
||||
},
|
||||
@@ -353,12 +354,12 @@ func Test_toIPVSDestination(t *testing.T) {
|
||||
Port: 54321,
|
||||
ConnectionFlags: 0,
|
||||
Weight: 1,
|
||||
Address: net.ParseIP("1.2.3.4"),
|
||||
Address: netutils.ParseIPSloppy("1.2.3.4"),
|
||||
},
|
||||
},
|
||||
{
|
||||
RealServer{
|
||||
Address: net.ParseIP("2002::cafe"),
|
||||
Address: netutils.ParseIPSloppy("2002::cafe"),
|
||||
Port: 53,
|
||||
Weight: 1,
|
||||
},
|
||||
@@ -366,7 +367,7 @@ func Test_toIPVSDestination(t *testing.T) {
|
||||
Port: 53,
|
||||
ConnectionFlags: 0,
|
||||
Weight: 1,
|
||||
Address: net.ParseIP("2002::cafe"),
|
||||
Address: netutils.ParseIPSloppy("2002::cafe"),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user