Github user zwoop commented on the pull request: https://github.com/apache/trafficserver/pull/643#issuecomment-219486264 One more thing: This seems to only be for IPv4. I think we should support both v4 and v6, so in addition to the code that is here to be modified for IPv6, we also have to bump up the max length accordingly. I'd be fine with just bumping it up to 39, or 46, or perhaps INET6_ADDRSTRLEN (is that cross platform) ?). E.g. diff --git a/plugins/regex_remap/regex_remap.cc b/plugins/regex_remap/regex_remap.cc index ad973ce..4ef0daf 100644 --- a/plugins/regex_remap/regex_remap.cc +++ b/plugins/regex_remap/regex_remap.cc @@ -532,7 +532,7 @@ RemapRegex::get_lengths(const int ovector[], int lengths[], TSRemapRequestInfo * len += req_url->matrix_len; break; case SUB_CLIENT_IP: - len += 15; // Allow for 255.255.255.255 + len += INET6_ADDRSTRLEN; /* is this cross platform? */ break; default: break;
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---