Index: etherboot-5.4.3/src/core/nic.c
===================================================================
--- etherboot-5.4.3.orig/src/core/nic.c	2008-12-06 00:08:52.000000000 +0000
+++ etherboot-5.4.3/src/core/nic.c	2008-12-10 19:56:47.000000000 +0000
@@ -1358,7 +1358,7 @@
 				}
 			}
 #ifdef PXE_DHCP_STRICT
-			if (num_boot_menu) {
+			if (num_boot_menu && KERNEL_BUF[0] == '\0') {
 				int i;
 				printf("\nreceived PXE boot menu:\n");
 				for (i = 0; i < num_boot_menu; ++i) {
@@ -2219,15 +2219,30 @@
 int decode_rfc1533_proxydhcp(unsigned char *p, unsigned int len)
 {
 	unsigned char		*endp;
+	static unsigned char	in_encapsulated_options = 0;
+	static unsigned char	in_pxe_encapsulated_options = 0;
+	unsigned char		pxeclient;
 
 #define RFC1533_SERVER_IDENT 54
 
-	if (memcmp(p, rfc1533_cookie, 4))
-	  return(0); /* no RFC 1533 header found */
-	p += 4;
+	if (in_encapsulated_options == 0 && in_pxe_encapsulated_options == 0) {
+		if (memcmp(p, rfc1533_cookie, 4))
+			return(0); /* no RFC 1533 header found */
+		p += 4;
+		pxeclient = find_vci_pxeclient(p);
+	}
 	endp = p + len;
 	while (p < endp) {
 		unsigned char c = *p;
+#if 0
+		{
+			unsigned char *q;
+			printf("proxydhcp RFC1533-tag ");
+			for(q=p;q<p+2+TAG_LEN(p);q++)
+				printf("%hhX ",*q);
+			putchar('\n');
+		}
+#endif
 		if (c == RFC1533_PAD) {
 			p++;
 			continue;
@@ -2236,9 +2251,30 @@
 			endp = p;
 			continue;
 		}
-		else if (c == RFC1533_SERVER_IDENT)
+		else if (NON_ENCAP_OPT c == RFC1533_SERVER_IDENT)
 			arptable[ARP_PROXYDHCP].ipaddr.s_addr =
 				*(uint32_t *)(p+2);
+		else if (PXE_ENCAP_OPT c == PXE_BOOT_SERVERS) {
+			unsigned char *q = p + 2;
+			unsigned char *end = q + TAG_LEN(p);
+			while (q < end) {
+				decode_pxe_boot_servers(q);
+				q += q[2] * 4 + 3;
+			}
+		}
+		else if (PXE_ENCAP_OPT c == PXE_BOOT_MENU) {
+			unsigned char *q = p + 2;
+			unsigned char *end = q + TAG_LEN(p);
+			while (q < end) {
+				decode_pxe_boot_menu(q);
+				q += q[2] + 3;
+			}
+		}
+		else if (NON_ENCAP_OPT c == RFC1533_VENDOR && pxeclient) {
+			in_pxe_encapsulated_options = 1;
+			decode_rfc1533_proxydhcp(p+2, TAG_LEN(p));
+			in_pxe_encapsulated_options = 0;
+		}
 		else {
 #if 0
 			unsigned char *q;
