]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Always define IN_LINKLOCAL
authorRoy Marples <roy@marples.name>
Wed, 17 Oct 2007 15:46:04 +0000 (15:46 +0000)
committerRoy Marples <roy@marples.name>
Wed, 17 Oct 2007 15:46:04 +0000 (15:46 +0000)
client.c
interface.h
ipv4ll.h

index ab75afbf30118e3dbaaf2c159a387aa588201efc..3ca1abca603df46c0cd66a2eea0f05dfb0f05cf4 100644 (file)
--- a/client.c
+++ b/client.c
@@ -494,9 +494,7 @@ int dhcp_run (const options_t *options, int *pidfd)
                                case STATE_INIT:
                                        if (xid != 0) {
                                                if (iface->previous_address.s_addr != 0 &&
-#ifdef ENABLE_IPV4LL
                                                        ! IN_LINKLOCAL (iface->previous_address.s_addr) &&
-#endif
                                                        ! options->doinform)
                                                {
                                                        logger (LOG_ERR, "lost lease");
@@ -605,14 +603,12 @@ int dhcp_run (const options_t *options, int *pidfd)
                                        break;
                                case STATE_BOUND:
                                case STATE_RENEW_REQUESTED:
-#ifdef ENABLE_IPV4LL
                                        if (IN_LINKLOCAL (dhcp->address.s_addr)) {
                                                memset (&dhcp->address, 0, sizeof (struct in_addr));
                                                state = STATE_INIT;
                                                xid = 0;
                                                break;
                                        }
-#endif
                                        state = STATE_RENEWING;
                                        xid = random ();
                                case STATE_RENEWING:
index 59f5024f896aca8d95081280bd176195b7358aca..47dfe539bf2ef33db2bb8023d0b08053fb40a150 100644 (file)
                                                   ((ntohl (addr) & IN_CLASSB_NET) == 0xc0a80000))
 #endif
 
+#define LINKLOCAL_ADDR       0xa9fe0000
+#define LINKLOCAL_MASK       0xffff0000
+#define LINKLOCAL_BRDC          0xa9feffff
+
+#ifndef IN_LINKLOCAL
+# define IN_LINKLOCAL(addr) ((ntohl (addr) & IN_CLASSB_NET) == LINKLOCAL_ADDR)
+#endif
+
+
 typedef struct route_t
 {
        struct in_addr destination; 
index db5cb78b3a6099aa449f9dbc5439dfce234ad381..82ffe0b46a6249d8d38d8bd9173cc4f0dfab9bd0 100644 (file)
--- a/ipv4ll.h
+++ b/ipv4ll.h
 #include "dhcp.h"
 #include "interface.h"
 
-#define LINKLOCAL_ADDR       0xa9fe0000
-#define LINKLOCAL_MASK       0xffff0000
-#define LINKLOCAL_BRDC          0xa9feffff
-
-#ifndef IN_LINKLOCAL
-# define IN_LINKLOCAL(addr) ((ntohl (addr) & IN_CLASSB_NET) == LINKLOCAL_ADDR)
-#endif
-
 int ipv4ll_get_address (interface_t *iface, dhcp_t *dhcp);
 
 #endif