Page MenuHomeFreeBSD

D10485.id27699.diff
No OneTemporary

D10485.id27699.diff

Index: /usr/src/lib/libstand/bootp.h
===================================================================
--- /usr/src/lib/libstand/bootp.h
+++ /usr/src/lib/libstand/bootp.h
@@ -94,6 +94,9 @@
#define TAG_SWAPSERVER ((unsigned char) 16)
#define TAG_ROOTPATH ((unsigned char) 17)
#define TAG_INTF_MTU ((unsigned char) 26)
+#define TAG_TFTP_SERVER ((unsigned char) 66)
+
+#define VEND_INFO_END 0xff /* End option in RFC2132 */
#ifdef SUPPORT_DHCP
#define TAG_REQ_ADDR ((unsigned char) 50)
@@ -108,7 +111,6 @@
#define TAG_T2 ((unsigned char) 59)
#define TAG_CLASSID ((unsigned char) 60)
#define TAG_CLIENTID ((unsigned char) 61)
-#define TAG_TFTP_SERVER ((unsigned char) 150)
#endif
#define TAG_END ((unsigned char) 255)
Index: /usr/src/lib/libstand/bootp.c
===================================================================
--- /usr/src/lib/libstand/bootp.c
+++ /usr/src/lib/libstand/bootp.c
@@ -365,6 +365,7 @@
int size;
u_char tag;
const char *val;
+ n_long ipaddr = INADDR_NONE;
#ifdef BOOTP_DEBUG
if (debug)
@@ -439,8 +440,9 @@
sizeof(dhcp_serverip.s_addr));
}
if (tag == TAG_TFTP_SERVER) {
- bcopy(cp, &tftpip.s_addr,
- sizeof(tftpip.s_addr));
+ val = strsep(&cp, VEND_INFO_END);
+ if ((ipaddr = inet_addr(val)) != INADDR_NONE)
+ tftpip.s_addr = ipaddr;
}
#endif
cp += size;
Index: /usr/src/sys/boot/i386/libi386/pxe.c
===================================================================
--- /usr/src/sys/boot/i386/libi386/pxe.c
+++ /usr/src/sys/boot/i386/libi386/pxe.c
@@ -297,9 +297,6 @@
printf("pxe_open: loaded RFC1048 data from PXE Cache\n");
}
-#ifdef LOADER_TFTP_SUPPORT
- bootp(pxe_sock, BOOTP_PXE);
-#endif
if (rootip.s_addr == 0)
rootip.s_addr = bootplayer.sip;
if (gateip.s_addr == 0)

File Metadata

Mime Type
text/plain
Expires
Sun, Feb 15, 4:58 PM (13 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28749038
Default Alt Text
D10485.id27699.diff (1 KB)

Event Timeline