|
@@ -0,0 +1,38 @@
+--- ./bin/netflow_v9.h.orig 2010-08-19 16:43:15.351390974 +0200
++++ ./bin/netflow_v9.h 2010-08-19 16:44:22.971142931 +0200
+@@ -209,6 +209,8 @@
+ #define NF9_SRC_VLAN 58
+ #define NF9_DST_VLAN 59
+
++#define NF9_IP_PROTOCOL_VERSION 60
++
+ #define NF9_DIRECTION 61
+ #define NF9_V6_NEXT_HOP 62
+ #define NF9_BPG_V6_NEXT_HOP 63
+--- ./bin/netflow_v9.c.orig 2010-08-19 16:43:19.503387884 +0200
++++ ./bin/netflow_v9.c 2010-08-19 21:16:30.209187216 +0200
+@@ -213,8 +213,8 @@
+ { 2, 2, 13}, // 58 - NF9_SRC_VLAN
+ { 2, 2, 13}, // 59 - NF9_DST_VLAN
+
+- // 60 not implemented
+- { 0, 0, 0},
++ // 60 ip protocol version
++ { 1, 1, 0},
+
+ { 1, 1, 8 }, // 61 - NF9_DIRECTION
+
+@@ -576,11 +576,11 @@
+ * This record is expected in the output stream. If not available
+ * in the template, assume empty v4 address.
+ */
+- if ( input_template[NF9_IPV4_SRC_ADDR].length ) {
++ if ( input_template[NF9_IPV4_SRC_ADDR].length && input_template[NF9_IP_PROTOCOL_VERSION].offset == 4 ) {
+ // IPv4 addresses
+ FillElement( table, NF9_IPV4_SRC_ADDR, &offset);
+ FillElement( table, NF9_IPV4_DST_ADDR, &offset);
+- } else if ( input_template[NF9_IPV6_SRC_ADDR].length == 16 ) {
++ } else if ( input_template[NF9_IPV6_SRC_ADDR].length == 16 && input_template[NF9_IP_PROTOCOL_VERSION].offset == 6 ) {
+ // IPv6 addresses
+ FillElement( table, NF9_IPV6_SRC_ADDR, &offset);
+ FillElement( table, NF9_IPV6_DST_ADDR, &offset);
|