You also have to recompute the checksum in case the source address was updated,

patch by Hugo Santos.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20490 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2007-04-01 11:38:37 +00:00
parent df0ca8cae0
commit 51541d38f5
1 changed files with 4 additions and 1 deletions

View File

@ -984,8 +984,11 @@ ipv4_send_routed_data(net_protocol *_protocol, struct net_route *route,
return bufferHeader.Status();
ipv4_header &header = bufferHeader.Data();
if (header.source == 0)
if (header.source == 0) {
header.source = source.sin_addr.s_addr;
header.checksum = gBufferModule->checksum(buffer,
sizeof(ipv4_header), sizeof(ipv4_header), true);
}
bufferHeader.Detach();
}