patch-src_nfprobe_plugin_netflow9_c 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- pmacct-0.11.6.orig/src/nfprobe_plugin/netflow9.c 2007-02-12 23:00:40.000000000 +0100
  3. +++ pmacct-0.11.6/src/nfprobe_plugin/netflow9.c 2009-05-30 16:28:41.207303809 +0200
  4. @@ -298,8 +298,8 @@ nf9_init_template(void)
  5. */
  6. rcount = 0;
  7. - bzero(&v4_template, sizeof(v4_template));
  8. - bzero(&v4_int_template, sizeof(v4_int_template));
  9. + memset(&v4_template, 0, sizeof(v4_template));
  10. + memset(&v4_int_template, 0, sizeof(v4_int_template));
  11. v4_template.r[rcount].type = htons(NF9_LAST_SWITCHED);
  12. v4_template.r[rcount].length = htons(4);
  13. @@ -443,8 +443,8 @@ nf9_init_template(void)
  14. v4_int_template.tot_rec_len += v4_int_template.r[idx].length;
  15. rcount = 0;
  16. - bzero(&v6_template, sizeof(v6_template));
  17. - bzero(&v6_int_template, sizeof(v6_int_template));
  18. + memset(&v6_template, 0, sizeof(v6_template));
  19. + memset(&v6_int_template, 0, sizeof(v6_int_template));
  20. v6_template.r[rcount].type = htons(NF9_LAST_SWITCHED);
  21. v6_template.r[rcount].length = htons(4);
  22. @@ -598,8 +598,8 @@ nf_flow_to_flowset(const struct FLOW *fl
  23. char *ftoft_ptr_0 = ftoft_buf_0;
  24. char *ftoft_ptr_1 = ftoft_buf_1;
  25. - bzero(ftoft_buf_0, sizeof(ftoft_buf_0));
  26. - bzero(ftoft_buf_1, sizeof(ftoft_buf_1));
  27. + memset(ftoft_buf_0, 0, sizeof(ftoft_buf_0));
  28. + memset(ftoft_buf_1, 0, sizeof(ftoft_buf_1));
  29. *len_used = nflows = ret_len = 0;
  30. rec32 = htonl(timeval_sub_ms(&flow->flow_last, system_boot_time));
  31. @@ -707,7 +707,7 @@ send_netflow_v9(struct FLOW **flows, int
  32. last_valid = num_packets = 0;
  33. for (j = 0; j < num_flows;) {
  34. - bzero(packet, sizeof(packet));
  35. + memset(packet, 0, sizeof(packet));
  36. nf9 = (struct NF9_HEADER *)packet;
  37. nf9->version = htons(9);