summaryrefslogtreecommitdiff
blob: 2b76e1c3f72ce6d80b7acb775214532667fc402d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Index: interface.h
===================================================================
--- interface.h	(revision 289)
+++ interface.h	(working copy)
@@ -53,6 +53,14 @@
 
 #define HWADDR_LEN				20	
 
+#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: client.c
===================================================================
--- client.c	(revision 289)
+++ client.c	(working copy)
@@ -489,9 +489,7 @@
 			switch (state) {
 				case STATE_INIT:
 					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");
 						xid = 0;
@@ -598,14 +596,12 @@
 					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: ipv4ll.h
===================================================================
--- ipv4ll.h	(revision 289)
+++ ipv4ll.h	(working copy)
@@ -25,14 +25,6 @@
 #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