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