svn commit: r241474 - stable/7/usr.sbin/syslogd
Baptiste Daroussin
bapt at FreeBSD.org
Sat Oct 13 21:17:54 UTC 2012
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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/svn-src-all
> To unsubscribe, send any mail to "svn-src-all-unsubscribe at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-stable/attachments/20121013/32a88300/attachment.sig>
More information about the svn-src-stable
mailing list