Message ID | 2021102713161934142725@chinatelecom.cn |
---|---|
State | Handled Elsewhere |
Headers | show |
Series | [ovs-dev] tests: fix packet data endianness | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | warning | apply and check: warning |
ovsrobot/github-robot-_Build_and_Test | fail | github build: failed |
diff --git a/tests/flowgen.py b/tests/flowgen.py index 7ef32d1..9823167 100755 --- a/tests/flowgen.py +++ b/tests/flowgen.py @@ -135,7 +135,7 @@ def output(attrs): 12893) # urgent pointer if attrs['TP_PROTO'] == 'TCP+options': tcp = (tcp[:12] - + struct.pack('H', (6 << 12) | 0x02 | 0x10) + + struct.pack('>H', (6 << 12) | 0x02 | 0x10) + tcp[14:]) tcp += struct.pack('>BBH', 2, 4, 1975) # MSS option tcp += b'payload'
Without this fix, flowgen.py generates bad tcp pkts. tcpdump reports "bad hdr length 4 - too short" with the pcap generated by flowgen.py This patch is to correct pkt data endianness Signed-off-by: lic121 <lic121@chinatelecom.cn> --- tests/flowgen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.8.3.1