Conversation
|
Hi @guedou , Mistakenly pull request#3287 got closed. Raised this new one. Thanks |
guedou
left a comment
There was a problem hiding this comment.
This looks good to me.
Would you mind adding some simple unit tests such as https://github.com/secdev/scapy/blob/master/test/contrib/geneve.uts#L8 ?
e5d84ce to
30d30bc
Compare
|
Hi @guedou I am writing the unit test cases and got stuck at one place. Can you please provide your opinion where i am going wrong! Unit test case is s = Ether(dst='0c:42:a1:d1:da:98',src='40:a6:b7:0b:e9:b1')/Dot1Q(vlan=304,type='IPv4')/IP(proto=17,src='172.17.2.161',dst='172.17.2.32')/UDP(sport=57025,dport=6081)/GENEVE()/Ether(dst='fa:16:3e:81:fa:0f',src='fa:16:3e:e7:a9:8a',type=0x0800)/IP(proto=1,dst='192.168.2.181',src='192.168.2.92')/ICMP(type=8) While i am able to send proper packet with above packet construct, s.show2() doesnt show any other Encap post Geneve.
This makes existing unit test case fail (Which check further encap of Ether). I have checked packet length but didn't find any issue, may be missing anything. Can you please help to identify the issue? Thanks |
|
It seens that GeneveOptions is consuming all the remaining data. You likely need to define Line 524 in adaa923 |
0addba9 to
ed05162
Compare
|
Hi @guedou I did rework on clean up and updated unit cases as well. All unit cases passing now. Thanks |
ed05162 to
df23c6b
Compare
scapy/contrib/geneve.py
Outdated
There was a problem hiding this comment.
my bad..removed now
df23c6b to
97cc24f
Compare
Codecov Report
@@ Coverage Diff @@
## master #3329 +/- ##
===========================================
+ Coverage 0 86.30% +86.30%
===========================================
Files 0 282 +282
Lines 0 64044 +64044
===========================================
+ Hits 0 55275 +55275
- Misses 0 8769 +8769
|
currently, we dont have geneve options working. This patch aims to fix them.
97cc24f to
237fde2
Compare
|
LGTM |
currently, we dont have geneve options working.
This patch aims to fix them.
Unit test cases:
With Options:
Without options:
Checklist:
toxor,cd test && ./run_tests_py2, cd test && ./run_tests_py3)fixes #xxx