Skip to content

Commit

Permalink
use the correct name
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuho committed Dec 2, 2024
1 parent 6061460 commit bad3e62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions include/picotls.h
Original file line number Diff line number Diff line change
Expand Up @@ -1983,7 +1983,7 @@ char *ptls_jsonescape(char *buf, const char *s, size_t len);
/**
* builds a v4-mapped address (i.e., ::ffff:192.0.2.1)
*/
static void ptls_build_mapped_v4_address(struct in6_addr *v6, const struct in_addr *v4);
static void ptls_build_v4_mapped_v6_address(struct in6_addr *v6, const struct in_addr *v4);

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

inline void ptls_build_mapped_v4_address(struct in6_addr *v6, const struct in_addr *v4)
inline void ptls_build_v4_mapped_v6_address(struct in6_addr *v6, const struct in_addr *v4)
{
*v6 = (struct in6_addr){.s6_addr[10] = 0xff, .s6_addr[11] = 0xff};
memcpy(&v6->s6_addr[12], &v4->s_addr, 4);
Expand Down
2 changes: 1 addition & 1 deletion lib/picotls.c
Original file line number Diff line number Diff line change
Expand Up @@ -7027,7 +7027,7 @@ int ptls_log_add_fd(int fd, float sample_ratio, const char *_points, const char
struct in_addr v4;
if (!inet_pton(AF_INET, input, &v4))
continue;
ptls_build_mapped_v4_address(&addresses[index], &v4);
ptls_build_v4_mapped_v6_address(&addresses[index], &v4);
}
if (memcmp(&addresses[index], &in6addr_any, sizeof(struct in6_addr)) == 0)
continue;
Expand Down

0 comments on commit bad3e62

Please sign in to comment.