* Applied patch by Jan Klötzke that prevents the ICMP module to answer broadcast

ping requests, and those before an interface is configured.
* Added comment that explains the consequences.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25995 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-06-17 16:04:24 +00:00
parent 64ee822252
commit 4122d6c0c0

View File

@ -251,10 +251,17 @@ icmp_receive_data(net_buffer *buffer)
case ICMP_TYPE_ECHO_REQUEST:
{
net_domain *domain;
if (buffer->interface != NULL)
if (buffer->interface != NULL) {
domain = buffer->interface->domain;
else
// We only reply to echo requests of our local interface; we
// don't reply to broadcast requests
if (!domain->address_module->equal_addresses(
buffer->interface->address, buffer->destination))
break;
} else
domain = sStackModule->get_domain(buffer->source->sa_family);
if (domain == NULL || domain->module == NULL)
break;