Rev 523: ignore arp on loopback in http://samba.org/~tridge/ctdb

tridge at samba.org tridge at samba.org
Sat Jun 9 11:57:47 GMT 2007


------------------------------------------------------------
revno: 523
revision-id: tridge at samba.org-20070609115747-u1bcpt53aa1sff1j
parent: tridge at samba.org-20070609114706-yyeee2n33bdie2jb
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge
timestamp: Sat 2007-06-09 21:57:47 +1000
message:
  ignore arp on loopback
modified:
  takeover/system.c              system.c-20070525071636-a5n1ihghjtppy08r-3
=== modified file 'takeover/system.c'
--- a/takeover/system.c	2007-06-06 03:45:12 +0000
+++ b/takeover/system.c	2007-06-09 11:57:47 +0000
@@ -66,9 +66,16 @@
 		DEBUG(0,(__location__ " ioctl failed\n"));
 		return -1;
 	}
+	if (ARPHRD_LOOPBACK == if_hwaddr.ifr_hwaddr.sa_family) {
+		DEBUG(3,("Ignoring loopback arp request\n"));
+		close(s);
+		return 0;
+	}
 	if (if_hwaddr.ifr_hwaddr.sa_family != AF_LOCAL) {
 		close(s);
-		DEBUG(0,(__location__ " not an ethernet address\n"));
+		errno = EINVAL;
+		DEBUG(0,(__location__ " not an ethernet address family (0x%x)\n",
+			 if_hwaddr.ifr_hwaddr.sa_family));
 		return -1;
 	}
 



More information about the samba-cvs mailing list