Package: tftpd-hpa
Version: 5.2+20140608-3
Severity: important
Tags: patch

Dear Maintainer,

When a Wheezy or Jessie machine is fitted with an SSD the machine often
boots so quickly that tftpd-hpa is started before the network is fully
configured. The problem is reproducible with sysvinit (on Wheezy) and
systemd (on Jessie) although it may be easier to reproduce with systemd.

The same problem can be observed by attempting to start tftpd-hpa by hand
when no network connections are available.

When tftpd-hpa fails to start daemon.log contains:

 in.tftpd[881]: cannot resolve local IPv4 bind address: 0.0.0.0, Name or 
service not known

The error appears to be due to getaddrinfo(3) failing when attempting to
look up "0.0.0.0:69".

The daemon starts successfully when the network is unavailable if the
default /etc/default/tftpd-hpa is changed:

-TFTP_ADDRESS="0.0.0.0:69"
+TFTP_ADDRESS=":69"

This has the side effect of making tftpd-hpa also listen on IPv6. Perhaps
that's desirable anyway so changing the default would make sense.

The attached patch is my attempt to change the default.

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

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

Versions of packages tftpd-hpa depends on:
ii  adduser                3.113+nmu3
ii  debconf [debconf-2.0]  1.5.53
ii  libc6                  2.19-13
ii  libwrap0               7.6.q-25

tftpd-hpa recommends no packages.

Versions of packages tftpd-hpa suggests:
pn  pxelinux  <none>

-- debconf information:
  tftpd-hpa/address: 0.0.0.0:69
  tftpd-hpa/username: tftp
  tftpd-hpa/directory: /srv/tftp
  tftpd-hpa/options: --secure
diff -ruN tftp-hpa-5.2+20140608/debian/po/cs.po tftp-hpa-5.2+20140608.orig/debian/po/cs.po
--- tftp-hpa-5.2+20140608/debian/po/cs.po	2014-11-29 15:01:55.156005600 +0000
+++ tftp-hpa-5.2+20140608.orig/debian/po/cs.po	2014-11-29 15:15:38.000000000 +0000
@@ -72,10 +72,10 @@
 #: ../tftpd-hpa.templates:3001
 msgid ""
 "By default, the TFTP server listens to port 69 on all addresses and all "
-"interfaces (:69). If no port is specified, it defaults to 69."
+"interfaces (0.0.0.0:69). If no port is specified, it defaults to 69."
 msgstr ""
 "Ve výchozím nastavení TFTP server naslouchá na portu 69 na všech adresách a "
-"všech síťových rozhraních (:69). Pokud nebude zadán port, použije se "
+"všech síťových rozhraních (0.0.0.0:69). Pokud nebude zadán port, použije se "
 "výchozí hodnota 69."
 
 #. Type: string
diff -ruN tftp-hpa-5.2+20140608/debian/po/da.po tftp-hpa-5.2+20140608.orig/debian/po/da.po
--- tftp-hpa-5.2+20140608/debian/po/da.po	2014-11-29 15:01:55.148005600 +0000
+++ tftp-hpa-5.2+20140608.orig/debian/po/da.po	2014-11-29 15:15:38.000000000 +0000
@@ -71,10 +71,10 @@
 #: ../tftpd-hpa.templates:3001
 msgid ""
 "By default, the TFTP server listens to port 69 on all addresses and all "
-"interfaces (:69). If no port is specified, it defaults to 69."
+"interfaces (0.0.0.0:69). If no port is specified, it defaults to 69."
 msgstr ""
 "Som standard, lytter TFTP-serveren på port 69 for alle adresser og alle "
-"grænseflader (:69). Hvis ingen port er angivet, er standarden 69."
+"grænseflader (0.0.0.0:69). Hvis ingen port er angivet, er standarden 69."
 
 #. Type: string
 #. Description
diff -ruN tftp-hpa-5.2+20140608/debian/po/de.po tftp-hpa-5.2+20140608.orig/debian/po/de.po
--- tftp-hpa-5.2+20140608/debian/po/de.po	2014-11-29 15:01:55.168005600 +0000
+++ tftp-hpa-5.2+20140608.orig/debian/po/de.po	2014-11-29 15:15:38.000000000 +0000
@@ -76,10 +76,10 @@
 #: ../tftpd-hpa.templates:3001
 msgid ""
 "By default, the TFTP server listens to port 69 on all addresses and all "
