Skip to content

Commit bad3e62

Browse files
committed
use the correct name
1 parent 6061460 commit bad3e62

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/picotls.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1983,7 +1983,7 @@ char *ptls_jsonescape(char *buf, const char *s, size_t len);
19831983
/**
19841984
* builds a v4-mapped address (i.e., ::ffff:192.0.2.1)
19851985
*/
1986-
static void ptls_build_mapped_v4_address(struct in6_addr *v6, const struct in_addr *v4);
1986+
static void ptls_build_v4_mapped_v6_address(struct in6_addr *v6, const struct in_addr *v4);
19871987

19881988
/**
19891989
* the default get_time callback
@@ -2160,7 +2160,7 @@ inline size_t ptls_aead_decrypt(ptls_aead_context_t *ctx, void *output, const vo
21602160
return ctx->do_decrypt(ctx, output, input, inlen, seq, aad, aadlen);
21612161
}
21622162

2163-
inline void ptls_build_mapped_v4_address(struct in6_addr *v6, const struct in_addr *v4)
2163+
inline void ptls_build_v4_mapped_v6_address(struct in6_addr *v6, const struct in_addr *v4)
21642164
{
21652165
*v6 = (struct in6_addr){.s6_addr[10] = 0xff, .s6_addr[11] = 0xff};
21662166
memcpy(&v6->s6_addr[12], &v4->s_addr, 4);

lib/picotls.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -7027,7 +7027,7 @@ int ptls_log_add_fd(int fd, float sample_ratio, const char *_points, const char
70277027
struct in_addr v4;
70287028
if (!inet_pton(AF_INET, input, &v4))
70297029
continue;
7030-
ptls_build_mapped_v4_address(&addresses[index], &v4);
7030+
ptls_build_v4_mapped_v6_address(&addresses[index], &v4);
70317031
}
70327032
if (memcmp(&addresses[index], &in6addr_any, sizeof(struct in6_addr)) == 0)
70337033
continue;

0 commit comments

Comments
 (0)