NetBSD Problem Report #54561

From www@netbsd.org  Sun Sep 22 16:23:51 2019
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 38D9C7A14F
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 22 Sep 2019 16:23:51 +0000 (UTC)
Message-Id: <20190922162350.51DA37A1E1@mollari.NetBSD.org>
Date: Sun, 22 Sep 2019 16:23:50 +0000 (UTC)
From: pbraun@nethence.com
Reply-To: pbraun@nethence.com
To: gnats-bugs@NetBSD.org
Subject: pxeboot TFTP block2+ acks broken
X-Send-Pr-Version: www-1.0

>Number:         54561
>Category:       port-i386
>Synopsis:       pxeboot TFTP block2+ acks broken
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    manu
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 22 16:25:00 +0000 2019
>Closed-Date:    Sat Oct 05 08:05:58 +0000 2019
>Last-Modified:  Sat Oct 05 08:05:58 +0000 2019
>Originator:     pierre-philipp braun
>Release:        9.0_BETA
>Organization:
Innopolis University
>Environment:
n.a. (pxeboot)
>Description:
This bug report is about the TFTP client built-into netbsd's pxeboot.

The TFTP protocol has acks and the server sends only the next block
once it receives an ack for the one that has last been sent.

The first ack (for block1) is correctly sent by pxeboot with IP
destination and UDP port.  TFTP ack for block 1 is 00 04 00 01.

There is an attempt for the second ack (for block2) to be sent by
pxeboot but IP destination and UDP port are missing.  Eventhough
wireshark does not truly recognize this packets as a TFTP ack, one can
see look at the HEX and see 00 04 00 02.

As a result, the TFTP server keep sending block2, because it did not
receive the ack for block1.

>How-To-Repeat:
Setup a PXE service (DHCP+TFTP+pxeboot), here done on Slackware Linux
14.2.  I did not try to reproduce it with NetBSD's TFTP server.

    next-server TFTP-NFS-SERVER;
    filename "pxeboot_ia32.bin";

Then PXE boot from a client node, get to the netbsd boot loader prompt
provided by pxeboot and enter

    boot tftp:netbsd-INSTALL.gz

The `tftp:` device type needs to be specified otherwise it does NFS by
default.
>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: port-i386-maintainer->manu
Responsible-Changed-By: uwe@NetBSD.org
Responsible-Changed-When: Wed, 25 Sep 2019 12:27:05 +0000
Responsible-Changed-Why:
This is fallout from multiboot changes.
pxeboot now exceeds 64K.


From: Emmanuel Dreyfus <manu@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-i386/54561 (pxeboot TFTP block2+ acks broken)
Date: Fri, 27 Sep 2019 08:56:07 +0000

 On Wed, Sep 25, 2019 at 12:27:05PM +0000, uwe@NetBSD.org wrote:
 > This is fallout from multiboot changes.
 > pxeboot now exceeds 64K.

 Hello

 A patch to fix this has been proposed in kern/54560

 If you can test it, your feedback would be valuable.

 -- 
 Emmanuel Dreyfus
 manu@netbsd.org

From: pierre-philipp braun <pbraun@nethence.com>
To: gnats-bugs@netbsd.org, manu@netbsd.org, gnats-admin@netbsd.org,
 netbsd-bugs@netbsd.org
Cc: 
Subject: Re: port-i386/54561 (pxeboot TFTP block2+ acks broken)
Date: Wed, 2 Oct 2019 10:52:52 +0300

 >  A patch to fix this has been proposed in kern/54560
 >  
 >  If you can test it, your feedback would be valuable.

 Hi, my power VM is not available right now, I cannot easily build
 myself.  However the owner of kern/54560 confirmed it worked.  So could
 it be pushed to netbsd-9 so I get a shot to test it through the
 daily-builds?

 Thanks

From: manu@netbsd.org (Emmanuel Dreyfus)
To: gnats-bugs@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
        pbraun@nethence.com
Cc: 
Subject: Re: port-i386/54561 (pxeboot TFTP block2+ acks broken)
Date: Fri, 4 Oct 2019 03:00:17 +0200

 Emmanuel Dreyfus <manu@netbsd.org> wrote:

 >  A patch to fix this has been proposed in kern/54560

 The patch has been committed and pulled up to netbsd-8 and netbsd-9
 branches.

 -- 
 Emmanuel Dreyfus
 http://hcpnet.free.fr/pubz
 manu@netbsd.org

From: pierre-philipp braun <pbraun@nethence.com>
To: Emmanuel Dreyfus <manu@netbsd.org>, gnats-bugs@netbsd.org,
 gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Cc: 
Subject: Re: port-i386/54561 (pxeboot TFTP block2+ acks broken)
Date: Sat, 5 Oct 2019 10:48:16 +0300

 On 10/4/19 4:00 AM, Emmanuel Dreyfus wrote:
 > Emmanuel Dreyfus <manu@netbsd.org> wrote:
 > 
 >>  A patch to fix this has been proposed in kern/54560
 > 
 > The patch has been committed and pulled up to netbsd-8 and netbsd-9
 > branches.

 Everything's fine now, thank you.  The 4th october netbsd-9 daily-build
 solves the issue.  Both TFTP and NFS work fine with pxeboot_ia32.  And I
 can even keep chainloading pxeboot_ia32 it from pxelinux.0.  I did not
 validate DOS, GPT, RAIDFRAME, nor MULTIBOOT.

 pxeboot_ia32.bin size did not change from 201910030600Z to
 201910041040Z, it is still 73952 bytes, but indeed the checksum did change

 3537324971 73952 ./amd64/installation/misc/pxeboot_ia32.bin
 3855327595 73952 ./amd64.201910030600Z/installatio/misc/pxeboot_ia32.bin

 So it seems the "Incrase pxeboot code size limit from 64k to 128k."
 patch is a success.

 Pierre-Philipp

State-Changed-From-To: open->closed
State-Changed-By: manu@NetBSD.org
State-Changed-When: Sat, 05 Oct 2019 08:05:58 +0000
State-Changed-Why:
Submitter acknowledges the problem is solved


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.