82186fd
diff -up dhcp-4.0.0/common/lpf.c.anycast dhcp-4.0.0/common/lpf.c
82186fd
--- dhcp-4.0.0/common/lpf.c.anycast	2007-12-29 06:44:46.000000000 -1000
82186fd
+++ dhcp-4.0.0/common/lpf.c	2007-12-29 10:40:11.000000000 -1000
82186fd
@@ -331,6 +331,9 @@ ssize_t send_packet (interface, packet, 
203b45c
 		return send_fallback (interface, packet, raw,
203b45c
 				      len, from, to, hto);
203b45c
 
203b45c
+	if (hto == NULL && interface->anycast_mac_addr.hlen)
203b45c
+		hto = &interface->anycast_mac_addr;
203b45c
+
203b45c
 	/* Assemble the headers... */
203b45c
 	assemble_hw_header (interface, (unsigned char *)hh, &hbufp, hto);
203b45c
 	fudge = hbufp % 4;	/* IP header must be word-aligned. */
82186fd
diff -up dhcp-4.0.0/common/conflex.c.anycast dhcp-4.0.0/common/conflex.c
82186fd
--- dhcp-4.0.0/common/conflex.c.anycast	2007-12-29 06:44:46.000000000 -1000
82186fd
+++ dhcp-4.0.0/common/conflex.c	2007-12-29 10:39:30.000000000 -1000
82186fd
@@ -715,6 +715,8 @@ intern(char *atom, enum dhcp_token dfv) 
203b45c
 		}
203b45c
 		if (!strcasecmp (atom + 1, "nd"))
203b45c
 			return AND;
203b45c
+		if (!strcasecmp (atom + 1, "nycast-mac"))
203b45c
+			return ANYCAST_MAC;
203b45c
 		if (!strcasecmp (atom + 1, "ppend"))
203b45c
 			return APPEND;
203b45c
 		if (!strcasecmp (atom + 1, "llow"))
82186fd
diff -up dhcp-4.0.0/includes/dhcpd.h.anycast dhcp-4.0.0/includes/dhcpd.h
82186fd
--- dhcp-4.0.0/includes/dhcpd.h.anycast	2007-12-29 06:44:46.000000000 -1000
82186fd
+++ dhcp-4.0.0/includes/dhcpd.h	2007-12-29 10:42:56.000000000 -1000
82186fd
@@ -1188,6 +1188,7 @@ struct interface_info {
203b45c
 	int dlpi_sap_length;
203b45c
 	struct hardware dlpi_broadcast_addr;
203b45c
 # endif /* DLPI_SEND || DLPI_RECEIVE */
203b45c
+	struct hardware anycast_mac_addr;
203b45c
 };
203b45c
 
203b45c
 struct hardware_link {
82186fd
diff -up dhcp-4.0.0/includes/dhctoken.h.anycast dhcp-4.0.0/includes/dhctoken.h
82186fd
--- dhcp-4.0.0/includes/dhctoken.h.anycast	2007-12-29 06:44:46.000000000 -1000
82186fd
+++ dhcp-4.0.0/includes/dhctoken.h	2007-12-29 10:44:00.000000000 -1000
82186fd
@@ -346,7 +346,8 @@ enum dhcp_token {
82186fd
 	WHITESPACE = 649,
82186fd
 	TOKEN_ALSO = 650,
82186fd
 	AFTER = 651,
82186fd
-	BOOTP_BROADCAST_ALWAYS = 652
82186fd
+	BOOTP_BROADCAST_ALWAYS = 652,
82186fd
+	ANYCAST_MAC = 653
203b45c
 };
203b45c
 
203b45c
 #define is_identifier(x)	((x) >= FIRST_TOKEN &&	\
82186fd
diff -up dhcp-4.0.0/client/clparse.c.anycast dhcp-4.0.0/client/clparse.c
82186fd
--- dhcp-4.0.0/client/clparse.c.anycast	2007-12-29 06:44:46.000000000 -1000
82186fd
+++ dhcp-4.0.0/client/clparse.c	2007-12-29 10:38:55.000000000 -1000
82186fd
@@ -550,6 +550,17 @@ void parse_client_statement (cfile, ip, 
203b45c
 		}
203b45c
 		return;
203b45c
 
203b45c
+	      case ANYCAST_MAC:
203b45c
+		token = next_token (&val, (unsigned *)0, cfile);
203b45c
+		if (ip) {
203b45c
+			parse_hardware_param (cfile, &ip -> anycast_mac_addr);
203b45c
+		} else {
203b45c
+			parse_warn (cfile, "anycast mac address parameter %s",
82186fd
+			            "not allowed here.");
203b45c
+			skip_to_semi (cfile);
203b45c
+		}
203b45c
+		return;
203b45c
+
203b45c
 	      case REQUEST:
203b45c
 		token = next_token (&val, (unsigned *)0, cfile);
203b45c
 		if (config -> requested_options == default_requested_options)