3161ff3
diff -up dhcp-4.1.0/client/clparse.c.anycast dhcp-4.1.0/client/clparse.c
3161ff3
--- dhcp-4.1.0/client/clparse.c.anycast	2009-01-06 10:43:52.000000000 -1000
3161ff3
+++ dhcp-4.1.0/client/clparse.c	2009-01-06 10:43:53.000000000 -1000
3161ff3
@@ -558,6 +558,17 @@ void parse_client_statement (cfile, ip, 
3161ff3
 		}
3161ff3
 		return;
9858513
 
3161ff3
+	      case ANYCAST_MAC:
3161ff3
+		token = next_token (&val, (unsigned *)0, cfile);
3161ff3
+		if (ip) {
3161ff3
+			parse_hardware_param (cfile, &ip -> anycast_mac_addr);
3161ff3
+		} else {
3161ff3
+			parse_warn (cfile, "anycast mac address parameter %s",
3161ff3
+			            "not allowed here.");
3161ff3
+			skip_to_semi (cfile);
3161ff3
+		}
3161ff3
+		return;
9858513
+
3161ff3
 	      case REQUEST:
3161ff3
 		token = next_token (&val, (unsigned *)0, cfile);
3161ff3
 		if (config -> requested_options == default_requested_options)
3161ff3
diff -up dhcp-4.1.0/common/conflex.c.anycast dhcp-4.1.0/common/conflex.c
3161ff3
--- dhcp-4.1.0/common/conflex.c.anycast	2009-01-06 10:43:52.000000000 -1000
3161ff3
+++ dhcp-4.1.0/common/conflex.c	2009-01-06 10:43:53.000000000 -1000
3161ff3
@@ -729,6 +729,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"))
3161ff3
diff -up dhcp-4.1.0/common/lpf.c.anycast dhcp-4.1.0/common/lpf.c
3161ff3
--- dhcp-4.1.0/common/lpf.c.anycast	2009-01-06 10:43:52.000000000 -1000
3161ff3
+++ dhcp-4.1.0/common/lpf.c	2009-01-06 10:43:53.000000000 -1000
3161ff3
@@ -333,6 +333,9 @@ ssize_t send_packet (interface, packet, 
3161ff3
 		return send_fallback (interface, packet, raw,
3161ff3
 				      len, from, to, hto);
3161ff3
 
3161ff3
+	if (hto == NULL && interface->anycast_mac_addr.hlen)
3161ff3
+		hto = &interface->anycast_mac_addr;
3161ff3
+
3161ff3
 	/* Assemble the headers... */
3161ff3
 	assemble_hw_header (interface, (unsigned char *)hh, &hbufp, hto);
3161ff3
 	fudge = hbufp % 4;	/* IP header must be word-aligned. */
3161ff3
diff -up dhcp-4.1.0/includes/dhcpd.h.anycast dhcp-4.1.0/includes/dhcpd.h
3161ff3
--- dhcp-4.1.0/includes/dhcpd.h.anycast	2009-01-06 10:43:53.000000000 -1000
3161ff3
+++ dhcp-4.1.0/includes/dhcpd.h	2009-01-06 10:43:53.000000000 -1000
3161ff3
@@ -1215,6 +1215,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 {
3161ff3
diff -up dhcp-4.1.0/includes/dhctoken.h.anycast dhcp-4.1.0/includes/dhctoken.h
3161ff3
--- dhcp-4.1.0/includes/dhctoken.h.anycast	2009-01-06 10:43:52.000000000 -1000
3161ff3
+++ dhcp-4.1.0/includes/dhctoken.h	2009-01-06 10:49:12.000000000 -1000
3161ff3
@@ -353,7 +353,8 @@ enum dhcp_token {
3161ff3
 	TEMPORARY = 656,
3161ff3
 	PREFIX6 = 657,
3161ff3
 	FIXED_PREFIX6 = 658,
3161ff3
-	BOOTP_BROADCAST_ALWAYS = 659
3161ff3
+	BOOTP_BROADCAST_ALWAYS = 659,
3161ff3
+	ANYCAST_MAC = 660
9858513
 };
9858513
 
9858513
 #define is_identifier(x)	((x) >= FIRST_TOKEN &&	\