Author: cgutman Date: Fri Aug 7 05:21:56 2009 New Revision: 42455
URL: http://svn.reactos.org/svn/reactos?rev=42455&view=rev Log: - Send a gratuitous ARP packet when our IP address changes
Modified: trunk/reactos/lib/drivers/ip/network/arp.c trunk/reactos/lib/drivers/ip/network/ip.c
Modified: trunk/reactos/lib/drivers/ip/network/arp.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/arp.... ============================================================================== --- trunk/reactos/lib/drivers/ip/network/arp.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/ip/network/arp.c [iso-8859-1] Fri Aug 7 05:21:56 2009 @@ -122,6 +122,11 @@ USHORT ProtoType;
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:
Modified: trunk/reactos/lib/drivers/ip/network/ip.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/ip.c... ============================================================================== --- trunk/reactos/lib/drivers/ip/network/ip.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/ip/network/ip.c [iso-8859-1] Fri Aug 7 05:21:56 2009 @@ -222,8 +222,12 @@
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(