From 4a5ca1013d84f9291890a15227a9c1297352d36a Mon Sep 17 00:00:00 2001 From: Alexey Gladkov Date: Thu, 13 Dec 2007 17:50:01 +0300 Subject: [PATCH] Fix gratuitous ARP I confirm the bug on Linux. This problem happens, when gratuitous_arp() appoints Sender IP value (arp[14]) in case of ARP request (enable_virtual==0). ----- Original Message ----- From: Marcus Goller To: Subject: [ucarp] Gratuitous ARP Date: Wednesday, March 21, 2007 - 10:13 am Hi, I am new to the list and just discovered ucarp recently and played around with the latest snapshot version 1.3. I am having some trouble with gratuitous ARP on Solaris, because when I start up the backup daemon, it sends out an ARP message which gets picked up by the network and the gateway sends traffic for the failover IP to the backup client. I narrowed down the issue to the line "gratuitous_arp(dev_desc_fd, 0);" in the carp_set_state function for the BACKUP case. If I comment it out, everything works as expected. Has anybody else noticed this? What exactly is the difference between enable_virtual = 0 and 1? From what I have seen, the packets look identical. Any help would be appreciated. Thanks, Marcus http://kerneltrap.org/mailarchive/ucarp/2007/3/21/418982 Signed-off-by: Petya Kohts Signed-off-by: Alexey Gladkov --- ucarp/src/garp.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/ucarp/src/garp.c b/ucarp/src/garp.c index 4264641..e24ba63 100644 --- a/ucarp/src/garp.c +++ b/ucarp/src/garp.c @@ -32,7 +32,6 @@ int gratuitous_arp(const int dev_desc_fd, const int enable_virtual) memcpy(&arp[14], &vaddr.s_addr, (size_t) 4U); } else { arp[7] = 0x01; - memcpy(&arp[14], &vaddr.s_addr, (size_t) 4U); memset(&arp[18], 0xff, ETHER_ADDR_LEN); memcpy(&arp[24], &vaddr.s_addr, (size_t) 4U); } -- 1.5.3.7.GIT