chore: using uint16 for ports in Metadata

This commit is contained in:
wwqgtxx
2023-08-09 13:51:02 +08:00
parent bad9f2e6dc
commit e2e0fd4eba
16 changed files with 84 additions and 79 deletions

View File

@ -457,12 +457,10 @@ func NewAddress(metadata *C.Metadata) Address {
copy(addr[1:], metadata.Host)
}
port, _ := strconv.ParseUint(metadata.DstPort, 10, 16)
return Address{
TYPE: addrType,
ADDR: addr,
PORT: uint16(port),
PORT: metadata.DstPort,
}
}