Debian Bug report logs - #536509
tftpd doesn't work with IPv6

version graph

Package: tftpd; Maintainer for tftpd is Alberto Gonzalez Iniesta <agi@inittab.org>; Source for tftpd is src:netkit-tftp.

Reported by: Friedemann Stoyan <fstoyan@swapon.de>

Date: Fri, 10 Jul 2009 16:54:01 UTC

Severity: normal

Tags: ipv6, patch

Found in version netkit-tftp/0.17-16

Fixed in version netkit-tftp/0.17-18

Done: Alberto Gonzalez Iniesta <agi@inittab.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Alberto Gonzalez Iniesta <agi@inittab.org>:
Bug#536509; Package tftpd. (Fri, 10 Jul 2009 16:54:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Friedemann Stoyan <fstoyan@swapon.de>:
New Bug report received and forwarded. Copy sent to Alberto Gonzalez Iniesta <agi@inittab.org>. (Fri, 10 Jul 2009 16:54:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Friedemann Stoyan <fstoyan@swapon.de>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: tftpd doesn't work with IPv6
Date: Fri, 10 Jul 2009 18:51:37 +0200
Package: tftpd
Version: 0.17-16
Severity: normal


tftpd doesn't work with IPv6, syslog shows:

Jul 10 15:26:30 wlftp in.tftpd[22216]: connect from 2001:db8:0:8:224:97ff:fe4a:79db (2001:db8:0:8:224:97ff:fe4a:79db)
Jul 10 15:26:30 wlftp tftpd[22217]: tftpd: trying to get file: images/asa821-k8.bin
Jul 10 15:26:30 wlftp tftpd[22217]: tftpd: serving file from /var/lib/tftpboot
Jul 10 15:26:30 wlftp tftpd[22217]: tftpd: read: Connection refused


-- System Information:
Debian Release: 5.0.2
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages tftpd depends on:
ii  libc6                       2.7-18       GNU C Library: Shared libraries
ii  openbsd-inetd [inet-superse 0.20080125-2 The OpenBSD Internet Superserver

tftpd recommends no packages.

tftpd suggests no packages.

-- no debconf information




Added tag(s) ipv6. Request was from Tobias Klauser <tklauser@distanz.ch> to control@bugs.debian.org. (Sat, 30 Jan 2010 21:36:03 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Alberto Gonzalez Iniesta <agi@inittab.org>:
Bug#536509; Package tftpd. (Thu, 04 Feb 2010 21:12:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to debian@gisladisker.se:
Extra info received and forwarded to list. Copy sent to Alberto Gonzalez Iniesta <agi@inittab.org>. (Thu, 04 Feb 2010 21:12:04 GMT) Full text and rfc822 format available.

Message #12 received at 536509@bugs.debian.org (full text, mbox):

From: Mats Erik Andersson <mats.andersson@gisladisker.se>
To: 536509@bugs.debian.org
Cc: Tobias Klauser <tklauser@distanz.ch>
Subject: Possible patch is being tested
Date: Thu, 4 Feb 2010 22:14:05 +0100
[Message part 1 (text/plain, inline)]
Hello,

I am testing a patch against tftpd.c in netkit-tftp-0.17, that
makes 'tftpd' run independently of address family.

The following result appears with my "3.0 (quilt)" migrated packages.
The client 'tftp' is unabridged, whereas 'tftpd' has been modified to
detect address family from the incoming socket. The file served,
named 'hej', was correctly transfered with its fourteen bytes!

$ netstat -au
udp6       0      0 [::]:35260              [::]:*                             
udp6       0      0 [::]:tftp               [::]:*                             
udp6       0      0 [::]:mdns               [::]:*                             

$ tail -3 /var/log/daemon.log
Feb  4 21:32:09 assar in.tftpd[7302]: connect from ::ffff:127.0.0.1 (::ffff:127.0.0.1)
Feb  4 21:32:09 assar tftpd[7303]: tftpd: trying to get file: hej 
Feb  4 21:32:09 assar tftpd[7303]: tftpd: serving file from /srv/tftp 


Best regards,
-- 
Mats Erik Andersson, fil. dr

Abbonerar på: debian-mentors, debian-devel-games, debian-perl
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Alberto Gonzalez Iniesta <agi@inittab.org>:
Bug#536509; Package tftpd. (Sat, 13 Feb 2010 11:36:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to debian@gisladisker.se:
Extra info received and forwarded to list. Copy sent to Alberto Gonzalez Iniesta <agi@inittab.org>. (Sat, 13 Feb 2010 11:36:03 GMT) Full text and rfc822 format available.

Message #17 received at 536509@bugs.debian.org (full text, mbox):

From: Mats Erik Andersson <mats.andersson@gisladisker.se>
To: 536509@bugs.debian.org
Cc: debian-ipv6@lists.debian.org
Subject: Working IPv6 for netkit-tftp
Date: Sat, 13 Feb 2010 12:38:08 +0100
[Message part 1 (text/plain, inline)]
I am submitting an nmudiff for the sake of discussing the
implementation of IPv6 for tftp and tftpd from netkit-tftp-0.17.

The compressed interdiff is attached to this message. In order
to ease the C-code patching, I migrated the package to format
"3.0 (quilt)".

The migration of tftpd to IPv6-ability is almost elementary,
no inherent surprises. The only issue is that inetd/xinetd is
stumbeling on the value used for 'net.ipv6.bindv6only', but the
code change for 'tftpd.c' is independent of this. Logfiling:

Feb 13 11:57:59 kvad tftpd[11887]: tftpd: trying to get file: motd
Feb 13 11:57:59 kvad tftpd[11887]: tftpd: serving file from /srv/tftp
Feb 13 11:57:59 kvad xinetd[2294]: START: tftp from=2001:470:28:6a::a
Feb 13 11:58:20 kvad tftpd[11889]: tftpd: trying to get file: motd
Feb 13 11:58:20 kvad tftpd[11889]: tftpd: serving file from /srv/tftp
Feb 13 11:58:20 kvad xinetd[2294]: START: tftp from=::ffff:192.168.0.10
Feb 13 11:58:50 kvad tftpd[11892]: tftpd: trying to get file: motd
Feb 13 11:58:50 kvad tftpd[11892]: tftpd: serving file from /srv/tftp
Feb 13 11:58:50 kvad xinetd[2294]: START: tftp from=2001:470:28:6a::a


The correct patching of 'tftp/main.c' and 'tftp/tftp.c' is a much
harder task. As you will see from the syslog, both address families
work with the present code changes. The addrinfo flags could possibly
benefit from more thought, even though I have invested much time
already in trying various combinations.

I hope to discuss detailed code changes for the client on the mailing
list 'debian-ipv6', but let me here advice code testers to add openings
in your netfilter rules to allow incoming udp-packages. I lost two
days in traffic testing before I located this cause for earlier
patch generations!


Best regards,
-- 
Mats Erik Andersson, fil. dr
[nmudiff-ipv6-netkit-tftp_0.17-17.1.diff.gz (application/octet-stream, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#536509; Package tftpd. (Sun, 21 Feb 2010 11:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alberto Gonzalez Iniesta <agi@inittab.org>:
Extra info received and forwarded to list. (Sun, 21 Feb 2010 11:06:03 GMT) Full text and rfc822 format available.

Message #22 received at 536509@bugs.debian.org (full text, mbox):

From: Alberto Gonzalez Iniesta <agi@inittab.org>
To: debian@gisladisker.se, 536509@bugs.debian.org
Subject: Re: Bug#536509: Working IPv6 for netkit-tftp
Date: Sun, 21 Feb 2010 11:55:25 +0100
On Sat, Feb 13, 2010 at 12:38:08PM +0100, Mats Erik Andersson wrote:
> I am submitting an nmudiff for the sake of discussing the
> implementation of IPv6 for tftp and tftpd from netkit-tftp-0.17.

Hi Mats,

THanks a lot for your patch. I'll try to upload it next week (as real
life permits).

Regards,

Alberto


-- 
Alberto Gonzalez Iniesta    | Formación, consultoría y soporte técnico
agi@(inittab.org|debian.org)| en GNU/Linux y software libre
Encrypted mail preferred    | http://inittab.com

Key fingerprint = 9782 04E7 2B75 405C F5E9  0C81 C514 AF8E 4BA4 01C3




Severity set to 'serious' from 'normal' Request was from Clint Adams <schizo@debian.org> to control@bugs.debian.org. (Tue, 23 Mar 2010 01:03:25 GMT) Full text and rfc822 format available.

Severity set to 'normal' from 'serious' Request was from Gerfried Fuchs <rhonda@deb.at> to control@bugs.debian.org. (Tue, 23 Mar 2010 08:30:28 GMT) Full text and rfc822 format available.

Added tag(s) patch. Request was from Mats Erik Andersson <mats.andersson@gisladisker.se> to control@bugs.debian.org. (Sat, 17 Apr 2010 02:06:02 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Alberto Gonzalez Iniesta <agi@inittab.org>:
Bug#536509; Package tftpd. (Sat, 17 Apr 2010 02:21:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mats Erik Andersson <mats.andersson@gisladisker.se>:
Extra info received and forwarded to list. Copy sent to Alberto Gonzalez Iniesta <agi@inittab.org>. (Sat, 17 Apr 2010 02:21:03 GMT) Full text and rfc822 format available.

Message #33 received at 536509@bugs.debian.org (full text, mbox):

From: Mats Erik Andersson <mats.andersson@gisladisker.se>
To: 536509@bugs.debian.org
Subject: netkit-tftp: Functional IPv6 support
Date: Sat, 17 Apr 2010 04:10:41 +0200
[Message part 1 (text/plain, inline)]
package tftpd
tags 536509 + patch
thanks

Now I deliver a fully functional patch to let tftpd __and__ tftp
enjoy the blessing of IPv6 support. For your information it is
worth to point out that the client side is harder to implement
by a magnitude, since the server is inetd-based.

The mailing list debian-ipv6 har been one of utterly silence
since I mentioned this endeouvor, so I had to do all the
research on my own, but here is the outcome.

Best regards
-- 
Mats Erik Andersson, fil. dr
<debian@gisladisker.se>
[nmudiff-ipv6-netkit-tftp_0.17-17.1-2.diff (text/x-diff, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Alberto Gonzalez Iniesta <agi@inittab.org>:
Bug#536509; Package tftpd. (Sun, 19 Sep 2010 18:27:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mats Erik Andersson <mats.andersson@gisladisker.se>:
Extra info received and forwarded to list. Copy sent to Alberto Gonzalez Iniesta <agi@inittab.org>. (Sun, 19 Sep 2010 18:27:03 GMT) Full text and rfc822 format available.

Message #38 received at 536509@bugs.debian.org (full text, mbox):

From: Mats Erik Andersson <mats.andersson@gisladisker.se>
To: 536509@bugs.debian.org
Subject: A new suggestion for raw patching.
Date: Sun, 19 Sep 2010 20:21:35 +0200
[Message part 1 (text/plain, inline)]
Clearly I accomplished substandard and incomplete suggestions
in my earlier efforts. Hard to explain how I could pick the
cherries so selectively. I was certainly blinded by the fear
of changing underlying mechanisms in the original code.

The good thing is that my renewed analysis has brought into
light more than one shortcoming of the code as it was maintained
up to this date.

The new patch is to be applied on top of an unpackaged Debian
debian source

   $ dpkg-source -x netkit-tftp_0.17-17.dsc
   $ patch -p0 < netkit_tftp_implement_ipv6_tftp_tftpd.diff

Nothing fancy like NMU! I am burned my fingers for good in that jar.
As always, the client is much harder to improve, than the server is.

Best regards,

Mats Erik Andersson, fil. dr
2459 41E9 C420 3F6D F68B  2E88 F768 4541 F25B 5D41
[netkit_tftp_implement_ipv6_tftp_tftpd.diff (text/x-diff, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Alberto Gonzalez Iniesta <agi@inittab.org>:
Bug#536509; Package tftpd. (Wed, 22 Sep 2010 19:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mats Erik Andersson <mats.andersson@gisladisker.se>:
Extra info received and forwarded to list. Copy sent to Alberto Gonzalez Iniesta <agi@inittab.org>. (Wed, 22 Sep 2010 19:15:03 GMT) Full text and rfc822 format available.

Message #43 received at 536509@bugs.debian.org (full text, mbox):

From: Mats Erik Andersson <mats.andersson@gisladisker.se>
To: 536509@bugs.debian.org
Subject: tftp: IPv6 verified on GNU/kfreebsd_amd64
Date: Wed, 22 Sep 2010 21:10:11 +0200
Hello,

the above patch is now proven to be correct also
on GNU/kfreebsd_amd64:

    $ ./tftp/tftp
    tftp> connect birger
    tftp> get birger.txt           #  Uses IPv6.
    Received 29 bytes in 0.0 seconds.
    tftp> get 192.168.0.33:tmux.gz
    Received 243579 bytes in 0.2 seconds.


Mats E A




Reply sent to Alberto Gonzalez Iniesta <agi@inittab.org>:
You have taken responsibility. (Fri, 24 Sep 2010 16:51:12 GMT) Full text and rfc822 format available.

Notification sent to Friedemann Stoyan <fstoyan@swapon.de>:
Bug acknowledged by developer. (Fri, 24 Sep 2010 16:51:12 GMT) Full text and rfc822 format available.

Message #48 received at 536509-close@bugs.debian.org (full text, mbox):

From: Alberto Gonzalez Iniesta <agi@inittab.org>
To: 536509-close@bugs.debian.org
Subject: Bug#536509: fixed in netkit-tftp 0.17-18
Date: Fri, 24 Sep 2010 16:47:23 +0000
Source: netkit-tftp
Source-Version: 0.17-18

We believe that the bug you reported is fixed in the latest version of
netkit-tftp, which is due to be installed in the Debian FTP archive:

netkit-tftp_0.17-18.diff.gz
  to main/n/netkit-tftp/netkit-tftp_0.17-18.diff.gz
netkit-tftp_0.17-18.dsc
  to main/n/netkit-tftp/netkit-tftp_0.17-18.dsc
tftp_0.17-18_i386.deb
  to main/n/netkit-tftp/tftp_0.17-18_i386.deb
tftpd_0.17-18_i386.deb
  to main/n/netkit-tftp/tftpd_0.17-18_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 536509@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Alberto Gonzalez Iniesta <agi@inittab.org> (supplier of updated netkit-tftp package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Fri, 24 Sep 2010 18:05:54 +0200
Source: netkit-tftp
Binary: tftp tftpd
Architecture: source i386
Version: 0.17-18
Distribution: unstable
Urgency: low
Maintainer: Alberto Gonzalez Iniesta <agi@inittab.org>
Changed-By: Alberto Gonzalez Iniesta <agi@inittab.org>
Description: 
 tftp       - Trivial file transfer protocol client
 tftpd      - Trivial file transfer protocol server
Closes: 437617 494309 536509
Changes: 
 netkit-tftp (0.17-18) unstable; urgency=low
 .
   * debian/control: added ${misc:Depends} to binary packages
   * debian/compat: moved to 7
   * Add IPv6 support, once again thanks to Mats Erik Andersson.
     (Closes: #536509)
   * Patch from Ubuntu (Closes: #494309), thanks Stefan Lesicnik:
     - Return ENOTFOUND instead of EUNDEF for files that do not exist
     - Adds debian/watch file (even when they won't happen...)
     - debian/rules: Removes sed which adds -g (debug) option to gcc
   * Removed '-s' from install calls in Makefiles and added dh_strip.
     (Closes: #437617)
Checksums-Sha1: 
 9c4b33f9fb89560e9505624adc02f342db70c3cd 982 netkit-tftp_0.17-18.dsc
 cf2751588a55044022d14d7c0275bf83e71c5a02 10539 netkit-tftp_0.17-18.diff.gz
 f47c4c07e341e78ab196a6408997d9ceac5bf210 17208 tftp_0.17-18_i386.deb
 79de52a5e8f2b3860d4b46bc4555bb3663c0bf1a 16062 tftpd_0.17-18_i386.deb
Checksums-Sha256: 
 32073b6c317a58864d8803df99c6033918a4bcce11cb298480e575a043b94f9e 982 netkit-tftp_0.17-18.dsc
 092437d27b4fa88c044ef6290372fee5ce06d223607f0e22a6e527065c8930e7 10539 netkit-tftp_0.17-18.diff.gz
 d32e4787f4f7623401fed7c0404d90fa9d12ce5c9def6dfdf2eee51df30eac8f 17208 tftp_0.17-18_i386.deb
 26de763b28db70922f49d7b6b4fcc81ce6ab4aff395405507e8463417cdb3f6f 16062 tftpd_0.17-18_i386.deb
Files: 
 2b895e3da2f4561daeb4a5f7db477f27 982 net optional netkit-tftp_0.17-18.dsc
 cb29e7a33dd85105ba6e6ec4f971e42c 10539 net optional netkit-tftp_0.17-18.diff.gz
 c33b9614dbdeb646493a2d4cac76968b 17208 net optional tftp_0.17-18_i386.deb
 6f2237aad2c5d635a5ac9a1dfcde3867 16062 net optional tftpd_0.17-18_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkyc0rgACgkQxRSvjkukAcMjogCfQHj0cmXhtXssAWXa/o6t8pz2
jMUAni3vKAevYl03syLayZQWn0KN2wE/
=jREX
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 11 Nov 2010 07:30:27 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 24 21:56:58 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.