Browse Source

Patch: Fix broken v9 flow creation for IPv6

Christoph Biedl 14 years ago
parent
commit
536366d191
2 changed files with 31 additions and 0 deletions
  1. 30 0
      debian/patches/21-fix-ipv6-v9-flow-creation.patch
  2. 1 0
      debian/patches/series

+ 30 - 0
debian/patches/21-fix-ipv6-v9-flow-creation.patch

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

+ 1 - 0
debian/patches/series

@@ -1 +1,2 @@
 20-allow-any-interface.patch
+21-fix-ipv6-v9-flow-creation.patch