tcpdirect icon indicating copy to clipboard operation
tcpdirect copied to clipboard

Fix UDP payload pointer calculation: use correct struct size for udp header

Open Naseefabu opened this issue 2 months ago • 0 comments

I get it TCPdirect/Openonload is designed primarily for 64-bit platforms—where pointer size coincidentally matches the 8-byte UDP header, masking the issue—is this the right way to do it ? because protocol handling should be platform-agnostic right ? The code initially subtracted the pointer size (4 bytes on 32-bit or 8 on 64-bit) instead of the struct's fixed size, Fixed by using sizeof(*udp).

Naseefabu avatar Oct 11 '25 08:10 Naseefabu