From d2802ce6068e5e9296e7b9a06a9c82e18ca23972 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Sat, 15 Jul 2023 08:18:08 -0400 Subject: fnettrace cleanup --- src/fnettrace/hostnames.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/fnettrace/hostnames.c') diff --git a/src/fnettrace/hostnames.c b/src/fnettrace/hostnames.c index 20c83803f..7cb34e2c4 100644 --- a/src/fnettrace/hostnames.c +++ b/src/fnettrace/hostnames.c @@ -50,12 +50,13 @@ char *retrieve_hostname(uint32_t ip) { ptr = buf + 22; if (*ptr == ' ' && *(ptr + 3) == ',' && *(ptr + 4) == ' ') { rv = ptr + 5; - rv = radix_add(ip, 0xffffffff, rv); + if (strcmp(rv, "United States") == 0) + rv = "US"; } } } pclose(fp); - return rv; + return strdup(rv); } else geoip_not_found = 1; -- cgit v1.2.3-54-g00ecf