]> git.meshlink.io Git - catta/blobdiff - avahi-autoipd/main.c
compile python module even without gtk. It seems, that most parts of python are not...
[catta] / avahi-autoipd / main.c
index 01ccc79ef9dd6d3bb6b0d7496f4b740d9be66e8d..ef529b9337c253ba48d6549f676dd539cf3b42e8 100644 (file)
@@ -1144,9 +1144,13 @@ static int loop(int iface, uint32_t addr) {
         for (i = 0; i < ETHER_ADDRLEN; i++)
             a += hw_address[i]*i;
 
+        a = (a % 0xFE00) + 0x0100;
+
         addr = htonl(IPV4LL_NETWORK | (uint32_t) a);
     }
 
+    assert(is_ll_address(addr));
+
     set_state(st, 1, addr);
 
     daemon_log(LOG_INFO, "Starting with address %s", inet_ntop(AF_INET, &addr, buf, sizeof(buf)));