Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TrackerClient.listStorages协议传参最大长度和服务端不太符合 #110

Open
HotSince91 opened this issue Jan 10, 2024 · 0 comments

Comments

@HotSince91
Copy link

TrackerClient.listStorages 第三个参数storageIpAddr,似乎在tracker服务端是指storageId。不支持ipv6之前 id的最大长度和ip最大长度一致,所以没有问题,支持ipv6之后,ip最长长度变成46,而id还是16,客户端如果传入ipv6地址,会传更大的协议包体,服务端会解析失败。

607行最大长度是不是限制下改成FDFS_STORAGE_ID_MAX_SIZE

if (bIpAddr.length < ProtoCommon.FDFS_IPADDR_SIZE) {
ipAddrLen = bIpAddr.length;
} else {
ipAddrLen = ProtoCommon.FDFS_IPADDR_SIZE - 1;

https://github.com/happyfish100/fastdfs/blob/030520cb3aad56004e92ab097fc6f1e0a10c652e/tracker/tracker_service.c#L2155-L2168

1704872715548

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant