kbandla / dpkt

fast, simple packet creation / parsing, with definitions for the basic TCP/IP protocols
Other
1.08k stars 270 forks source link

Add test to catch the case where UDP checksum is calculated to be zero. #530

Closed crocogorical closed 3 years ago

crocogorical commented 3 years ago

It took me a while to come up with the correct parameters to use to hit this line, but this test executes the line in ip.py which will modify the UDP checksum to all ones in the case that it has been calculated to be all zeroes.

This takes ip.py to 100% test coverage.

brifordwylie commented 3 years ago

@crocogorical looks good, merged. Hey can you take at peak at this issue? https://github.com/kbandla/dpkt/issues/529