diff options
Diffstat (limited to 'pkg/tcpip/tests/integration/loopback_test.go')
-rw-r--r-- | pkg/tcpip/tests/integration/loopback_test.go | 208 |
1 files changed, 104 insertions, 104 deletions
diff --git a/pkg/tcpip/tests/integration/loopback_test.go b/pkg/tcpip/tests/integration/loopback_test.go index 0a9ea1aa8..6462e9d42 100644 --- a/pkg/tcpip/tests/integration/loopback_test.go +++ b/pkg/tcpip/tests/integration/loopback_test.go @@ -540,141 +540,141 @@ func TestExternalLoopbackTraffic(t *testing.T) { } tests := []struct { - name string - dropExternalLoopback bool - forwarding bool - rxICMP func(*channel.Endpoint) - invalidAddressStat func(tcpip.IPStats) *tcpip.StatCounter - shouldAccept bool + name string + allowExternalLoopback bool + forwarding bool + rxICMP func(*channel.Endpoint) + invalidAddressStat func(tcpip.IPStats) *tcpip.StatCounter + shouldAccept bool }{ { - name: "IPv4 external loopback sourced traffic without forwarding and drop external loopback disabled", - dropExternalLoopback: false, - forwarding: false, - rxICMP: loopbackSourcedICMPv4, - invalidAddressStat: invalidSrcAddrStat, - shouldAccept: true, + name: "IPv4 external loopback sourced traffic without forwarding and drop external loopback disabled", + allowExternalLoopback: true, + forwarding: false, + rxICMP: loopbackSourcedICMPv4, + invalidAddressStat: invalidSrcAddrStat, + shouldAccept: true, }, { - name: "IPv4 external loopback sourced traffic without forwarding and drop external loopback enabled", - dropExternalLoopback: true, - forwarding: false, - rxICMP: loopbackSourcedICMPv4, - invalidAddressStat: invalidSrcAddrStat, - shouldAccept: false, + name: "IPv4 external loopback sourced traffic without forwarding and drop external loopback enabled", + allowExternalLoopback: false, + forwarding: false, + rxICMP: loopbackSourcedICMPv4, + invalidAddressStat: invalidSrcAddrStat, + shouldAccept: false, }, { - name: "IPv4 external loopback sourced traffic with forwarding and drop external loopback disabled", - dropExternalLoopback: false, - forwarding: true, - rxICMP: loopbackSourcedICMPv4, - invalidAddressStat: invalidSrcAddrStat, - shouldAccept: true, + name: "IPv4 external loopback sourced traffic with forwarding and drop external loopback disabled", + allowExternalLoopback: true, + forwarding: true, + rxICMP: loopbackSourcedICMPv4, + invalidAddressStat: invalidSrcAddrStat, + shouldAccept: true, }, { - name: "IPv4 external loopback sourced traffic with forwarding and drop external loopback enabled", - dropExternalLoopback: true, - forwarding: true, - rxICMP: loopbackSourcedICMPv4, - invalidAddressStat: invalidSrcAddrStat, - shouldAccept: false, + name: "IPv4 external loopback sourced traffic with forwarding and drop external loopback enabled", + allowExternalLoopback: false, + forwarding: true, + rxICMP: loopbackSourcedICMPv4, + invalidAddressStat: invalidSrcAddrStat, + shouldAccept: false, }, { - name: "IPv4 external loopback destined traffic without forwarding and drop external loopback disabled", - dropExternalLoopback: false, - forwarding: false, - rxICMP: loopbackDestinedICMPv4, - invalidAddressStat: invalidDestAddrStat, - shouldAccept: false, + name: "IPv4 external loopback destined traffic without forwarding and drop external loopback disabled", + allowExternalLoopback: true, + forwarding: false, + rxICMP: loopbackDestinedICMPv4, + invalidAddressStat: invalidDestAddrStat, + shouldAccept: false, }, { - name: "IPv4 external loopback destined traffic without forwarding and drop external loopback enabled", - dropExternalLoopback: true, - forwarding: false, - rxICMP: loopbackDestinedICMPv4, - invalidAddressStat: invalidDestAddrStat, - shouldAccept: false, + name: "IPv4 external loopback destined traffic without forwarding and drop external loopback enabled", + allowExternalLoopback: false, + forwarding: false, + rxICMP: loopbackDestinedICMPv4, + invalidAddressStat: invalidDestAddrStat, + shouldAccept: false, }, { - name: "IPv4 external loopback destined traffic with forwarding and drop external loopback disabled", - dropExternalLoopback: false, - forwarding: true, - rxICMP: loopbackDestinedICMPv4, - invalidAddressStat: invalidDestAddrStat, - shouldAccept: true, + name: "IPv4 external loopback destined traffic with forwarding and drop external loopback disabled", + allowExternalLoopback: true, + forwarding: true, + rxICMP: loopbackDestinedICMPv4, + invalidAddressStat: invalidDestAddrStat, + shouldAccept: true, }, { - name: "IPv4 external loopback destined traffic with forwarding and drop external loopback enabled", - dropExternalLoopback: true, - forwarding: true, - rxICMP: loopbackDestinedICMPv4, - invalidAddressStat: invalidDestAddrStat, - shouldAccept: false, + name: "IPv4 external loopback destined traffic with forwarding and drop external loopback enabled", + allowExternalLoopback: false, + forwarding: true, + rxICMP: loopbackDestinedICMPv4, + invalidAddressStat: invalidDestAddrStat, + shouldAccept: false, }, { - name: "IPv6 external loopback sourced traffic without forwarding and drop external loopback disabled", - dropExternalLoopback: false, - forwarding: false, - rxICMP: loopbackSourcedICMPv6, - invalidAddressStat: invalidSrcAddrStat, - shouldAccept: true, + name: "IPv6 external loopback sourced traffic without forwarding and drop external loopback disabled", + allowExternalLoopback: true, + forwarding: false, + rxICMP: loopbackSourcedICMPv6, + invalidAddressStat: invalidSrcAddrStat, + shouldAccept: true, }, { - name: "IPv6 external loopback sourced traffic without forwarding and drop external loopback enabled", - dropExternalLoopback: true, - forwarding: false, - rxICMP: loopbackSourcedICMPv6, - invalidAddressStat: invalidSrcAddrStat, - shouldAccept: false, + name: "IPv6 external loopback sourced traffic without forwarding and drop external loopback enabled", + allowExternalLoopback: false, + forwarding: false, + rxICMP: loopbackSourcedICMPv6, + invalidAddressStat: invalidSrcAddrStat, + shouldAccept: false, }, { - name: "IPv6 external loopback sourced traffic with forwarding and drop external loopback disabled", - dropExternalLoopback: false, - forwarding: true, - rxICMP: loopbackSourcedICMPv6, - invalidAddressStat: invalidSrcAddrStat, - shouldAccept: true, + name: "IPv6 external loopback sourced traffic with forwarding and drop external loopback disabled", + allowExternalLoopback: true, + forwarding: true, + rxICMP: loopbackSourcedICMPv6, + invalidAddressStat: invalidSrcAddrStat, + shouldAccept: true, }, { - name: "IPv6 external loopback sourced traffic with forwarding and drop external loopback enabled", - dropExternalLoopback: true, - forwarding: true, - rxICMP: loopbackSourcedICMPv6, - invalidAddressStat: invalidSrcAddrStat, - shouldAccept: false, + name: "IPv6 external loopback sourced traffic with forwarding and drop external loopback enabled", + allowExternalLoopback: false, + forwarding: true, + rxICMP: loopbackSourcedICMPv6, + invalidAddressStat: invalidSrcAddrStat, + shouldAccept: false, }, { - name: "IPv6 external loopback destined traffic without forwarding and drop external loopback disabled", - dropExternalLoopback: false, - forwarding: false, - rxICMP: loopbackDestinedICMPv6, - invalidAddressStat: invalidDestAddrStat, - shouldAccept: false, + name: "IPv6 external loopback destined traffic without forwarding and drop external loopback disabled", + allowExternalLoopback: true, + forwarding: false, + rxICMP: loopbackDestinedICMPv6, + invalidAddressStat: invalidDestAddrStat, + shouldAccept: false, }, { - name: "IPv6 external loopback destined traffic without forwarding and drop external loopback enabled", - dropExternalLoopback: true, - forwarding: false, - rxICMP: loopbackDestinedICMPv6, - invalidAddressStat: invalidDestAddrStat, - shouldAccept: false, + name: "IPv6 external loopback destined traffic without forwarding and drop external loopback enabled", + allowExternalLoopback: false, + forwarding: false, + rxICMP: loopbackDestinedICMPv6, + invalidAddressStat: invalidDestAddrStat, + shouldAccept: false, }, { - name: "IPv6 external loopback destined traffic with forwarding and drop external loopback disabled", - dropExternalLoopback: false, - forwarding: true, - rxICMP: loopbackDestinedICMPv6, - invalidAddressStat: invalidDestAddrStat, - shouldAccept: true, + name: "IPv6 external loopback destined traffic with forwarding and drop external loopback disabled", + allowExternalLoopback: true, + forwarding: true, + rxICMP: loopbackDestinedICMPv6, + invalidAddressStat: invalidDestAddrStat, + shouldAccept: true, }, { - name: "IPv6 external loopback destined traffic with forwarding and drop external loopback enabled", - dropExternalLoopback: true, - forwarding: true, - rxICMP: loopbackDestinedICMPv6, - invalidAddressStat: invalidDestAddrStat, - shouldAccept: false, + name: "IPv6 external loopback destined traffic with forwarding and drop external loopback enabled", + allowExternalLoopback: false, + forwarding: true, + rxICMP: loopbackDestinedICMPv6, + invalidAddressStat: invalidDestAddrStat, + shouldAccept: false, }, } @@ -683,10 +683,10 @@ func TestExternalLoopbackTraffic(t *testing.T) { s := stack.New(stack.Options{ NetworkProtocols: []stack.NetworkProtocolFactory{ ipv4.NewProtocolWithOptions(ipv4.Options{ - DropExternalLoopbackTraffic: test.dropExternalLoopback, + AllowExternalLoopbackTraffic: test.allowExternalLoopback, }), ipv6.NewProtocolWithOptions(ipv6.Options{ - DropExternalLoopbackTraffic: test.dropExternalLoopback, + AllowExternalLoopbackTraffic: test.allowExternalLoopback, }), }, TransportProtocols: []stack.TransportProtocolFactory{icmp.NewProtocol4, icmp.NewProtocol6}, |