Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Oct 2012 23:17:52 +0200
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        Eitan Adler <eadler@FreeBSD.org>
Cc:        svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-7@FreeBSD.org
Subject:   Re: svn commit: r241474 - stable/7/usr.sbin/syslogd
Message-ID:  <20121013211752.GE43011@ithaqua.etoilebsd.net>
In-Reply-To: <201210120210.q9C2ARnS023567@svn.freebsd.org>
References:  <201210120210.q9C2ARnS023567@svn.freebsd.org>

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

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121013211752.GE43011>