ipv4 & ipv6: remove_trailer() uses a positive size as parameter
Change-Id: Id7d009cfee7727afb8267703c22c467e5f636070 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3438 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
parent
7377c39855
commit
b6e85f802d
@ -311,9 +311,9 @@ FragmentPacket::AddFragment(uint16 start, uint16 end, net_buffer* buffer,
|
||||
gBufferModule->remove_header(buffer, previous->fragment.end - start);
|
||||
start = previous->fragment.end;
|
||||
}
|
||||
if (next != NULL && next->fragment.start < end) {
|
||||
TRACE(" remove trailer %d bytes", next->fragment.start - end);
|
||||
gBufferModule->remove_trailer(buffer, next->fragment.start - end);
|
||||
if (next != NULL && end > next->fragment.start) {
|
||||
TRACE(" remove trailer %d bytes", end - next->fragment.start);
|
||||
gBufferModule->remove_trailer(buffer, end - next->fragment.start);
|
||||
end = next->fragment.start;
|
||||
}
|
||||
|
||||
|
@ -350,9 +350,9 @@ FragmentPacket::AddFragment(uint16 start, uint16 end, net_buffer* buffer,
|
||||
gBufferModule->remove_header(buffer, previous->fragment.end - start);
|
||||
start = previous->fragment.end;
|
||||
}
|
||||
if (next != NULL && next->fragment.start < end) {
|
||||
TRACE(" remove trailer %d bytes", next->fragment.start - end);
|
||||
gBufferModule->remove_trailer(buffer, next->fragment.start - end);
|
||||
if (next != NULL && end > next->fragment.start) {
|
||||
TRACE(" remove trailer %d bytes", end - next->fragment.start);
|
||||
gBufferModule->remove_trailer(buffer, end - next->fragment.start);
|
||||
end = next->fragment.start;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user