1
0

21-fix-ipv6-v9-flow-creation.patch 1.2 KB

123456789101112131415161718192021222324252627282930
  1. From: Christoph Biedl <debian.packages.hhqj@manchmal.in-ulm.de>
  2. Subject: Fix broken v9 flow creation for IPv6
  3. Forwarded: http://lists.mindrot.org/pipermail/netflow-tools/2011-February/000489.html
  4. --- a/netflow9.c
  5. +++ b/netflow9.c
  6. @@ -79,7 +79,7 @@ struct NF9_DATA_FLOWSET_HEADER {
  7. #define NF9_IP_PROTOCOL_VERSION 60
  8. /* Stuff pertaining to the templates that softflowd uses */
  9. -#define NF9_SOFTFLOWD_TEMPLATE_NRECORDS 11
  10. +#define NF9_SOFTFLOWD_TEMPLATE_NRECORDS 13
  11. struct NF9_SOFTFLOWD_TEMPLATE {
  12. struct NF9_TEMPLATE_FLOWSET_HEADER h;
  13. struct NF9_TEMPLATE_FLOWSET_RECORD r[NF9_SOFTFLOWD_TEMPLATE_NRECORDS];
  14. @@ -167,10 +167,10 @@ nf9_init_template(void)
  15. v6_template.r[4].length = htons(4);
  16. v6_template.r[5].type = htons(NF9_IN_PACKETS);
  17. v6_template.r[5].length = htons(4);
  18. - v4_template.r[6].type = htons(NF9_IF_INDEX_IN);
  19. - v4_template.r[6].length = htons(4);
  20. - v4_template.r[7].type = htons(NF9_IF_INDEX_OUT);
  21. - v4_template.r[7].length = htons(4);
  22. + v6_template.r[6].type = htons(NF9_IF_INDEX_IN);
  23. + v6_template.r[6].length = htons(4);
  24. + v6_template.r[7].type = htons(NF9_IF_INDEX_OUT);
  25. + v6_template.r[7].length = htons(4);
  26. v6_template.r[8].type = htons(NF9_L4_SRC_PORT);
  27. v6_template.r[8].length = htons(2);
  28. v6_template.r[9].type = htons(NF9_L4_DST_PORT);