Fix getting udp6 ports

This commit is contained in:
MashaSamoylova 2020-11-03 18:33:58 +07:00
parent a1e77476b2
commit 860f332c22
2 changed files with 2 additions and 2 deletions

View File

@ -547,7 +547,7 @@ func getUDPConnections(family uint32) ([]ConnectionStat, error) {
mibs := (*mibUDPRowOwnerPid)(unsafe.Pointer(&buf[index]))
ns := mibs.convertToConnectionStat()
stats = append(stats, ns)
case kindUDP4.family:
case kindUDP6.family:
mibs := (*mibUDP6RowOwnerPid)(unsafe.Pointer(&buf[index]))
ns := mibs.convertToConnectionStat()
stats = append(stats, ns)

View File

@ -547,7 +547,7 @@ func getUDPConnections(family uint32) ([]ConnectionStat, error) {
mibs := (*mibUDPRowOwnerPid)(unsafe.Pointer(&buf[index]))
ns := mibs.convertToConnectionStat()
stats = append(stats, ns)
case kindUDP4.family:
case kindUDP6.family:
mibs := (*mibUDP6RowOwnerPid)(unsafe.Pointer(&buf[index]))
ns := mibs.convertToConnectionStat()
stats = append(stats, ns)