NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-i386/56956: i386/pxeboot: cannot load netbsd kernel larger than 32 MiB with TFTP
This is because th_block in TFTP header is 16-bit width.
This patch should work around the problem, although I'm not
100% sure whether this is correct fix:
----
Index: tftp.c
===================================================================
RCS file: /cvsroot/src/sys/lib/libsa/tftp.c,v
retrieving revision 1.38
diff -p -u -r1.38 tftp.c
--- tftp.c 7 Aug 2022 05:51:55 -0000 1.38
+++ tftp.c 7 Aug 2022 05:57:15 -0000
@@ -114,7 +114,7 @@ recvtftp(struct iodesc *d, void *pkt, si
t = (struct tftphdr *)pkt;
switch (ntohs(t->th_opcode)) {
case DATA:
- if (ntohs(t->th_block) != d->xid) {
+ if (ntohs(t->th_block) != (u_short)d->xid) {
/*
* Expected block?
*/
----
Note that this is patch for tftp.c,v 1.38, which I committed
just now.
Also note that, since seek is impossible for TFTP, NFS boot
should be much faster than TFTP boot.
Thanks,
rin
Home |
Main Index |
Thread Index |
Old Index