aboutsummaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
authorMichael Tüxen <tuexen@fh-muenster.de>2008-04-07 13:22:47 +0000
committerMichael Tüxen <tuexen@fh-muenster.de>2008-04-07 13:22:47 +0000
commit3340a9f9b7b55d9eb19e1e0ee5b2baba1f1d26bd (patch)
tree0480e670935778920c4a10fea24a61237d2ee45f /util.c
parent47ba488516d85b344b1c1717ec67cbaf7a1edd23 (diff)
Fix get_conn_cfilter() such that not an invalid capture filter
is used on FreeBSD 7.0 systems. Now REMOTEHOST can be an empty string. svn path=/trunk/; revision=24834
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);