Merge pull request #923 from disconnect3d/patch-2
net_linux.go: decode port as uint16 instead of int64
This commit is contained in:
commit
c4663018cc
|
@ -696,7 +696,7 @@ func decodeAddress(family uint32, src string) (Addr, error) {
|
||||||
return Addr{}, fmt.Errorf("does not contain port, %s", src)
|
return Addr{}, fmt.Errorf("does not contain port, %s", src)
|
||||||
}
|
}
|
||||||
addr := t[0]
|
addr := t[0]
|
||||||
port, err := strconv.ParseInt("0x"+t[1], 0, 64)
|
port, err := strconv.ParseUint(t[1], 16, 16)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return Addr{}, fmt.Errorf("invalid port, %s", src)
|
return Addr{}, fmt.Errorf("invalid port, %s", src)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue