Skip to content

Commit d7f297a

Browse files
authored
Merge pull request #3722 from stek29/patch-1
rename UDPEstablished to UDPUnconnected
2 parents 50bb714 + 2cd7d3a commit d7f297a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pkg/guestagent/guestagent_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ func (a *agent) LocalPorts(_ context.Context) ([]*api.IPPort, error) {
237237
})
238238
}
239239
case procnettcp.UDP, procnettcp.UDP6:
240-
if f.State == procnettcp.UDPEstablished {
240+
if f.State == procnettcp.UDPUnconnected {
241241
res = append(res,
242242
&api.IPPort{
243243
Ip: f.IP.String(),

pkg/guestagent/procnettcp/procnettcp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type State = int
3131
const (
3232
TCPEstablished State = 0x1
3333
TCPListen State = 0xA
34-
UDPEstablished State = 0x7
34+
UDPUnconnected State = 0x7
3535
)
3636

3737
type Entry struct {

pkg/guestagent/procnettcp/procnettcp_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func TestParseUDP(t *testing.T) {
7777

7878
assert.Check(t, net.ParseIP("127.0.0.54").Equal(entries[0].IP))
7979
assert.Equal(t, uint16(53), entries[0].Port)
80-
assert.Equal(t, UDPEstablished, entries[0].State)
80+
assert.Equal(t, UDPUnconnected, entries[0].State)
8181
}
8282

8383
func TestParseAddress(t *testing.T) {

0 commit comments

Comments
 (0)