[ipfilter-cvs] ipfilter/tools ipmon.c,
Brought to you by:
darren_r
From: Darren <dar...@us...> - 2012-07-20 07:40:38
|
Update of /cvsroot/ipfilter/ipfilter/tools In directory vz-cvs-4.sog:/tmp/cvs-serv26402/tools Modified Files: 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.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** ipmon.c 5 Jun 2012 11:14:59 -0000 1.26 --- ipmon.c 20 Jul 2012 07:40:36 -0000 1.27 *************** *** 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); |