-"interfaces (:69). If no port is specified, it defaults to 69."
+"interfaces (0.0.0.0:69). If no port is specified, it defaults to 69."
 msgstr ""
 "Standardmässig wartet der TFTP-Server auf Port 69 auf allen Adressen und "
-"allen Schnittstellen (:69). Ohne Port-Angabe wird die Vorgabe 69 "
+"allen Schnittstellen (0.0.0.0:69). Ohne Port-Angabe wird die Vorgabe 69 "
 "verwendet."
 
 #. Type: string
diff -ruN tftp-hpa-5.2+20140608/debian/po/es.po tftp-hpa-5.2+20140608.orig/debian/po/es.po
--- tftp-hpa-5.2+20140608/debian/po/es.po	2014-11-29 15:01:55.160005600 +0000
+++ tftp-hpa-5.2+20140608.orig/debian/po/es.po	2014-11-29 15:15:38.000000000 +0000
@@ -76,10 +76,10 @@
 #: ../tftpd-hpa.templates:3001
 msgid ""
 "By default, the TFTP server listens to port 69 on all addresses and all "
-"interfaces (:69). If no port is specified, it defaults to 69."
+"interfaces (0.0.0.0:69). If no port is specified, it defaults to 69."
 msgstr ""
 "Por omisión, el servidor de TFTP escucha en el puerto 69 de todas las "
-"direcciones e interfaces (:69). Si no se especifica un puerto, el "
+"direcciones e interfaces (0.0.0.0:69). Si no se especifica un puerto, el "
 "valor por omisión es 69."
 
 #. Type: string
diff -ruN tftp-hpa-5.2+20140608/debian/po/fi.po tftp-hpa-5.2+20140608.orig/debian/po/fi.po
--- tftp-hpa-5.2+20140608/debian/po/fi.po	2014-11-29 15:01:55.144005600 +0000
+++ tftp-hpa-5.2+20140608.orig/debian/po/fi.po	2014-11-29 15:15:38.000000000 +0000
@@ -71,7 +71,7 @@
 #: ../tftpd-hpa.templates:3001
 msgid ""
 "By default, the TFTP server listens to port 69 on all addresses and all "
-"interfaces (:69). If no port is specified, it defaults to 69."
+"interfaces (0.0.0.0:69). If no port is specified, it defaults to 69."
 msgstr ""
 
 #. Type: string
diff -ruN tftp-hpa-5.2+20140608/debian/po/fr.po tftp-hpa-5.2+20140608.orig/debian/po/fr.po
--- tftp-hpa-5.2+20140608/debian/po/fr.po	2014-11-29 15:01:55.156005600 +0000
+++ tftp-hpa-5.2+20140608.orig/debian/po/fr.po	2014-11-29 15:15:38.000000000 +0000
@@ -72,10 +72,10 @@
 #: ../tftpd-hpa.templates:3001
 msgid ""
 "By default, the TFTP server listens to port 69 on all addresses and all "
-"interfaces (:69). If no port is specified, it defaults to 69."
+"interfaces (0.0.0.0:69). If no port is specified, it defaults to 69."
 msgstr ""
 "Le serveur TFTP écoute par défaut sur le port 69 pour toutes les adresses et "
-"toutes les interfaces (:69). Si aucun port n'est indiqué, le port par "
+"toutes les interfaces (0.0.0.0:69). Si aucun port n'est indiqué, le port par "
 "défaut sera le port 69."
 
 #. Type: string
diff -ruN tftp-hpa-5.2+20140608/debian/po/gl.po tftp-hpa-5.2+20140608.orig/debian/po/gl.po
--- tftp-hpa-5.2+20140608/debian/po/gl.po	2014-11-29 15:01:55.152005600 +0000
+++ tftp-hpa-5.2+20140608.orig/debian/po/gl.po	2014-11-29 15:15:38.000000000 +0000
@@ -72,7 +72,7 @@
 #: ../tftpd-hpa.templates:3001
 msgid ""
 "By default, the TFTP server listens to port 69 on all addresses and all "
