Skip to content
Permalink
Browse files

Merge branch 'master' into 0.4.6a

  • Loading branch information
chenall committed Oct 17, 2014
2 parents a3b8d8d + b0bb604 commit 53a342461b4a728d8bccc92dedd218aba64ffe99
Showing with 24 additions and 0 deletions.
  1. +1 −0 ChangeLog_GRUB4DOS.txt
  2. +23 −0 stage2/fsys_pxe.c
@@ -1,3 +1,4 @@
2014-10-17 PXE Boot supported proxyDHCP and gateway.
2014-10-10 (tinybit) two variables boot_drive and install_partition can be preset to a value before transferring control to grub4dos.
2014-09-08 (tinybit) supported backslash-delimited pathname used by pxe server.
2014-09-04 fixed a bug in dir();(reported by Steve6375,issue 154).
@@ -186,6 +186,29 @@ int pxe_detect (int blksize, char *config) //void pxe_detect (void)
return 0;

// pxe_inited = 1;
// for proxyDHCP compatible and auto reset sip/gip with pxe_detect
if (discover_reply->sip)
pxe_sip = discover_reply->sip;
if (discover_reply->gip)
pxe_gip = discover_reply->gip;
else
{//get route gateway
grub_u8_t *p = discover_reply->vendor.d;
if (*(long*)p == 0x63538263)//DHCP magic cookie 99.130.83.99
{
for(i=4;i<BOOTP_DHCPVEND;i += p[i] + 1)
{
grub_u8_t code = p[i++];
if (!code || code == '\xff')
break;
if (code == '\x3')//Router Option
{
pxe_gip = *(IP4*)(p + i + 1);
break;
}
}
}
}

if (discover_reply->bootfile[0])
{

0 comments on commit 53a3424

Please sign in to comment.
You can’t perform that action at this time.