Skip to content

Commit 832ed55

Browse files
committed
Fixed udp_networkflow.go
1 parent 99a81ba commit 832ed55

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

integration-tests/suites/udp_networkflow.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"time"
77

88
sensorAPI "github.com/stackrox/rox/generated/internalapi/sensor"
9+
"github.com/stackrox/rox/generated/storage"
910

1011
"github.com/stackrox/collector/integration-tests/pkg/collector"
1112
"github.com/stackrox/collector/integration-tests/pkg/common"
@@ -129,7 +130,7 @@ func (s *UdpNetworkFlow) runTest(image, recv, send string, port uint32) {
129130
serverConnection := &sensorAPI.NetworkConnection{
130131
LocalAddress: types.CreateNetworkAddress("", "", server.port),
131132
RemoteAddress: types.CreateNetworkAddress(client.ip, "", 0),
132-
Role: sensorAPI.ClientServerRole_ROLE_CLIENT,
133+
Role: sensorAPI.ClientServerRole_ROLE_SERVER,
133134
SocketFamily: sensorAPI.SocketFamily_SOCKET_FAMILY_UNKNOWN,
134135
CloseTimestamp: nil,
135136
}
@@ -157,6 +158,7 @@ func (s *UdpNetworkFlow) TestMultipleDestinations() {
157158
clientConnections[i] = &sensorAPI.NetworkConnection{
158159
LocalAddress: types.CreateNetworkAddress("", "", 0),
159160
RemoteAddress: types.CreateNetworkAddress(servers[i].ip, "", servers[i].port),
161+
Protocol: storage.L4Protocol_L4_PROTOCOL_UDP,
160162
Role: sensorAPI.ClientServerRole_ROLE_CLIENT,
161163
SocketFamily: sensorAPI.SocketFamily_SOCKET_FAMILY_UNKNOWN,
162164
CloseTimestamp: nil,
@@ -178,7 +180,8 @@ func (s *UdpNetworkFlow) TestMultipleDestinations() {
178180
serverConnection := &sensorAPI.NetworkConnection{
179181
LocalAddress: types.CreateNetworkAddress("", "", server.port),
180182
RemoteAddress: types.CreateNetworkAddress(client.ip, "", 0),
181-
Role: sensorAPI.ClientServerRole_ROLE_CLIENT,
183+
Protocol: storage.L4Protocol_L4_PROTOCOL_UDP,
184+
Role: sensorAPI.ClientServerRole_ROLE_SERVER,
182185
SocketFamily: sensorAPI.SocketFamily_SOCKET_FAMILY_UNKNOWN,
183186
CloseTimestamp: nil,
184187
}
@@ -214,7 +217,8 @@ func (s *UdpNetworkFlow) TestMultipleSources() {
214217
serverConnections[i] = &sensorAPI.NetworkConnection{
215218
LocalAddress: types.CreateNetworkAddress("", "", server.port),
216219
RemoteAddress: types.CreateNetworkAddress(clients[i].ip, "", 0),
217-
Role: sensorAPI.ClientServerRole_ROLE_CLIENT,
220+
Protocol: storage.L4Protocol_L4_PROTOCOL_UDP,
221+
Role: sensorAPI.ClientServerRole_ROLE_SERVER,
218222
SocketFamily: sensorAPI.SocketFamily_SOCKET_FAMILY_UNKNOWN,
219223
CloseTimestamp: nil,
220224
}
@@ -223,6 +227,7 @@ func (s *UdpNetworkFlow) TestMultipleSources() {
223227
clientConnection := &sensorAPI.NetworkConnection{
224228
LocalAddress: types.CreateNetworkAddress("", "", 0),
225229
RemoteAddress: types.CreateNetworkAddress(server.ip, "", server.port),
230+
Protocol: storage.L4Protocol_L4_PROTOCOL_UDP,
226231
Role: sensorAPI.ClientServerRole_ROLE_CLIENT,
227232
SocketFamily: sensorAPI.SocketFamily_SOCKET_FAMILY_UNKNOWN,
228233
CloseTimestamp: nil,

0 commit comments

Comments
 (0)