-"interfaces (:69). If no port is specified, it defaults to 69."
+"interfaces (0.0.0.0:69). If no port is specified, it defaults to 69."
 msgstr ""
 
 #. Type: string
diff -ruN tftp-hpa-5.2+20140608/debian/po/it.po tftp-hpa-5.2+20140608.orig/debian/po/it.po
--- tftp-hpa-5.2+20140608/debian/po/it.po	2014-11-29 15:01:55.152005600 +0000
+++ tftp-hpa-5.2+20140608.orig/debian/po/it.po	2014-11-29 15:15:38.000000000 +0000
@@ -72,10 +72,10 @@
 #: ../tftpd-hpa.templates:3001
 msgid ""
 "By default, the TFTP server listens to port 69 on all addresses and all "
-"interfaces (:69). If no port is specified, it defaults to 69."
+"interfaces (0.0.0.0:69). If no port is specified, it defaults to 69."
 msgstr ""
 "In modo predefinito il server TFTP si pone in ascolto sulla posta 69 su "
-"tutti gli indirizzi e tutte le interfacce (:69). Se non viene "
+"tutti gli indirizzi e tutte le interfacce (0.0.0.0:69). Se non viene "
 "specificata alcuna porta viene utilizzata quella predefinita (la 69)."
 
 #. Type: string
diff -ruN tftp-hpa-5.2+20140608/debian/po/ja.po tftp-hpa-5.2+20140608.orig/debian/po/ja.po
--- tftp-hpa-5.2+20140608/debian/po/ja.po	2014-11-29 15:01:55.164005600 +0000
+++ tftp-hpa-5.2+20140608.orig/debian/po/ja.po	2014-11-29 15:15:38.000000000 +0000
@@ -72,10 +72,10 @@
 #: ../tftpd-hpa.templates:3001
 msgid ""
 "By default, the TFTP server listens to port 69 on all addresses and all "
-"interfaces (:69). If no port is specified, it defaults to 69."
+"interfaces (0.0.0.0:69). If no port is specified, it defaults to 69."
 msgstr ""
 "デフォルトでは、TFTP サーバは全てのアドレス上の69番ポートと、全てのインター"
-"フェイス上で listen します (:69)。ポートが指定されない場合は、デフォル"
+"フェイス上で listen します (0.0.0.0:69)。ポートが指定されない場合は、デフォル"
 "ト値は 69 です。"
 
 #. Type: string
diff -ruN tftp-hpa-5.2+20140608/debian/po/nl.po tftp-hpa-5.2+20140608.orig/debian/po/nl.po
--- tftp-hpa-5.2+20140608/debian/po/nl.po	2014-11-29 15:01:55.156005600 +0000
+++ tftp-hpa-5.2+20140608.orig/debian/po/nl.po	2014-11-29 15:15:38.000000000 +0000
@@ -72,10 +72,10 @@
 #: ../tftpd-hpa.templates:3001
 msgid ""
 "By default, the TFTP server listens to port 69 on all addresses and all "
-"interfaces (:69). If no port is specified, it defaults to 69."
+"interfaces (0.0.0.0:69). If no port is specified, it defaults to 69."
 msgstr ""
 "Standaard luistert de TFTP-server op poort 69 van alle adressen en "
-"interfaces (:69). Als u geen poort opgeeft, zal de standaardwaarde 69 "
+"interfaces (0.0.0.0:69). Als u geen poort opgeeft, zal de standaardwaarde 69 "
 "worden gebruikt."
 
 #. Type: string
diff -ruN tftp-hpa-5.2+20140608/debian/po/pt_BR.po tftp-hpa-5.2+20140608.orig/debian/po/pt_BR.po
--- tftp-hpa-5.2+20140608/debian/po/pt_BR.po	2014-11-29 15:01:55.152005600 +0000
+++ tftp-hpa-5.2+20140608.orig/debian/po/pt_BR.po	2014-11-29 15:15:38.000000000 +0000
@@ -76,10 +76,10 @@
 #: ../tftpd-hpa.templates:3001
 msgid ""
 "By default, the TFTP server listens to port 69 on all addresses and all "
