Hello,

I think I've discovered a slight bug in packet.hh when running on a 64-bit
machine. Details are outlined below and a patch is attached.

Problem:
I was seeing an extremely infrequent crash where the marker for the
beginning of the headers (mac, ip, tcp) was not being copied correctly
with uniqueify on my 64-bit machine.

Cause:
Packet::shift_header_annotations takes a 32 bit int and was being called
as 'shift_header_annotations(nskb->head + extra_headroom - old_head);' in
Packet::expensive_uniqueify, where nskb->head and old_head are 64 bit
pointers. With very large memory distances between the packets the 32 bit
int was not enough to hold the correct amount to shift.

Solution:
shift_header_annotations now accepts a 64 bit integer.

The patch compiled and ran on both 32 and 64 bit architectures.


~Kevin Springborn

Attachment: packet.patch
Description: Binary data

_______________________________________________
click mailing list
[email protected]
https://amsterdam.lcs.mit.edu/mailman/listinfo/click

Reply via email to