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