-"interfaces (:69). If no port is specified, it defaults to 69."
+"interfaces (0.0.0.0:69). If no port is specified, it defaults to 69."
 msgstr ""
 "Por padrão, o servidor TFTP escuta na porta 69 em todos os endereços de "
-"todas as interfaces (:69). Se a porta não for especificada, o padrão "
+"todas as interfaces (0.0.0.0:69). Se a porta não for especificada, o padrão "
 "será a 69."
 
 #. Type: string
diff -ruN tftp-hpa-5.2+20140608/debian/po/pt.po tftp-hpa-5.2+20140608.orig/debian/po/pt.po
--- tftp-hpa-5.2+20140608/debian/po/pt.po	2014-11-29 15:01:55.160005600 +0000
+++ tftp-hpa-5.2+20140608.orig/debian/po/pt.po	2014-11-29 15:15:38.000000000 +0000
@@ -75,10 +75,10 @@
 #: ../tftpd-hpa.templates:3001
 msgid ""
 "By default, the TFTP server listens to port 69 on all addresses and all "
-"interfaces (:69). If no port is specified, it defaults to 69."
+"interfaces (0.0.0.0:69). If no port is specified, it defaults to 69."
 msgstr ""
 "Por predefinição, o servidor TFTP escuta no porto 69 em todos os endereços e "
-"todas as interfaces (:69). Se nenhum porto for especificado, será "
+"todas as interfaces (0.0.0.0:69). Se nenhum porto for especificado, será "
 "usado o 69."
 
 #. Type: string
diff -ruN tftp-hpa-5.2+20140608/debian/po/ru.po tftp-hpa-5.2+20140608.orig/debian/po/ru.po
--- tftp-hpa-5.2+20140608/debian/po/ru.po	2014-11-29 15:01:55.160005600 +0000
+++ tftp-hpa-5.2+20140608.orig/debian/po/ru.po	2014-11-29 15:15:38.000000000 +0000
@@ -76,10 +76,10 @@
 #: ../tftpd-hpa.templates:3001
 msgid ""
 "By default, the TFTP server listens to port 69 on all addresses and all "
-"interfaces (:69). If no port is specified, it defaults to 69."
+"interfaces (0.0.0.0:69). If no port is specified, it defaults to 69."
 msgstr ""
 "По умолчанию, сервер TFTP прослушивает порт 69 на всех адресах и интерфейсах "
-"(:69). Если порт не указан, то по умолчанию используется 69."
+"(0.0.0.0:69). Если порт не указан, то по умолчанию используется 69."
 
 #. Type: string
 #. Description
diff -ruN tftp-hpa-5.2+20140608/debian/po/sk.po tftp-hpa-5.2+20140608.orig/debian/po/sk.po
--- tftp-hpa-5.2+20140608/debian/po/sk.po	2014-11-29 15:01:55.144005600 +0000
+++ tftp-hpa-5.2+20140608.orig/debian/po/sk.po	2014-11-29 15:15:38.000000000 +0000
@@ -72,10 +72,10 @@
 #: ../tftpd-hpa.templates:3001
 msgid ""
 "By default, the TFTP server listens to port 69 on all addresses and all "
-"interfaces (:69). If no port is specified, it defaults to 69."
+"interfaces (0.0.0.0:69). If no port is specified, it defaults to 69."
 msgstr ""
 "Predvolene server TFTP načúva na porte 69 na všetkých adresách a všetkých "
-"rozhraniach (:69). Ak nie je zadaný port, je predvolene použitý port "
+"rozhraniach (0.0.0.0:69). Ak nie je zadaný port, je predvolene použitý port "
 "69."
 
 #. Type: string
diff -ruN tftp-hpa-5.2+20140608/debian/po/sv.po tftp-hpa-5.2+20140608.orig/debian/po/sv.po
--- tftp-hpa-5.2+20140608/debian/po/sv.po	2014-11-29 15:01:55.164005600 +0000
+++ tftp-hpa-5.2+20140608.orig/debian/po/sv.po	2014-11-29 15:15:38.000000000 +0000
@@ -70,10 +70,10 @@
 #: ../tftpd-hpa.templates:3001
 msgid ""
 "By default, the TFTP server listens to port 69 on all addresses and all "
