* Sending data required sockaddr_dl addresses without an interface name; it can

now deal with any sockaddr_dl as one would expect.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39721 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2010-12-04 14:30:10 +00:00
parent 7c10ef0cf9
commit 341056ce05
@@ -153,11 +153,11 @@ ethernet_frame_send_data(net_datalink_protocol* protocol, net_buffer* buffer)
ether_header &header = bufferHeader.Data();
header.type = htons(source.sdl_e_type);
memcpy(header.source, source.sdl_data, ETHER_ADDRESS_LENGTH);
memcpy(header.source, LLADDR(&source), ETHER_ADDRESS_LENGTH);
if ((buffer->flags & MSG_BCAST) != 0)
memcpy(header.destination, kBroadcastAddress, ETHER_ADDRESS_LENGTH);
else
memcpy(header.destination, destination.sdl_data, ETHER_ADDRESS_LENGTH);
memcpy(header.destination, LLADDR(&destination), ETHER_ADDRESS_LENGTH);
bufferHeader.Sync();
// make sure the framing is already written to the buffer at this point