diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2007-11-24 17:43:48 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2007-11-24 17:43:48 +0000 |
commit | 70b8ca4afd0e5e67dad0a0ce2fb07ea602760239 (patch) | |
tree | 9593d6435ed393b4ca4c9b3760e25d8e55efc045 /usr.sbin/relayd/relay.c | |
parent | 9102b876462357d73c2b83c97f3a0cf880e85c81 (diff) |
tweak for hostnames without dots (like "localhost")
Diffstat (limited to 'usr.sbin/relayd/relay.c')
-rw-r--r-- | usr.sbin/relayd/relay.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/relayd/relay.c b/usr.sbin/relayd/relay.c index 37e752d0930..89c573d2cec 100644 --- a/usr.sbin/relayd/relay.c +++ b/usr.sbin/relayd/relay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relay.c,v 1.70 2007/11/24 17:07:28 reyk Exp $ */ +/* $OpenBSD: relay.c,v 1.71 2007/11/24 17:43:47 reyk Exp $ */ /* * Copyright (c) 2006, 2007 Reyk Floeter <reyk@openbsd.org> @@ -1613,6 +1613,8 @@ relay_lookup_url(struct ctl_relay_event *cre, const char *str, if (dots > (RELAY_MAXLOOKUPLEVELS - 2)) break; } + if (dots == -1) + dots = 0; hi[dots] = ph; if ((pp = strdup(cre->path)) == NULL) { |