-"interfaces (:69). If no port is specified, it defaults to 69."
+"interfaces (0.0.0.0:69). If no port is specified, it defaults to 69."
 msgstr ""
 "Standardvärdet är att TFTP-servern lyssnar på port 69 på alla adress och "
-"alla gränssnitt (:69). Om ingen port anges kommer standardporten 69 "
+"alla gränssnitt (0.0.0.0:69). Om ingen port anges kommer standardporten 69 "
 "att användas."
 
 #. Type: string
diff -ruN tftp-hpa-5.2+20140608/debian/po/templates.pot tftp-hpa-5.2+20140608.orig/debian/po/templates.pot
--- tftp-hpa-5.2+20140608/debian/po/templates.pot	2014-11-29 15:01:55.148005600 +0000
+++ tftp-hpa-5.2+20140608.orig/debian/po/templates.pot	2014-11-29 15:15:38.000000000 +0000
@@ -68,7 +68,7 @@
 #: ../tftpd-hpa.templates:3001
 msgid ""
 "By default, the TFTP server listens to port 69 on all addresses and all "
-"interfaces (:69). If no port is specified, it defaults to 69."
+"interfaces (0.0.0.0:69). If no port is specified, it defaults to 69."
 msgstr ""
 
 #. Type: string
diff -ruN tftp-hpa-5.2+20140608/debian/po/zh_CN.po tftp-hpa-5.2+20140608.orig/debian/po/zh_CN.po
--- tftp-hpa-5.2+20140608/debian/po/zh_CN.po	2014-11-29 15:01:55.148005600 +0000
+++ tftp-hpa-5.2+20140608.orig/debian/po/zh_CN.po	2014-11-29 15:15:38.000000000 +0000
@@ -69,7 +69,7 @@
 #: ../tftpd-hpa.templates:3001
 msgid ""
 "By default, the TFTP server listens to port 69 on all addresses and all "
-"interfaces (:69). If no port is specified, it defaults to 69."
+"interfaces (0.0.0.0:69). If no port is specified, it defaults to 69."
 msgstr ""
 
 #. Type: string
diff -ruN tftp-hpa-5.2+20140608/debian/tftpd-hpa.postinst tftp-hpa-5.2+20140608.orig/debian/tftpd-hpa.postinst
--- tftp-hpa-5.2+20140608/debian/tftpd-hpa.postinst	2014-11-29 09:39:36.907380854 +0000
+++ tftp-hpa-5.2+20140608.orig/debian/tftpd-hpa.postinst	2014-11-29 15:15:38.000000000 +0000
@@ -15,7 +15,7 @@
 		TFTP_DIRECTORY="${RET:-/srv/tftp}"
 
 		db_get tftpd-hpa/address
-		TFTP_ADDRESS="${RET:-:69}"
+		TFTP_ADDRESS="${RET:-0.0.0.0:69}"
 
 		db_get tftpd-hpa/options
 		TFTP_OPTIONS="${RET}" # is ok when empty
diff -ruN tftp-hpa-5.2+20140608/debian/tftpd-hpa.templates tftp-hpa-5.2+20140608.orig/debian/tftpd-hpa.templates
--- tftp-hpa-5.2+20140608/debian/tftpd-hpa.templates	2014-11-29 15:00:29.768002416 +0000
+++ tftp-hpa-5.2+20140608.orig/debian/tftpd-hpa.templates	2014-11-29 15:15:38.000000000 +0000
@@ -17,13 +17,13 @@
 
 Template: tftpd-hpa/address
 Type: string
-Default: :69
+Default: 0.0.0.0:69
 _Description: TFTP server address and port:
  Please specify an address and port to listen to in the form of
  [address][:port].
  .
  By default, the TFTP server listens to port 69 on all addresses and all
- interfaces (:69). If no port is specified, it defaults to 69.
+ interfaces (0.0.0.0:69). If no port is specified, it defaults to 69.
  .
  Please note that numeric IPv6 addresses must be enclosed in square brackets
  to avoid ambiguity with the optional port information.

Reply via email to