* Simplified code a bit.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35271 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2010-01-24 12:15:31 +00:00
parent c30aac4e5e
commit 4e32bf0954
+5 -10
View File
@@ -642,17 +642,12 @@ get_buffer_route(net_domain* _domain, net_buffer* buffer, net_route** _route)
status_t status = B_OK; status_t status = B_OK;
sockaddr* source = buffer->source; sockaddr* source = buffer->source;
// TODO we are quite relaxed in the address checking here // TODO: we are quite relaxed in the address checking here
// as we might proceed with srcaddr=INADDR_ANY. // as we might proceed with source = INADDR_ANY.
if (route->interface && route->interface->address) { if (route->interface != NULL && route->interface->address != NULL) {
sockaddr* interfaceAddress = route->interface->address; status = domain->address_module->update_to(source,
net_address_module_info* addressModule = domain->address_module; route->interface->address);
if (addressModule->is_empty_address(source, true))
addressModule->set_to(source, interfaceAddress);
else
status = addressModule->update_to(source, interfaceAddress);
} }
if (status != B_OK) if (status != B_OK)