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