shlee89 / athena

Apache License 2.0
13 stars 7 forks source link

TCP check header length with wrong condition #11

Open p84183 opened 1 year ago

p84183 commented 1 year ago

https://github.com/shlee89/athena/blob/ecc95b1f44d157b8f0f039e461df7c9f35305664/utils/misc/src/main/java/org/onlab/packet/TCP.java#L452

TCP headerLength shoubl be (offset * 4)

so this check with wrong condition checkHeaderLength(length, TCP_HEADER_LENGTH + tcp.dataOffset);

should be like IPV4 checkHeaderLength(length, tcp.dataOffset * 4);