mirror of
https://github.com/reactos/reactos.git
synced 2025-05-18 16:51:18 +00:00
- Send a gratuitous ARP packet when our IP address changes
svn path=/trunk/; revision=42455
This commit is contained in:
parent
50eb85ed3b
commit
f1b8d48df1
2 changed files with 10 additions and 1 deletions
|
@ -123,6 +123,11 @@ BOOLEAN ARPTransmit(PIP_ADDRESS Address, PIP_INTERFACE Interface)
|
|||
|
||||
TI_DbgPrint(DEBUG_ARP, ("Called.\n"));
|
||||
|
||||
/* If Address is NULL then the caller wants an
|
||||
* gratuitous ARP packet sent */
|
||||
if (!Address)
|
||||
Address = &Interface->Unicast;
|
||||
|
||||
switch (Address->Type) {
|
||||
case IP_ADDRESS_V4:
|
||||
ProtoType = (USHORT)ETYPE_IPv4; /* IPv4 */
|
||||
|
|
|
@ -222,8 +222,12 @@ VOID IPAddInterfaceRoute( PIP_INTERFACE IF ) {
|
|||
|
||||
if (!RouterAddRoute(&NetworkAddress, &IF->Netmask, NCE, 1)) {
|
||||
TI_DbgPrint(MIN_TRACE, ("Could not add route due to insufficient resources.\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
/* Send a gratuitous ARP packet to update the route caches of
|
||||
* other computers */
|
||||
if (IF != Loopback)
|
||||
ARPTransmit(NULL, IF);
|
||||
}
|
||||
|
||||
BOOLEAN IPRegisterInterface(
|
||||
|
|
Loading…
Reference in a new issue