diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/relayd/relayd.c | 8 | ||||
-rw-r--r-- | usr.sbin/relayd/relayd.conf.5 | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/relayd/relayd.c b/usr.sbin/relayd/relayd.c index 1e559e71f06..5c49ac8e933 100644 --- a/usr.sbin/relayd/relayd.c +++ b/usr.sbin/relayd/relayd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relayd.c,v 1.81 2008/09/29 14:53:35 reyk Exp $ */ +/* $OpenBSD: relayd.c,v 1.82 2008/09/29 15:06:52 reyk Exp $ */ /* * Copyright (c) 2007, 2008 Reyk Floeter <reyk@openbsd.org> @@ -1187,9 +1187,9 @@ protonode_load(enum direction dir, struct protocol *proto, return (-1); while (fgets(buf, sizeof(buf), fp) != NULL) { - /* strip comment, whitespace, and newline characters */ - buf[strcspn(buf, "\r\n\t #")] = '\0'; - if (!strlen(buf)) + /* strip whitespace and newline characters */ + buf[strcspn(buf, "\r\n\t ")] = '\0'; + if (!strlen(buf) || buf[0] == '#') continue; pn.key = strdup(buf); if (node->value != NULL) diff --git a/usr.sbin/relayd/relayd.conf.5 b/usr.sbin/relayd/relayd.conf.5 index 9985fc42a4e..0bd77c1a6b4 100644 --- a/usr.sbin/relayd/relayd.conf.5 +++ b/usr.sbin/relayd/relayd.conf.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: relayd.conf.5,v 1.95 2008/09/29 14:53:35 reyk Exp $ +.\" $OpenBSD: relayd.conf.5,v 1.96 2008/09/29 15:06:52 reyk Exp $ .\" .\" Copyright (c) 2006, 2007 Reyk Floeter <reyk@openbsd.org> .\" Copyright (c) 2006, 2007 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -828,10 +828,10 @@ Like the directive above, but load the non-digest keys from an external file with the specified .Ar path containing one key per line. -Empty lines will be ingnored and lines will be stripped at any -whitespaces, newline characters, or hash marks +Lines will be stripped at the first whitespace or newline character. +Any empty lines or lines beginning with a hash mark .Pq Sq # -indicating a comment. +will be ignored. .It Ic filter Ar value Ic from Ar key Like the .Ic expect Ar .. Ic from |