diff options
author | 2023-07-15 08:18:08 -0400 | |
---|---|---|
committer | 2023-07-15 08:18:08 -0400 | |
commit | d2802ce6068e5e9296e7b9a06a9c82e18ca23972 (patch) | |
tree | 7ffd465af9f5e809d9e1661c59b806c82f659bd0 /src/fnettrace/hostnames.c | |
parent | Merge pull request #5898 from kmk3/build-simplify-man (diff) | |
download | firejail-d2802ce6068e5e9296e7b9a06a9c82e18ca23972.tar.gz firejail-d2802ce6068e5e9296e7b9a06a9c82e18ca23972.tar.zst firejail-d2802ce6068e5e9296e7b9a06a9c82e18ca23972.zip |
fnettrace cleanup
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; |