rpms/sysklogd/devel sysklogd-1.4.1-ipv6.patch, 1.1, 1.2 sysklogd.spec, 1.41, 1.42
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Thu Nov 23 13:37:27 UTC 2006
Author: pvrabec
Update of /cvs/dist/rpms/sysklogd/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv27186
Modified Files:
sysklogd-1.4.1-ipv6.patch sysklogd.spec
Log Message:
improve IPv6 patch
sysklogd-1.4.1-ipv6.patch:
Makefile | 2
sysklogd.8 | 21 +++
syslogd.c | 383 ++++++++++++++++++++++++++++++++++++++-----------------------
3 files changed, 263 insertions(+), 143 deletions(-)
Index: sysklogd-1.4.1-ipv6.patch
===================================================================
RCS file: /cvs/dist/rpms/sysklogd/devel/sysklogd-1.4.1-ipv6.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sysklogd-1.4.1-ipv6.patch 22 Nov 2006 21:29:54 -0000 1.1
+++ sysklogd-1.4.1-ipv6.patch 23 Nov 2006 13:37:25 -0000 1.2
@@ -1,5 +1,53 @@
---- sysklogd-1.4.1rh/syslogd.c.ipv6 2006-11-22 13:38:49.000000000 +0100
-+++ sysklogd-1.4.1rh/syslogd.c 2006-11-22 13:58:57.000000000 +0100
+--- sysklogd-1.4.1rh/Makefile.ipv6 2004-02-12 16:49:20.000000000 +0100
++++ sysklogd-1.4.1rh/Makefile 2006-11-23 13:45:34.000000000 +0100
+@@ -44,7 +44,7 @@
+ # ballot below.
+ SYSLOGD_PIDNAME = -DSYSLOGD_PIDNAME=\"syslogd.pid\"
+
+-SYSLOGD_FLAGS= -DSYSLOG_INET -DSYSLOG_UNIXAF -DNO_SCCS ${FSSTND} \
++SYSLOGD_FLAGS= -DSYSLOG_INET -DSYSLOG_UNIXAF -DINET6 -DNO_SCCS ${FSSTND} \
+ ${SYSLOGD_PIDNAME}
+ SYSLOG_FLAGS= -DALLOW_KERNEL_LOGGING
+ KLOGD_FLAGS = ${FSSTND} ${KLOGD_START_DELAY}
+--- sysklogd-1.4.1rh/sysklogd.8.ipv6 2001-07-09 06:17:22.000000000 +0200
++++ sysklogd-1.4.1rh/sysklogd.8 2006-11-23 13:45:34.000000000 +0100
+@@ -7,6 +7,7 @@
+ sysklogd \- Linux system logging utilities.
+ .SH SYNOPSIS
+ .B syslogd
++.RB [ " \-46A " ]
+ .RB [ " \-a "
+ .I socket
+ ]
+@@ -75,6 +76,26 @@
+ .LP
+ .SH OPTIONS
+ .TP
++.BI "\-4"
++Force
++.B syslogd
++to use IPv4 addresses only.
++.TP
++.BI "\-6"
++Force
++.B syslogd
++to use IPv6 addresses only.
++.TP
++.BI "\-A"
++Ordinarily,
++.B syslogd
++tries to send the message to only one address
++even if the host has more than one A or AAAA record. If this
++option is specified,
++.B syslogd
++tries to send the message to all
++addresses.
++.TP
+ .BI "\-a " "socket"
+ Using this argument you can specify additional sockets from that
+ .B syslogd
+--- sysklogd-1.4.1rh/syslogd.c.ipv6 2006-11-23 13:45:34.000000000 +0100
++++ sysklogd-1.4.1rh/syslogd.c 2006-11-23 14:22:58.000000000 +0100
@@ -566,7 +566,6 @@
char **parts;
@@ -128,7 +176,7 @@
case 'a':
if (nfunix < MAXFUNIX)
funixn[nfunix++] = optarg;
-@@ -1085,8 +1104,12 @@
+@@ -1085,8 +1104,11 @@
* descriptors.
*/
if ( InetInuse && AcceptRemote ) {
@@ -139,11 +187,10 @@
+ FD_SET(finet[i+1], &readfds);
+ if (finet[i+1]>maxfds) maxfds=finet[i+1];
+ }
-+ FD_SET(finet[i+1], &readfds);
dprintf("Listening on syslog UDP port.\n");
}
#endif
-@@ -1171,33 +1194,30 @@
+@@ -1171,33 +1193,30 @@
#endif
#ifdef SYSLOG_INET
@@ -201,7 +248,7 @@
}
}
#endif
-@@ -1224,7 +1244,7 @@
+@@ -1224,7 +1243,7 @@
int usage()
{
@@ -210,7 +257,7 @@
" [-s domainlist] [-f conffile]\n");
exit(1);
}
-@@ -1262,32 +1282,71 @@
+@@ -1262,32 +1281,71 @@
#endif
#ifdef SYSLOG_INET
@@ -307,7 +354,7 @@
}
#endif
-@@ -1699,13 +1758,15 @@
+@@ -1699,13 +1757,15 @@
char *msg;
{
struct iovec iov[6];
@@ -324,7 +371,7 @@
#endif
dprintf("Called fprintlog, ");
-@@ -1774,7 +1835,7 @@
+@@ -1774,7 +1834,7 @@
fwd_suspend = time((time_t *) 0) - f->f_time;
if ( fwd_suspend >= INET_SUSPEND_TIME ) {
dprintf("Forwarding suspension to unknown over, retrying\n");
@@ -333,7 +380,7 @@
dprintf("Failure: %s\n", sys_h_errlist[h_errno]);
dprintf("Retries: %d\n", f->f_prevcount);
if ( --f->f_prevcount < 0 ) {
-@@ -1786,10 +1847,9 @@
+@@ -1786,10 +1846,9 @@
}
else {
dprintf("%s found, resuming.\n", f->f_un.f_forw.f_hname);
@@ -345,7 +392,7 @@
goto f_forw;
}
}
-@@ -1815,15 +1875,31 @@
+@@ -1815,15 +1874,31 @@
l = strlen(line);
if (l > MAXLINE)
l = MAXLINE;
@@ -378,15 +425,15 @@
+ }
+ if (lsent != l) {
+ int e = errno;
-+ (void)close(f->f_file);
++ dprintf("INET sendto error: %d = %s.\n", e, strerror(e));
++ f->f_type = F_FORW_SUSP;
+ errno = e;
-+ f->f_type = F_UNUSED;
+ logerror("sendto");
+ }
}
}
break;
-@@ -2043,30 +2119,46 @@
+@@ -2043,30 +2118,48 @@
* Return a printable representation of a host address.
*/
const char *cvthname(f)
@@ -422,17 +469,19 @@
- inet_ntoa(f->sin_addr));
- return (inet_ntoa(f->sin_addr));
+
-+ sigemptyset(&nmask);
-+ sigaddset(&nmask, SIGHUP);
-+ sigprocmask(SIG_BLOCK, &nmask, &omask);
+
-+ if (!DisableDNS)
++ if (!DisableDNS) {
++ sigemptyset(&nmask);
++ sigaddset(&nmask, SIGHUP);
++ sigprocmask(SIG_BLOCK, &nmask, &omask);
++
+ error = getnameinfo((struct sockaddr *)f,
+ sizeof(*f),
+ hname, sizeof hname, NULL, 0,
+ NI_NAMEREQD);
+
-+ sigprocmask(SIG_SETMASK, &omask, NULL);
++ sigprocmask(SIG_SETMASK, &omask, NULL);
++ }
+
+ if (error || DisableDNS) {
+ dprintf("Host name for your address (%s) unknown\n", ip);
@@ -447,7 +496,7 @@
if (isupper(*p))
*p = tolower(*p);
-@@ -2074,17 +2166,17 @@
+@@ -2074,17 +2167,17 @@
* Notice that the string still contains the fqdn, but your
* hostname and domain are separated by a '\0'.
*/
@@ -468,7 +517,7 @@
}
count++;
}
-@@ -2092,9 +2184,9 @@
+@@ -2092,9 +2185,9 @@
if (LocalHosts) {
count=0;
while (LocalHosts[count]) {
@@ -480,7 +529,7 @@
}
count++;
}
-@@ -2102,7 +2194,7 @@
+@@ -2102,7 +2195,7 @@
}
}
@@ -489,7 +538,7 @@
}
void alarm_handler( int sig )
-@@ -2158,7 +2250,7 @@
+@@ -2158,7 +2251,7 @@
* Print syslogd errors some place.
*/
void logerror(type)
@@ -498,7 +547,7 @@
{
char buf[100];
-@@ -2206,8 +2298,14 @@
+@@ -2206,8 +2299,14 @@
for (i = 0; i < nfunix; i++)
if (funix[i] != -1)
close(funix[i]);
@@ -514,7 +563,7 @@
/* Clean-up files. */
for (i = 0; i < nfunix; i++)
-@@ -2268,7 +2366,6 @@
+@@ -2268,7 +2367,6 @@
logerror("see syslogd(8) for details of whether and how to enable it.");
return;
}
@@ -522,7 +571,7 @@
/*
* Close all open log files and free log descriptor array.
-@@ -2293,6 +2390,9 @@
+@@ -2293,6 +2391,9 @@
case F_CONSOLE:
(void) close(f->f_file);
break;
@@ -532,7 +581,7 @@
}
}
-@@ -2402,21 +2502,22 @@
+@@ -2402,21 +2503,22 @@
#ifdef SYSLOG_INET
if (Forwarding || AcceptRemote) {
@@ -562,7 +611,7 @@
#endif
Initialized = 1;
-@@ -2496,6 +2597,8 @@
+@@ -2496,6 +2598,8 @@
char *line;
register struct filed *f;
{
@@ -571,7 +620,7 @@
register char *p;
register char *q;
register int i, i2;
-@@ -2505,7 +2608,7 @@
+@@ -2505,7 +2609,7 @@
int ignorepri = 0;
int syncfile;
#ifdef SYSLOG_INET
@@ -580,7 +629,7 @@
#endif
char buf[MAXLINE];
char xbuf[200];
-@@ -2661,7 +2764,8 @@
+@@ -2661,7 +2765,8 @@
{
case '@':
#ifdef SYSLOG_INET
@@ -590,11 +639,10 @@
dprintf("forwarding host: %s\n", p); /*ASP*/
if ( (ina = not_local_address(p)) == NULL ) {
f->f_type = F_FORW_UNKN;
-@@ -2669,17 +2773,21 @@
+@@ -2669,17 +2774,20 @@
f->f_time = time ( (time_t *)0 );
} else {
f->f_type = F_FORW;
-+// free_host_ai_list(ina);
+ freeaddrinfo(ina);
}
Index: sysklogd.spec
===================================================================
RCS file: /cvs/dist/rpms/sysklogd/devel/sysklogd.spec,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- sysklogd.spec 22 Nov 2006 21:32:26 -0000 1.41
+++ sysklogd.spec 23 Nov 2006 13:37:25 -0000 1.42
@@ -1,7 +1,7 @@
Summary: System logging and kernel message trapping daemons.
Name: sysklogd
Version: 1.4.1
-Release: 40%{?dist}
+Release: 41%{?dist}
License: GPL
Group: System Environment/Daemons
Source: sysklogd-%{version}rh.tar.gz
@@ -105,6 +105,9 @@
%{_mandir}/*/*
%changelog
+* Thu Nov 23 2006 Peter Vrabec <pvrabec at redhat.com> 1.4.1-41
+- improve IPv6 patch
+
* Wed Nov 22 2006 Peter Vrabec <pvrabec at redhat.com> 1.4.1-40
- add IPv6 support
More information about the fedora-cvs-commits
mailing list