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>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] 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 > > Log: > MFC r240389,r240409: > - Add support for ipv6 addresses as destination > - Add documentation for IPv6 support > > PR: docs/171580 > Approved by: cperciva (implicit) > > 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) > > Modified: stable/7/usr.sbin/syslogd/syslog.conf.5 > ============================================================================== > --- stable/7/usr.sbin/syslogd/syslog.conf.5 Fri Oct 12 02:10:27 2012 (r241473) > +++ stable/7/usr.sbin/syslogd/syslog.conf.5 Fri Oct 12 02:10:27 2012 (r241474) > @@ -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 > > Modified: stable/7/usr.sbin/syslogd/syslogd.c > ============================================================================== > --- 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 = ':'; > /* > * 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 = f->f_un.f_forw.f_hname; > p++; > > - while (*p && (*p != ':') && (i-- > 0)) { > + /* > + * an ipv6 address should start with a '[' in that case > + * we should scan for a ']' > + */ > + if (*p == '[') { > + p++; > + endkey = ']'; > + } > + while (*p && (*p != endkey) && (i-- > 0)) { > *tp++ = *p++; > } > + if (endkey == ']' && *p == endkey) > + p++; > *tp = '\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 [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlB52oAACgkQ8kTtMUmk6ExEagCfThDRirT0SMfBjeEprMzBh7xZ wQ8An1rtjSZEeg1vawhP57VO1E400Nsu =3JWn -----END PGP SIGNATURE-----help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121013211752.GE43011>
