diff options
Diffstat (limited to 'src/fnettrace/hostnames.c')
-rw-r--r-- | src/fnettrace/hostnames.c | 5 |
1 files changed, 3 insertions, 2 deletions
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) { | |||
50 | ptr = buf + 22; | 50 | ptr = buf + 22; |
51 | if (*ptr == ' ' && *(ptr + 3) == ',' && *(ptr + 4) == ' ') { | 51 | if (*ptr == ' ' && *(ptr + 3) == ',' && *(ptr + 4) == ' ') { |
52 | rv = ptr + 5; | 52 | rv = ptr + 5; |
53 | rv = radix_add(ip, 0xffffffff, rv); | 53 | if (strcmp(rv, "United States") == 0) |
54 | rv = "US"; | ||
54 | } | 55 | } |
55 | } | 56 | } |
56 | } | 57 | } |
57 | pclose(fp); | 58 | pclose(fp); |
58 | return rv; | 59 | return strdup(rv); |
59 | } | 60 | } |
60 | else | 61 | else |
61 | geoip_not_found = 1; | 62 | geoip_not_found = 1; |