[ipfilter-cvs] ipfilter/tools ipmon.c,v5-1-RELEASE
Brought to you by:
darren_r
From: Darren <dar...@us...> - 2012-07-20 07:41:00
|
Update of /cvsroot/ipfilter/ipfilter/tools In directory vz-cvs-4.sog:/tmp/cvs-serv26423/tools Modified Files: Tag: v5-1-RELEASE ipmon.c Log Message: 3545310 ipmon needs ipl_sec on 64bit boundary Index: ipmon.c =================================================================== RCS file: /cvsroot/ipfilter/ipfilter/tools/ipmon.c,v retrieving revision 1.20.2.5 retrieving revision 1.20.2.6 diff -C2 -d -r1.20.2.5 -r1.20.2.6 *** ipmon.c 29 May 2012 12:22:39 -0000 1.20.2.5 --- ipmon.c 20 Jul 2012 07:40:57 -0000 1.20.2.6 *************** *** 477,480 **** --- 477,483 ---- int nr; + if (bufsize > IPFILTER_LOGSIZE) + bufsize = IPFILTER_LOGSIZE; + nr = read(fd, buf, bufsize); if (!nr) *************** *** 1817,1821 **** static int read_loginfo(config_t *conf) { ! char buf[DEFAULT_IPFLOGSIZE]; int n, tr, nr, i; logsource_t *l; --- 1820,1824 ---- static int read_loginfo(config_t *conf) { ! iplog_t buf[DEFAULT_IPFLOGSIZE/sizeof(iplog_t)+1]; int n, tr, nr, i; logsource_t *l; *************** *** 1847,1851 **** n = 0; ! tr = read_log(l->fd, &n, buf, sizeof(buf)); if (donehup) { if (conf->file != NULL) { --- 1850,1854 ---- n = 0; ! tr = read_log(l->fd, &n, (char *)buf, sizeof(buf)); if (donehup) { if (conf->file != NULL) { *************** *** 1876,1881 **** if (ipmonopts & IPMON_SYSLOG) syslog(LOG_CRIT, "read: %m\n"); ! else ! perror("read"); return 0; case 1 : --- 1879,1885 ---- if (ipmonopts & IPMON_SYSLOG) syslog(LOG_CRIT, "read: %m\n"); ! else { ! ipferror(l->fd, "read"); ! } return 0; case 1 : *************** *** 1890,1894 **** nr += tr; if (n > 0) { ! print_log(conf, l, buf, n); if (!(ipmonopts & IPMON_SYSLOG)) fflush(conf->log); --- 1894,1898 ---- nr += tr; if (n > 0) { ! print_log(conf, l, (char *)buf, n); if (!(ipmonopts & IPMON_SYSLOG)) fflush(conf->log); |