Symptom
When Netflow is used to sample mpls packets with record type "mpls ipv4-ipv6-fields", for flows carrying ipv6 traffic over mpls, the TCP Flags Information Element ( Information Element number 6, also known as "tcpControlBits") reported will always be zero, irrespective of the actual value in the record flow. The issue is present for both Netflow V9 and V10 (IPFIX) export protocols.
Note that, in the commands to display flow records on the router, like the command "flow monitor record format table location and other variants of the command, the field will be displayed with correct value. The field name displaying the value is "L4TCPFlags". But when the same record is exported via Netflow v9 or IPFIX, the value is populated wrongly as zero.
Conditions
The issue is present for all IOS-XR platforms supporting Netflow. The Flow monitor-map used will look like,
flow monitor-map mpls-monitor
record mpls ipv4-ipv6-fields
In addition the issue affects only flows which have ipv6 payload transported by mpls, ie ipv6 over mpls. Flows with ipv4 over mpls, or other types of payloads are unaffected.
Also other mpls record types like "mpls" (raw mpls record) , "mpls ipv4-fields" and "mpls ipv6-fields" are unaffected.
Workaround
If the intention is to sample flows with ipv6 payloads over mpls only, or if the actual traffic contains only ipv6 over mpls, then the "mpls ipv6-fields" record type under flow monitor-map could be used to avoid the issue.
Further Problem Description
The issue affects all IOS-XR platforms supporting Netflow. The issue is present in all 07.04.XX, 07.05.XX, 07.06.XX and 07.07.XX releases except in 07.05.04 version, where the fix is available. The issue is not present in prior release versions. The issue is present in 07.08.01, but is fixed in 07.08.02 and further 07.08.XX releases. The fix is also available on 07.09.01 and all subsequent releases.
Also as noted above, the issue is present for both Netflow V9 and V10 (IPFIX) export protocols.
The issue does not affect any other areas of the Netflow functionality.