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");
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:
((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;
#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