diff options
author | Peter Volkov <pva@gentoo.org> | 2006-08-29 13:01:55 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2006-08-29 13:01:55 +0000 |
commit | cc7ad19068f8ab00f766b27d69e703650beece3f (patch) | |
tree | 920ad168c94375bcede7bb1199bec082e6e7c196 /net-analyzer/ipcad | |
parent | Fixing Failed Patch issue. How this could happen? (diff) | |
download | historical-cc7ad19068f8ab00f766b27d69e703650beece3f.tar.gz historical-cc7ad19068f8ab00f766b27d69e703650beece3f.tar.bz2 historical-cc7ad19068f8ab00f766b27d69e703650beece3f.zip |
Fixing Failed Patch issue. How this could happen?
Package-Manager: portage-2.1-r2
Diffstat (limited to 'net-analyzer/ipcad')
-rw-r--r-- | net-analyzer/ipcad/Manifest | 37 | ||||
-rw-r--r-- | net-analyzer/ipcad/files/ipcad-3.7-20060614-cvs.patch | 766 |
2 files changed, 32 insertions, 771 deletions
diff --git a/net-analyzer/ipcad/Manifest b/net-analyzer/ipcad/Manifest index 4a260e67b12d..f3866e3aa994 100644 --- a/net-analyzer/ipcad/Manifest +++ b/net-analyzer/ipcad/Manifest @@ -1,9 +1,36 @@ -MD5 b277e615adc23d608491af6233a606eb ChangeLog 3281 -MD5 c50d4489e237734132ce6322ecfc44b8 files/digest-ipcad-3.6.6 235 -MD5 008c2b7565ba56289ec6b80db450e510 files/digest-ipcad-3.7 229 -MD5 bd3dc45e249566b2a2429fc342fb1d71 files/ipcad-3.7-20060614-cvs.patch 20006 +AUX ipcad-3.7-20060828-cvs.patch 20646 RMD160 66ece02b4466f87e6090b19b4cba684de4d89020 SHA1 dad1490a3361c7c97eb085a403ff632df797a00e SHA256 4aadcb16d6f02a4baa825716a7bf1ab3a7d4df03780afa279ba11a70e71b9fe1 +MD5 b906b8216254bbad3ea73d9d764a217c files/ipcad-3.7-20060828-cvs.patch 20646 +RMD160 66ece02b4466f87e6090b19b4cba684de4d89020 files/ipcad-3.7-20060828-cvs.patch 20646 +SHA256 4aadcb16d6f02a4baa825716a7bf1ab3a7d4df03780afa279ba11a70e71b9fe1 files/ipcad-3.7-20060828-cvs.patch 20646 +AUX ipcad.conf.d 429 RMD160 02956a6386a7448501658705a95dcb7d97f7531b SHA1 9be3112424e3d1e49b6c626f5c035128496b8668 SHA256 7b802d54f968ab3797e49934b78ace247274326559bfece2792c2490a7f0339c MD5 ccc0196c19627d15364f5976e0309ca8 files/ipcad.conf.d 429 +RMD160 02956a6386a7448501658705a95dcb7d97f7531b files/ipcad.conf.d 429 +SHA256 7b802d54f968ab3797e49934b78ace247274326559bfece2792c2490a7f0339c files/ipcad.conf.d 429 +AUX ipcad.init 924 RMD160 e75dd67de1aff64b5979415942f3afc96909ffee SHA1 dbde21c675f216f9eed9b3c8752e8e7dfb0c9473 SHA256 9b6234267f23b50a4959444f90fe318d26d0559121804a100017e17406ffbe93 MD5 54a4af668d2e7f597152ac2b4da00a83 files/ipcad.init 924 +RMD160 e75dd67de1aff64b5979415942f3afc96909ffee files/ipcad.init 924 +SHA256 9b6234267f23b50a4959444f90fe318d26d0559121804a100017e17406ffbe93 files/ipcad.init 924 +DIST ipcad-3.6.6.tar.gz 170465 RMD160 25247de5bca5c29dbb13fae359d358877b59a3c7 SHA256 b09abc1fddde206645bbf5272c81e1c06515c5337192558dbb25066a066a60a0 +DIST ipcad-3.7.tar.gz 171814 RMD160 788f4b55bd7494bf7ea99a157a4efdcb4cdba71c SHA1 ef67a5313f672eb4cb7e9c2762d99d1e9d34fbc2 SHA256 3be5edebd7e8ce3a050c10f59b0c58619cae23f28d2c3daa38384dca01795352 +EBUILD ipcad-3.6.6.ebuild 1189 RMD160 d2248adde1eda242ea90242f7fd0e9d558e8f37f SHA1 783c7d198714cd83c5d23b52468f497b4c5b9274 SHA256 79322b58d569a46893d37f7ceec42c8ff6ec9eb52492f7b005d92b6c53a1abd9 MD5 c1d382c07086fd57f51f335ced62d5a9 ipcad-3.6.6.ebuild 1189 -MD5 3e4e4867dc673936ee64ca6fb1ac11d6 ipcad-3.7.ebuild 1148 +RMD160 d2248adde1eda242ea90242f7fd0e9d558e8f37f ipcad-3.6.6.ebuild 1189 +SHA256 79322b58d569a46893d37f7ceec42c8ff6ec9eb52492f7b005d92b6c53a1abd9 ipcad-3.6.6.ebuild 1189 +EBUILD ipcad-3.7.ebuild 1148 RMD160 12380284139238331316ff261bd14793d88645bd SHA1 864257cf40edf56f4a8ed10b863a2595ff027112 SHA256 e18bb53aaf7fabad51bb8781335e6a790a118bb3987c162f7d9e968681653083 +MD5 bde8181ed024df7ede41dedd8bad9e2e ipcad-3.7.ebuild 1148 +RMD160 12380284139238331316ff261bd14793d88645bd ipcad-3.7.ebuild 1148 +SHA256 e18bb53aaf7fabad51bb8781335e6a790a118bb3987c162f7d9e968681653083 ipcad-3.7.ebuild 1148 +MISC ChangeLog 3475 RMD160 72342faa4af003ee4153a31ee6492e006ce15bba SHA1 33e239e9e8f86f3cae3cccba88e2ab4ed9fac9ce SHA256 2fbd1520c379bd1bfdf12b63ee5c07992628c668d96003578037066cef594f70 +MD5 453947819a2ac190b63165e157d4329f ChangeLog 3475 +RMD160 72342faa4af003ee4153a31ee6492e006ce15bba ChangeLog 3475 +SHA256 2fbd1520c379bd1bfdf12b63ee5c07992628c668d96003578037066cef594f70 ChangeLog 3475 +MISC metadata.xml 221 RMD160 9bf9934cf7def883af53fd96eb920842aeb5f10e SHA1 31d376e84b2e0b9793e1555038bb438a9167cc1a SHA256 26daf450814a6f339001173abdb07aa9c0bfae6a5432db67bf6a73c19c9fdd5e MD5 1194f6f46d7b10dcd54903168f1ac522 metadata.xml 221 +RMD160 9bf9934cf7def883af53fd96eb920842aeb5f10e metadata.xml 221 +SHA256 26daf450814a6f339001173abdb07aa9c0bfae6a5432db67bf6a73c19c9fdd5e metadata.xml 221 +MD5 c50d4489e237734132ce6322ecfc44b8 files/digest-ipcad-3.6.6 235 +RMD160 8f0be0390523cad0f91e95c523bc34623dd86a7f files/digest-ipcad-3.6.6 235 +SHA256 a82db590012728361f5cf55b874be1d4d6c465ee76c7bd99b5ccbbb9f194493d files/digest-ipcad-3.6.6 235 +MD5 008c2b7565ba56289ec6b80db450e510 files/digest-ipcad-3.7 229 +RMD160 871b607ab8114627acd3b8252eccb295dfa70b8f files/digest-ipcad-3.7 229 +SHA256 b7d064f1bebc9f5c3bc468b2aeae2735e6adf76e313353c5ca2e5190390467ca files/digest-ipcad-3.7 229 diff --git a/net-analyzer/ipcad/files/ipcad-3.7-20060614-cvs.patch b/net-analyzer/ipcad/files/ipcad-3.7-20060614-cvs.patch deleted file mode 100644 index a82f4e96ec32..000000000000 --- a/net-analyzer/ipcad/files/ipcad-3.7-20060614-cvs.patch +++ /dev/null @@ -1,766 +0,0 @@ -diff -Naur ipcad-3.7/cfglex.c ipcad/cfglex.c ---- ipcad-3.7/cfglex.c 2005-11-21 07:41:06.000000000 +0300 -+++ ipcad/cfglex.c 2006-03-27 17:57:29.000000000 +0400 -@@ -19,7 +19,7 @@ - /* A lexical scanner generated by flex */ - - /* Scanner skeleton version: -- * $Header: /var/cvsroot/gentoo-x86/net-analyzer/ipcad/files/ipcad-3.7-20060614-cvs.patch,v 1.1 2006/06/14 13:33:31 pva Exp $ -+ * $Header: /var/cvsroot/gentoo-x86/net-analyzer/ipcad/files/ipcad-3.7-20060614-cvs.patch,v 1.1 2006/06/14 13:33:31 pva Exp $ - */ - - #define FLEX_SCANNER -diff -Naur ipcad-3.7/cfg.y ipcad/cfg.y ---- ipcad-3.7/cfg.y 2005-11-21 07:41:07.000000000 +0300 -+++ ipcad/cfg.y 2006-03-27 17:57:29.000000000 +0400 -@@ -171,7 +171,12 @@ - free($2); - } - | IFACE ULOG ulog_gmask optIFlags { -- char *p = malloc(16); -+ static int ulog_already_defined; -+ char *p; -+ if(ulog_already_defined++) { -+ return yyerror("Duplicate ULOG interface specification.\nUse \"interface ulog group X, group Y;\" format.\n"); -+ } -+ p = malloc(16); - assert(p); - snprintf(p, 16, "%u", $3); - if(cfg_add_iface("ulog", $4, p) == NULL) -@@ -424,7 +429,7 @@ - } - | NETFLOW TIMEOUT INACTIVE TOK_INTEGER { - if($4 < 1 || $4 > 600) -- return yyerror("Netflow active timeout " -+ return yyerror("Netflow inactive timeout " - "out of range 1..600"); - conf->netflow_timeout_inactive = $4; - } -diff -Naur ipcad-3.7/cfgy.c ipcad/cfgy.c ---- ipcad-3.7/cfgy.c 2005-11-21 07:41:07.000000000 +0300 -+++ ipcad/cfgy.c 2006-03-27 17:57:29.000000000 +0400 -@@ -185,11 +185,11 @@ - static const short yyrline[] = { 0, - 104, 107, 108, 111, 112, 114, 116, 117, 118, 119, - 120, 123, 125, 126, 127, 130, 132, 135, 137, 140, -- 144, 148, 153, 159, 163, 168, 173, 180, 184, 194, -- 201, 206, 209, 212, 218, 222, 232, 236, 240, 244, -- 248, 255, 256, 261, 268, 276, 314, 349, 369, 375, -- 380, 387, 389, 396, 404, 413, 419, 425, 431, 437, -- 443, 449 -+ 144, 148, 153, 159, 163, 168, 173, 185, 189, 199, -+ 206, 211, 214, 217, 223, 227, 237, 241, 245, 249, -+ 253, 260, 261, 266, 273, 281, 319, 354, 374, 380, -+ 385, 392, 394, 401, 409, 418, 424, 430, 436, 442, -+ 448, 454 - }; - #endif - -@@ -960,7 +960,12 @@ - case 27: - #line 173 "cfg.y" - { -- char *p = malloc(16); -+ static int ulog_already_defined; -+ char *p; -+ if(ulog_already_defined++) { -+ return yyerror("Duplicate ULOG interface specification.\nUse \"interface ulog group X, group Y;\" format.\n"); -+ } -+ p = malloc(16); - assert(p); - snprintf(p, 16, "%u", yyvsp[-1].tv_int); - if(cfg_add_iface("ulog", yyvsp[0].tv_int, p) == NULL) -@@ -968,14 +973,14 @@ - ; - break;} - case 28: --#line 180 "cfg.y" -+#line 185 "cfg.y" - { - if(cfg_add_iface("ipq", yyvsp[0].tv_int, NULL) == NULL) - exit(EX_NOINPUT); - ; - break;} - case 29: --#line 184 "cfg.y" -+#line 189 "cfg.y" - { - char *p; - if(yyvsp[-1].tv_int < 0 || yyvsp[-1].tv_int > 65535) -@@ -988,7 +993,7 @@ - ; - break;} - case 30: --#line 194 "cfg.y" -+#line 199 "cfg.y" - { - char *p = malloc(16); - assert(p); -@@ -998,7 +1003,7 @@ - ; - break;} - case 31: --#line 201 "cfg.y" -+#line 206 "cfg.y" - { - if( conf->dump_table_file ) - free(conf->dump_table_file); -@@ -1006,19 +1011,19 @@ - ; - break;} - case 32: --#line 206 "cfg.y" -+#line 211 "cfg.y" - { - conf->capture_ports = 1; - ; - break;} - case 33: --#line 209 "cfg.y" -+#line 214 "cfg.y" - { - conf->capture_ports = 0; - ; - break;} - case 34: --#line 212 "cfg.y" -+#line 217 "cfg.y" - { - if(add_server(rsh_server, "RSH Server", &(yyvsp[0].tv_ip), 514)) - return yyerror("Failed to install RSH server"); -@@ -1027,14 +1032,14 @@ - ; - break;} - case 35: --#line 218 "cfg.y" -+#line 223 "cfg.y" - { - fprintf(stderr, "Warning: Option at line %d has no effect\n", - ipcacfglineno); - ; - break;} - case 36: --#line 222 "cfg.y" -+#line 227 "cfg.y" - { - int to_ms; - to_ms = atoi(yyvsp[0].tv_char); -@@ -1047,35 +1052,35 @@ - ; - break;} - case 37: --#line 232 "cfg.y" -+#line 237 "cfg.y" - { - cfg_add_rsh_host("", yyvsp[-1].tv_char, yyvsp[0].tv_int); - free(yyvsp[-1].tv_char); - ; - break;} - case 38: --#line 236 "cfg.y" -+#line 241 "cfg.y" - { - cfg_add_rsh_host("", yyvsp[-1].tv_char, yyvsp[0].tv_int); - free(yyvsp[-1].tv_char); - ; - break;} - case 39: --#line 240 "cfg.y" -+#line 245 "cfg.y" - { - cfg_add_rsh_host(yyvsp[-3].tv_char, yyvsp[-1].tv_char, yyvsp[0].tv_int); - free(yyvsp[-3].tv_char); free(yyvsp[-1].tv_char); - ; - break;} - case 40: --#line 244 "cfg.y" -+#line 249 "cfg.y" - { - conf->rsh_ttl = atoi(yyvsp[0].tv_char); - free(yyvsp[0].tv_char); - ; - break;} - case 41: --#line 248 "cfg.y" -+#line 253 "cfg.y" - { - fprintf(stderr, "WARNING: \"ttl = %s;\" at line %d: " - "Obsolete syntax. Please use \"rsh ttl = %s;\"\n", -@@ -1085,7 +1090,7 @@ - ; - break;} - case 43: --#line 256 "cfg.y" -+#line 261 "cfg.y" - { - if(conf->chroot_to) - free(conf->chroot_to); -@@ -1093,7 +1098,7 @@ - ; - break;} - case 44: --#line 261 "cfg.y" -+#line 266 "cfg.y" - { - int id = yyvsp[0].tv_char ? atoi(yyvsp[0].tv_char) : -1; - free(yyvsp[0].tv_char); -@@ -1103,7 +1108,7 @@ - ; - break;} - case 45: --#line 268 "cfg.y" -+#line 273 "cfg.y" - { - int id = yyvsp[0].tv_char ? atoi(yyvsp[0].tv_char) : -1; - free(yyvsp[0].tv_char); -@@ -1113,7 +1118,7 @@ - ; - break;} - case 46: --#line 276 "cfg.y" -+#line 281 "cfg.y" - { - char *p = yyvsp[0].tv_char; - -@@ -1153,7 +1158,7 @@ - ; - break;} - case 47: --#line 314 "cfg.y" -+#line 319 "cfg.y" - { - char *p = yyvsp[0].tv_char; - -@@ -1190,7 +1195,7 @@ - ; - break;} - case 48: --#line 349 "cfg.y" -+#line 354 "cfg.y" - { - int ret; - yyvsp[0].tv_aggr.s1 = yyvsp[-1].tv_char; -@@ -1211,7 +1216,7 @@ - ; - break;} - case 49: --#line 370 "cfg.y" -+#line 375 "cfg.y" - { - yyval.tv_aggr.is_ip_aggr = 1; - yyval.tv_aggr.s2 = yyvsp[-2].tv_char; -@@ -1219,7 +1224,7 @@ - ; - break;} - case 50: --#line 375 "cfg.y" -+#line 380 "cfg.y" - { - yyval.tv_aggr.is_ip_aggr = 0; - yyval.tv_aggr.s2 = yyvsp[-2].tv_char; -@@ -1227,7 +1232,7 @@ - ; - break;} - case 51: --#line 380 "cfg.y" -+#line 385 "cfg.y" - { - yyval.tv_aggr.is_ip_aggr = 0; - yyval.tv_aggr.s2 = NULL; -@@ -1235,11 +1240,11 @@ - ; - break;} - case 52: --#line 388 "cfg.y" -+#line 393 "cfg.y" - { yyval.tv_ip.s_addr = INADDR_ANY; ; - break;} - case 53: --#line 389 "cfg.y" -+#line 394 "cfg.y" - { - if(inet_aton(yyvsp[0].tv_char, &(yyval.tv_ip)) != 1) - return yyerror("IP address expected"); -@@ -1247,7 +1252,7 @@ - ; - break;} - case 54: --#line 397 "cfg.y" -+#line 402 "cfg.y" - { - if(inet_aton(yyvsp[0].tv_char, &(yyval.tv_ip)) != 1) - return yyerror("IP address expected"); -@@ -1255,7 +1260,7 @@ - ; - break;} - case 55: --#line 405 "cfg.y" -+#line 410 "cfg.y" - { - conf->netflow_enabled = 1; - if(add_server(netflow_exporter, -@@ -1266,7 +1271,7 @@ - ; - break;} - case 56: --#line 413 "cfg.y" -+#line 418 "cfg.y" - { - if(yyvsp[0].tv_int != 5 && yyvsp[0].tv_int != 1) - yyerror("NetFlow version: " -@@ -1275,7 +1280,7 @@ - ; - break;} - case 57: --#line 419 "cfg.y" -+#line 424 "cfg.y" - { - if(yyvsp[0].tv_int < 1 || yyvsp[0].tv_int > 60) - return yyerror("Netflow active timeout " -@@ -1284,16 +1289,16 @@ - ; - break;} - case 58: --#line 425 "cfg.y" -+#line 430 "cfg.y" - { - if(yyvsp[0].tv_int < 1 || yyvsp[0].tv_int > 600) -- return yyerror("Netflow active timeout " -+ return yyerror("Netflow inactive timeout " - "out of range 1..600"); - conf->netflow_timeout_inactive = yyvsp[0].tv_int; - ; - break;} - case 59: --#line 431 "cfg.y" -+#line 436 "cfg.y" - { - if(yyvsp[0].tv_int < 0 || yyvsp[0].tv_int > 255) - return yyerror("Netflow engine-type " -@@ -1302,7 +1307,7 @@ - ; - break;} - case 60: --#line 437 "cfg.y" -+#line 442 "cfg.y" - { - if(yyvsp[0].tv_int < 0 || yyvsp[0].tv_int > 255) - return yyerror("Netflow engine-id " -@@ -1311,7 +1316,7 @@ - ; - break;} - case 61: --#line 443 "cfg.y" -+#line 448 "cfg.y" - { - if(yyvsp[0].tv_int < 10 || yyvsp[0].tv_int > 16382) - return yyerror("Netflow packet interval " -@@ -1320,7 +1325,7 @@ - ; - break;} - case 62: --#line 449 "cfg.y" -+#line 454 "cfg.y" - { - if(yyvsp[-2].tv_int > yyvsp[0].tv_int) - return yyerror("NetFlow invalid range: %d..%d", -@@ -1405,7 +1410,7 @@ - count = 0; - /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ - for (x = (yyn < 0 ? -yyn : 0); -- x < (sizeof(yytname) / sizeof(char *)); x++) -+ x < (int)(sizeof(yytname) / sizeof(char *)); x++) - if (yycheck[x + yyn] == x) - size += strlen(yytname[x]) + 15, count++; - msg = (char *) malloc(size + 15); -@@ -1417,7 +1422,7 @@ - { - count = 0; - for (x = (yyn < 0 ? -yyn : 0); -- x < (sizeof(yytname) / sizeof(char *)); x++) -+ x < (int)(sizeof(yytname) / sizeof(char *)); x++) - if (yycheck[x + yyn] == x) - { - strcat(msg, count == 0 ? ", expecting `" : " or `"); -@@ -1553,7 +1558,7 @@ - } - return 1; - } --#line 460 "cfg.y" -+#line 465 "cfg.y" - - - int -diff -Naur ipcad-3.7/ChangeLog ipcad/ChangeLog ---- ipcad-3.7/ChangeLog 2005-11-21 07:41:07.000000000 +0300 -+++ ipcad/ChangeLog 2006-04-07 22:58:28.000000000 +0400 -@@ -1,6 +1,11 @@ - - ipcad - -+3.7.2: 2006-Mar-27 -+ -+ * ULOG collector: ability to differentiate by hook id (nlgroup). -+ Suggested by Sergey Skachkov <srg11@mail.ru>. -+ - 3.7: 2005-Jul-06 - - * Added `interface file <filename>` possibility for reading from -diff -Naur ipcad-3.7/configure.in ipcad/configure.in ---- ipcad-3.7/configure.in 2005-11-21 07:41:07.000000000 +0300 -+++ ipcad/configure.in 2006-03-27 17:57:29.000000000 +0400 -@@ -2,7 +2,7 @@ - AC_INIT(ipcad.h) - AC_CONFIG_HEADER(config.h) - --IPCAD_VERSION="3.7" -+IPCAD_VERSION="3.7.2" - export IPCAD_VERSION - AC_SUBST(IPCAD_VERSION) - -diff -Naur ipcad-3.7/contrib/ipcad.redhat.sh ipcad/contrib/ipcad.redhat.sh ---- ipcad-3.7/contrib/ipcad.redhat.sh 1970-01-01 03:00:00.000000000 +0300 -+++ ipcad/contrib/ipcad.redhat.sh 2004-09-28 17:15:30.000000000 +0400 -@@ -0,0 +1,45 @@ -+#!/bin/sh -+# -+# ipcad This shell script takes care of starting and stopping -+# the ipcad daemon. -+# -+# chkconfig: 2345 07 93 -+# description: IP Cisco Accounting Daemon -+# -+ -+# Source function library -+. /etc/rc.d/init.d/functions -+ -+OPTIONS="-rds" # Read tables on startup, daemonize, and save tables on exit -+IPCAD_PATH=/usr/sbin/ipcad -+ -+case "$1" in -+ start) -+ echo -n "Starting ipcad: " -+ daemon $IPCAD_PATH $OPTIONS -+ RETVAL=$? -+ echo -+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ipcad -+ ;; -+ stop) -+ echo -n "Stopping ipcad: " -+ killproc $IPCAD_PATH -+ RETVAL=$? -+ echo -+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ipcad -+ ;; -+ restart) -+ $0 stop -+ sleep 5 -+ $0 start -+ ;; -+ status) -+ status $IPCAD_PATH -+ ;; -+ *) -+ echo "Usage: $0 {start|stop|restart|status}" -+ exit 1 -+ ;; -+esac -+ -+exit 0 -diff -Naur ipcad-3.7/contrib/README ipcad/contrib/README ---- ipcad-3.7/contrib/README 1970-01-01 03:00:00.000000000 +0300 -+++ ipcad/contrib/README 2004-09-28 17:15:30.000000000 +0400 -@@ -0,0 +1 @@ -+ipcad.redhat.sh - The ipcad startup script for RedHat/Fedora -diff -Naur ipcad-3.7/import.c ipcad/import.c ---- ipcad-3.7/import.c 2005-11-21 07:41:06.000000000 +0300 -+++ ipcad/import.c 2006-04-07 23:24:58.000000000 +0400 -@@ -1,5 +1,5 @@ - /*- -- * Copyright (c) 2001, 2002 Lev Walkin <vlm@lionet.info>. -+ * Copyright (c) 2001, 2002, 2006 Lev Walkin <vlm@lionet.info>. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without -@@ -23,7 +23,7 @@ - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * -- * $Id: ipcad-3.7-20060614-cvs.patch,v 1.1 2006/06/14 13:33:31 pva Exp $ -+ * $Id: ipcad-3.7-20060614-cvs.patch,v 1.1 2006/06/14 13:33:31 pva Exp $ - */ - - #include "ipcad.h" -@@ -94,7 +94,8 @@ - } - - if((sb.st_mode & 0077)) { -- fprintf(msgstream, "Insecure dump file permissions.\n"); -+ fprintf(msgstream, "Insecure dump file permissions. " -+ "Try `chmod 600 %s`\n", dump_file); - fclose(f); - return -1; - } -@@ -195,16 +196,49 @@ - return 0; - } - -- if(clear) -- fprintf(msgstream, -- "%ld elements got from %s.\n", -- entries, dump_file); -- else -- fprintf(msgstream, -- "%ld elements added from %s.\n", -- entries, dump_file); -+ fprintf(msgstream, "%s %ld elements from %s.\n", -+ clear ? "Got" : "Added", entries, dump_file); -+ -+ if(clear && entries) { -+ /* Analyse hash for collisions */ -+ double sumsq = 0.0; -+ double sum = 0.0; -+ int longest_chain = 0; -+ int longest_chain_no = 0; -+ int numbuckets; -+ int bucket; /* Bucket number */ -+ -+ lock_storage(&active_storage); -+ for(bucket = 0; bucket < active_storage.numbuckets; bucket++) { -+ int chainLength = 0; -+ flow_el_t *cur; -+ -+ /* Allow others to run... */ -+ unlock_storage(&active_storage); -+ lock_storage(&active_storage); -+ -+ for(cur = active_storage.buckets[bucket]; -+ cur; cur = cur->bucket_next) -+ chainLength++; -+ if(longest_chain < chainLength) { -+ longest_chain = chainLength; -+ longest_chain_no = bucket; -+ } -+ -+ sumsq += ((double)chainLength) * chainLength; -+ sum += chainLength; -+ } -+ numbuckets = active_storage.numbuckets; -+ unlock_storage(&active_storage); -+ -+ fprintf(stderr, "Storage: chained %d in %d bucket out of %d, mean %.1f dev^2 %.1f\n", -+ longest_chain, longest_chain_no, numbuckets, -+ sum / numbuckets, -+ sumsq / numbuckets -+ - (sum * sum / numbuckets / numbuckets) -+ ); -+ } - - return 0; - } - -- -diff -Naur ipcad-3.7/ipcad.conf.5 ipcad/ipcad.conf.5 ---- ipcad-3.7/ipcad.conf.5 2005-11-21 07:41:07.000000000 +0300 -+++ ipcad/ipcad.conf.5 2006-01-21 14:30:04.000000000 +0300 -@@ -43,7 +43,7 @@ - .Bd -filled -offset indent - Defines a buffer size to use for transferring the data from the kernel. Using - larger buffers may increase the performance by lowering the number --of expensive context switches, but using smaller values improves responsiveness. -+of expensive context switches, whereas using smaller values improves responsiveness. - .Pp - NOTE: This option has no effect on NetFlow operation. - .Ed -@@ -60,7 +60,7 @@ - .Pp - .Bd -filled -offset indent - Listen on specified interface using BPF or PCAP packet source. (Please refer to the --.Nm Interface configuration -+.Nm Interface options - section below). - .Ed - .Pp -diff -Naur ipcad-3.7/loop-file.c ipcad/loop-file.c ---- ipcad-3.7/loop-file.c 2005-11-21 07:41:06.000000000 +0300 -+++ ipcad/loop-file.c 2006-04-07 22:58:02.000000000 +0400 -@@ -23,7 +23,7 @@ - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * -- * $Id: ipcad-3.7-20060614-cvs.patch,v 1.1 2006/06/14 13:33:31 pva Exp $ -+ * $Id: ipcad-3.7-20060614-cvs.patch,v 1.1 2006/06/14 13:33:31 pva Exp $ - */ - - #include "ipcad.h" -@@ -43,7 +43,7 @@ - assert(ps->iface_type == IFACE_FILE); - - while(!signoff_now) { -- assert(ps->iface.file.dev); -+ if(ps->iface.file.dev == NULL) { sleep(5); continue; } - pdr = pcap_loop(ps->iface.file.dev, 0, - pcap_callback, (unsigned char *)ps); - if(pdr <= 0) -diff -Naur ipcad-3.7/loop-ulog.c ipcad/loop-ulog.c ---- ipcad-3.7/loop-ulog.c 2005-11-21 07:41:06.000000000 +0300 -+++ ipcad/loop-ulog.c 2006-03-27 17:57:29.000000000 +0400 -@@ -1,5 +1,5 @@ - /*- -- * Copyright (c) 2003 Lev Walkin <vlm@lionet.info>. -+ * Copyright (c) 2003, 2006 Lev Walkin <vlm@lionet.info>. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without -@@ -23,7 +23,7 @@ - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * -- * $Id: ipcad-3.7-20060614-cvs.patch,v 1.1 2006/06/14 13:33:31 pva Exp $ -+ * $Id: ipcad-3.7-20060614-cvs.patch,v 1.1 2006/06/14 13:33:31 pva Exp $ - */ - - #include "ipcad.h" -@@ -51,7 +51,7 @@ - ulog_packet_msg_t *upkt; - packet_source_t *ps = psp; - ssize_t len = 0; -- int addrlen; -+ socklen_t addrlen; - - assert(ps->iface_type == IFACE_ULOG); - assert(ps->bufsize); -@@ -102,6 +102,17 @@ - - upkt = NLMSG_DATA(nlh); - -+ /* If interface name is not given, -+ * fake it using ULOG group id */ -+ if(upkt->indev_name[0] == 0) { -+ char *p = upkt->indev_name; -+ int nlgroup = upkt->hook + 1; -+ memcpy(p, "ulog", 4); p += 4; -+ if(nlgroup >= 10) /* Max is 32 anyway */ -+ *p++ = '0' + (nlgroup / 10); -+ *p++ = '0' + (nlgroup % 10); -+ *p = '\0'; -+ } - process_packet_data(ps, upkt->payload, upkt->data_len, - upkt->indev_name, upkt->outdev_name); - -diff -Naur ipcad-3.7/Makefile ipcad/Makefile ---- ipcad-3.7/Makefile 2005-11-21 07:41:07.000000000 +0300 -+++ ipcad/Makefile 1970-01-01 03:00:00.000000000 +0300 -@@ -1,4 +0,0 @@ --all: bootstrap -- --bootstrap: -- ./configure && make -diff -Naur ipcad-3.7/Makefile.in ipcad/Makefile.in ---- ipcad-3.7/Makefile.in 2005-11-21 07:41:07.000000000 +0300 -+++ ipcad/Makefile.in 2006-02-11 20:21:11.000000000 +0300 -@@ -72,10 +72,10 @@ - @mv y.tab.h cshelly.h - - cslex.c: cslex.l -- ${LEX} -sp -Cem -ocslex.c -PCS cslex.l -+ ${LEX} -s -p -Cem -ocslex.c -PCS cslex.l - - cfglex.c: cfglex.l -- ${LEX} -sp -Cem -ocfglex.c -Pipcacfg cfglex.l -+ ${LEX} -s -p -Cem -ocfglex.c -Pipcacfg cfglex.l - - - man: ipcad.8 ipcad.conf.5 -diff -Naur ipcad-3.7/psrc-bpf.c ipcad/psrc-bpf.c ---- ipcad-3.7/psrc-bpf.c 2005-11-21 07:41:06.000000000 +0300 -+++ ipcad/psrc-bpf.c 2006-04-07 22:58:36.000000000 +0400 -@@ -23,7 +23,7 @@ - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * -- * $Id: ipcad-3.7-20060614-cvs.patch,v 1.1 2006/06/14 13:33:31 pva Exp $ -+ * $Id: ipcad-3.7-20060614-cvs.patch,v 1.1 2006/06/14 13:33:31 pva Exp $ - */ - - #include "ipcad.h" -@@ -123,6 +123,7 @@ - * Attach an interface to the BPF. - */ - -+ memset(&ifr, 0, sizeof(ifr)); - strncpy( ifr.ifr_name, IFNameBySource(ps), sizeof(ifr.ifr_name) ); - - /* Bind to a specified interface */ -diff -Naur ipcad-3.7/psrc-file.c ipcad/psrc-file.c ---- ipcad-3.7/psrc-file.c 2005-11-21 07:41:06.000000000 +0300 -+++ ipcad/psrc-file.c 2006-04-07 22:58:02.000000000 +0400 -@@ -23,7 +23,7 @@ - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * -- * $Id: ipcad-3.7-20060614-cvs.patch,v 1.1 2006/06/14 13:33:31 pva Exp $ -+ * $Id: ipcad-3.7-20060614-cvs.patch,v 1.1 2006/06/14 13:33:31 pva Exp $ - */ - - #include "ipcad.h" -@@ -46,6 +46,8 @@ - dev = pcap_open_offline(IFNameBySource(ps), errbuf); - if(dev == NULL) { - fprintf(stderr, "[%s] ", errbuf); -+ ps->state = PST_FINISHED; -+ errno = EINVAL; - return -1; - } - -@@ -102,7 +104,8 @@ - fprintf(stderr, "[Unknown interface type] "); - pcap_close(ps->iface.file.dev); - ps->iface.file.dev = NULL; -- errno = ENODEV; -+ ps->state = PST_FINISHED; -+ errno = EINVAL; - return -1; - }; - -diff -Naur ipcad-3.7/servers.c ipcad/servers.c ---- ipcad-3.7/servers.c 2005-11-21 07:41:06.000000000 +0300 -+++ ipcad/servers.c 2006-04-07 22:58:02.000000000 +0400 -@@ -23,7 +23,7 @@ - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * -- * $Id: ipcad-3.7-20060614-cvs.patch,v 1.1 2006/06/14 13:33:31 pva Exp $ -+ * $Id: ipcad-3.7-20060614-cvs.patch,v 1.1 2006/06/14 13:33:31 pva Exp $ - */ - - #include "ipcad.h" -@@ -69,6 +69,7 @@ - int rc; - - if(!servers_head) { -+ if(daemon_mode) - printf("No servers defined. How will you gather data? ;)\n"); - return 0; - } -diff -Naur ipcad-3.7/storage.c ipcad/storage.c ---- ipcad-3.7/storage.c 2005-11-21 07:41:06.000000000 +0300 -+++ ipcad/storage.c 2006-04-07 23:24:58.000000000 +0400 -@@ -23,7 +23,7 @@ - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * -- * $Id: ipcad-3.7-20060614-cvs.patch,v 1.1 2006/06/14 13:33:31 pva Exp $ -+ * $Id: ipcad-3.7-20060614-cvs.patch,v 1.1 2006/06/14 13:33:31 pva Exp $ - */ - - #include "ipcad.h" -@@ -358,7 +358,7 @@ - int h; - - h = -- flow->src.s_addr -+ (flow->src.s_addr >> 1) - ^ flow->dst.s_addr - ^ (int)flow->ifSource - ^ flow->ifInIndex |