Fixing SFlowIpv6Record SFlowIpv4Record does not resolve the problem o…#401
Fixing SFlowIpv6Record SFlowIpv4Record does not resolve the problem o…#401lflxp wants to merge 3 commits intogoogle:masterfrom
Conversation
…f parsing caused by SFlowBaseFlowRecord
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
|
I signed it! |
|
i signed it!
…On 2 Jan 2018 16:21, "lflxp" ***@***.***> wrote:
I signed it!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#401 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABealOBeSyKm0fQpMfPPoHTxFS3MqXgrks5tGi1JgaJpZM4RQfSw>
.
|
|
I believe the CLA bot is specifically looking for a CLA from "李学坪" Also, currently Travis is complaining about this test failure: |
| si := SFlowIpv4Record{} | ||
| var ir SFlowFlowDataFormat | ||
|
|
||
| *data, ir = (*data)[4:], SFlowFlowDataFormat(binary.BigEndian.Uint32((*data)[:4])) |
There was a problem hiding this comment.
I did test it and it seems to be not working for tunneling record. I tested it with Openswitch. Did you see any issue with tunneling record or was it with another kind of record ?
There was a problem hiding this comment.
safchain, do you have a test case that could be added to the tests in this pull?
There was a problem hiding this comment.
@gconnell there is already a test that this PR modifies. According to my test with Openvswitch, it doesn't seem to be working properly with this patch.
@lflxp Maybe the IPV4/IPV6 records are used somewhere else by sFlow protocol needing SFlowBaseFlowRecord. In that case we will need to use a king of decodeSFlowIpv4Data used by decodeSFlowIpv4Record and decodeExtendedIpv4TunnelEgress.
Below two records from a lab, first one without the patch second one with it. In the second one the SFlowIpv4Record is incorrect.
{SFlowBaseFlowRecord:{EnterpriseID:Standard SFlow Format:Extended IPv4 Tunnel Ingress Record FlowDataLength:32} SFlowIpv4Record:{Length:0 Protocol:47 IPSrc:10.41.20.10 IPDst:10.41.20.14 PortSrc:0 PortDst:0 TCPFlags:0 TOS:0}}
{SFlowBaseFlowRecord:{EnterpriseID:Standard SFlow Format:Extended IPv4 Tunnel Ingress Record FlowDataLength:32} SFlowIpv4Record:{SFlowBaseFlowRecord:{EnterpriseID:Standard SFlow Format: FlowDataLength:47} Length:170464266 Protocol:170464270 IPSrc:0.0.0.0 IPDst:0.0.0.0 PortSrc:0 PortDst:0 TCPFlags:3 TOS:1001}}
When I parsed the sFlow V5 with gopacket, I found that the length of the SFlowIpv4Record interception was wrong, and it was found that the lack of SFlowBaseFlowRecord resulted in the lack of SFlowBaseFlowRecord