------------------------------------------------------------
revno: 523
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
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;
        }
 

Reply via email to