From owner-svn-src-stable@FreeBSD.ORG Sat Oct 13 21:17:54 2012 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8C13DDE8; Sat, 13 Oct 2012 21:17:54 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [8.8.178.135]) by mx1.freebsd.org (Postfix) with ESMTP id 6BD968FC0A; Sat, 13 Oct 2012 21:17:54 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q9DLHs6n085555; Sat, 13 Oct 2012 21:17:54 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q9DLHsUQ085554; Sat, 13 Oct 2012 21:17:54 GMT (envelope-from bapt@FreeBSD.org) X-Authentication-Warning: freefall.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f Date: Sat, 13 Oct 2012 23:17:52 +0200 From: Baptiste Daroussin To: Eitan Adler Subject: Re: svn commit: r241474 - stable/7/usr.sbin/syslogd Message-ID: <20121013211752.GE43011@ithaqua.etoilebsd.net> References: <201210120210.q9C2ARnS023567@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jKBxcB1XkHIR0Eqt" Content-Disposition: inline In-Reply-To: <201210120210.q9C2ARnS023567@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-7@FreeBSD.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Oct 2012 21:17:54 -0000 --jKBxcB1XkHIR0Eqt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 12, 2012 at 02:10:27AM +0000, Eitan Adler wrote: > Author: eadler > Date: Fri Oct 12 02:10:27 2012 > New Revision: 241474 > URL: http://svn.freebsd.org/changeset/base/241474 >=20 > Log: > MFC r240389,r240409: > - Add support for ipv6 addresses as destination > - Add documentation for IPv6 support > =20 > PR: docs/171580 > Approved by: cperciva (implicit) >=20 > Modified: > stable/7/usr.sbin/syslogd/syslog.conf.5 > stable/7/usr.sbin/syslogd/syslogd.c > Directory Properties: > stable/7/usr.sbin/syslogd/ (props changed) >=20 > Modified: stable/7/usr.sbin/syslogd/syslog.conf.5 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/7/usr.sbin/syslogd/syslog.conf.5 Fri Oct 12 02:10:27 2012 (r24= 1473) > +++ stable/7/usr.sbin/syslogd/syslog.conf.5 Fri Oct 12 02:10:27 2012 (r24= 1474) > @@ -28,7 +28,7 @@ > .\" @(#)syslog.conf.5 8.1 (Berkeley) 6/9/93 > .\" $FreeBSD$ > .\" > -.Dd December 23, 2008 > +.Dd September 12, 2012 > .Dt SYSLOG.CONF 5 > .Os > .Sh NAME > @@ -347,6 +347,14 @@ If a port number is added after a colon > .Pq Ql :\& > then that port will be used as the destination port > rather than the usual syslog port. > +IPv6 addresses can be used > +by surrounding the address portion with > +square brackets > +.Po > +.Ql [\& > +and > +.Ql ]\& > +.Pc . > .It > A comma separated list of users. > Selected messages are written to those users >=20 > Modified: stable/7/usr.sbin/syslogd/syslogd.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/7/usr.sbin/syslogd/syslogd.c Fri Oct 12 02:10:27 2012 (r241473) > +++ stable/7/usr.sbin/syslogd/syslogd.c Fri Oct 12 02:10:27 2012 (r241474) > @@ -1935,6 +1935,7 @@ cfline(const char *line, struct filed *f > case '@': > { > char *tp; > + char endkey =3D ':'; > /* > * scan forward to see if there is a port defined. > * so we can't use strlcpy.. > @@ -1943,9 +1944,19 @@ cfline(const char *line, struct filed *f > tp =3D f->f_un.f_forw.f_hname; > p++; > =20 > - while (*p && (*p !=3D ':') && (i-- > 0)) { > + /* > + * an ipv6 address should start with a '[' in that case > + * we should scan for a ']' > + */ > + if (*p =3D=3D '[') { > + p++; > + endkey =3D ']'; > + } > + while (*p && (*p !=3D endkey) && (i-- > 0)) { > *tp++ =3D *p++; > } > + if (endkey =3D=3D ']' && *p =3D=3D endkey) > + p++; > *tp =3D '\0'; > } > /* See if we copied a domain and have a port */ > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" This is missing the information about the original PR: bin/150530 which should btw have been closed. Anyway thanks for the MFC. regards, Bapt --jKBxcB1XkHIR0Eqt Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlB52oAACgkQ8kTtMUmk6ExEagCfThDRirT0SMfBjeEprMzBh7xZ wQ8An1rtjSZEeg1vawhP57VO1E400Nsu =3JWn -----END PGP SIGNATURE----- --jKBxcB1XkHIR0Eqt--