* 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:
@@ -251,10 +251,17 @@ icmp_receive_data(net_buffer *buffer)
|
|||||||
case ICMP_TYPE_ECHO_REQUEST:
|
case ICMP_TYPE_ECHO_REQUEST:
|
||||||
{
|
{
|
||||||
net_domain *domain;
|
net_domain *domain;
|
||||||
if (buffer->interface != NULL)
|
if (buffer->interface != NULL) {
|
||||||
domain = buffer->interface->domain;
|
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);
|
domain = sStackModule->get_domain(buffer->source->sa_family);
|
||||||
|
|
||||||
if (domain == NULL || domain->module == NULL)
|
if (domain == NULL || domain->module == NULL)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user