summaryrefslogtreecommitdiff
path: root/package/pmacct/patches/patch-src_nfprobe_plugin_netflow9_c
blob: a0f757c8f5b080032ef8eda3caf3f5097e479a36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
--- pmacct-0.12.2.orig/src/nfprobe_plugin/netflow9.c	2010-04-21 16:53:36.000000000 +0200
+++ pmacct-0.12.2/src/nfprobe_plugin/netflow9.c	2010-07-15 15:11:23.575859230 +0200
@@ -396,8 +396,8 @@ nf9_init_template(void)
 */
 	
 	rcount = 0;
-	bzero(&v4_template, sizeof(v4_template));
-	bzero(&v4_int_template, sizeof(v4_int_template));
+	memset(&v4_template, 0, sizeof(v4_template));
+	memset(&v4_int_template, 0, sizeof(v4_int_template));
 
 	v4_template.r[rcount].type = htons(NF9_LAST_SWITCHED);
 	v4_template.r[rcount].length = htons(4);
@@ -588,8 +588,8 @@ nf9_init_template(void)
 	  v4_int_template.tot_rec_len += v4_int_template.r[idx].length;
 
 	rcount = 0;
-	bzero(&v6_template, sizeof(v6_template));
-	bzero(&v6_int_template, sizeof(v6_int_template));
+	memset(&v6_template, 0, sizeof(v6_template));
+	memset(&v6_int_template, 0, sizeof(v6_int_template));
 
 	v6_template.r[rcount].type = htons(NF9_LAST_SWITCHED);
 	v6_template.r[rcount].length = htons(4);
@@ -786,8 +786,8 @@ nf9_init_options_template(void)
 	int rcount, idx;
 
         rcount = 0;
-        bzero(&options_template, sizeof(options_template));
-        bzero(&options_int_template, sizeof(options_int_template));
+        memset(&options_template, 0, sizeof(options_template));
+        memset(&options_int_template, 0, sizeof(options_int_template));
 
         options_template.r[rcount].type = htons(NF9_OPT_SCOPE_SYSTEM);
         options_template.r[rcount].length = htons(0);
@@ -826,8 +826,8 @@ nf_flow_to_flowset(const struct FLOW *fl
 	char *ftoft_ptr_0 = ftoft_buf_0;
 	char *ftoft_ptr_1 = ftoft_buf_1;
 
-	bzero(ftoft_buf_0, sizeof(ftoft_buf_0));
-	bzero(ftoft_buf_1, sizeof(ftoft_buf_1));
+	memset(ftoft_buf_0, 0, sizeof(ftoft_buf_0));
+	memset(ftoft_buf_1, 0, sizeof(ftoft_buf_1));
 	*len_used = nflows = ret_len = 0;
 
 	rec32 = htonl(timeval_sub_ms(&flow->flow_last, system_boot_time));
@@ -916,7 +916,7 @@ nf_options_to_flowset(u_char *packet, u_
         u_int8_t rec8;
         char *ftoft_ptr_0 = ftoft_buf_0;
 
-        bzero(ftoft_buf_0, sizeof(ftoft_buf_0));
+        memset(ftoft_buf_0, 0, sizeof(ftoft_buf_0));
         *len_used = nflows = ret_len = 0;
 
         rec8 = 1; /* NF9_FLOW_SAMPLER_ID */ 
@@ -975,7 +975,7 @@ send_netflow_v9(struct FLOW **flows, int
 
 	last_valid = num_packets = 0;
 	for (j = 0; j < num_flows;) {
-		bzero(packet, sizeof(packet));
+		memset(packet, 0, sizeof(packet));
 		nf9 = (struct NF9_HEADER *)packet;
 
 		nf9->version = htons(9);