telize

High performance JSON IP and GeoIP REST API (IP Geolocation)
Log | Files | Refs | README | LICENSE

commit 532ce9bfa2e70471fce693a118f7abe00c1f7d2a
parent a8d52c8d30f5ff5197b574a6969a4141c777cca6
Author: Joris Vink <joris@coders.se>
Date:   Thu, 29 Nov 2018 13:17:58 +0100

Use the correct pointer.

Diffstat:
Msrc/utils.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/utils.c b/src/utils.c @@ -94,7 +94,7 @@ telize_request_ip(struct http_request *req, char *buf, size_t len) memcpy(buf, hdr_ip, hdr_len); buf[hdr_len] = '\0'; - if (inet_pton(AF_INET, buf, &req->owner->addr) == -1) { + if (inet_pton(AF_INET, buf, addr) == -1) { if (inet_pton(AF_INET6, buf, &req->owner->addr) == -1) { kore_log(LOG_ERR, "Malformed IP in X-Forwarded-For"); return (KORE_RESULT_ERROR);