Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Mar 2017 10:27:51 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 217939] syslogd: -b doesn't work with IPv6 literal addresses after ^/head@r309933
Message-ID:  <bug-217939-8-ejubAL887R@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-217939-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-217939-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217939

Andrey V. Elsukov <ae@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ae@FreeBSD.org

--- Comment #1 from Andrey V. Elsukov <ae@FreeBSD.org> ---
I think the following patch should fix this:

Index: syslogd.c
===================================================================
--- syslogd.c   (revision 315478)
+++ syslogd.c   (working copy)
@@ -477,7 +477,8 @@ main(int argc, char *argv[])
                        break;
                case 'b':
                        bflag = 1;
-                       if ((p = strchr(optarg, ':')) == NULL) {
+                       if ((p = strchr(optarg, ':')) == NULL ||
+                           strchr(p + 1, ':') != NULL) {
                                /* A hostname or filename only. */
                                addpeer(&(struct peer){
                                        .pe_name = optarg,

-- 
You are receiving this mail because:
You are the assignee for the bug.


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-217939-8-ejubAL887R>