aboutsummaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/util.c b/util.c
index 098010cfc7..ddbc6a77c5 100644
--- a/util.c
+++ b/util.c
@@ -167,7 +167,10 @@ const gchar *get_conn_cfilter(void) {
"and tcp port %s)", tokens[1], host_ip_af(tokens[0]), tokens[0], tokens[2]);
return filter_str->str;
} else if ((env = getenv("REMOTEHOST")) != NULL) {
- if (g_ascii_strcasecmp(env, "localhost") == 0 || strcmp(env, "127.0.0.1") == 0) {
+ /* FreeBSD 7.0 sets REMOTEHOST to an empty string */
+ if (g_ascii_strcasecmp(env, "localhost") == 0 ||
+ strcmp(env, "127.0.0.1") == 0 ||
+ strcmp(env, "") == 0) {
return "";
}
g_string_sprintf(filter_str, "not %s host %s", host_ip_af(env), env);