Skip to content

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

Description

@HotSince91

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions