From 69d9182581711cbe3e644b724fae9898567de353 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 13 Apr 2009 20:30:26 -0700 Subject: [PATCH] pxelinux: fix the new timeout code Fix the new timeout code; in particular: - on receiving an ERROR packet, we fake an immediate timeout; this has to be done differently now. - fix missing decrement of timeout counter. Signed-off-by: H. Peter Anvin --- core/pxelinux.asm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/pxelinux.asm b/core/pxelinux.asm index a87f321..94d013b 100644 --- a/core/pxelinux.asm +++ b/core/pxelinux.asm @@ -206,7 +206,6 @@ StrucPtr resd 1 ; Pointer to PXENV+ or !PXE structure APIVer resw 1 ; PXE API version found IdleTimer resw 1 ; Time to check for ARP? LocalBootType resw 1 ; Local boot return code -PktTimeout resw 1 ; Timeout for current packet RealBaseMem resw 1 ; Amount of DOS memory after freeing OverLoad resb 1 ; Set if DHCP packet uses "overloading" DHCPMagic resb 1 ; PXELINUX magic flags @@ -1078,6 +1077,7 @@ searchdir: cmp dx,[bp-12] je .pkt_loop mov [bp-12],dx + dec word [bp-10] jnz .pkt_loop pop ax ; Adjust stack pop ax @@ -1264,7 +1264,9 @@ searchdir: call writestr_early jmp kaboom -.bailnow: mov word [bp-2],1 ; Immediate error - no retry +.bailnow: + ; Immediate error - no retry + mov word [bp-2],TimeoutTableEnd-1 .failure: pop bx ; Junk pop bx -- 2.7.4