Bug #3353

DHCP TFTP server ignored by clients

Added by Filippo Carletti over 5 years ago. Updated over 5 years ago.

Status:CLOSEDStart date:
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:nethserver-dnsmasq
Target version:v6.7
Security class: Resolution:
Affected version:v6.7 NEEDINFO:No

Description

DHCP advanced setting option to set TFTP server is ignored by clients.

Associated revisions

Revision 2584258d
Added by Filippo Carletti over 5 years ago

dhcp: fix tftp server syntax. Refs #3353

Revision fa51f833
Added by Giacomo Sanchietti over 5 years ago

Revert "dhcp: fix tftp server syntax. Refs #3353"

This reverts commit 2584258d0513a6c24f982da92b7393c13d438f12.
Fixes forgotten push.

Revision 7a2fa140
Added by Filippo Carletti over 5 years ago

dhcp: fix tftp server syntax. Refs #3353

History

#1 Updated by Filippo Carletti over 5 years ago

  • Status changed from NEW to TRIAGED
  • Target version set to v6.7
  • % Done changed from 0 to 20
  • Affected version set to v6.7

The TFTP option is a string, not an ip address.
The correct syntax needs quotes.
From dnsmasq manual:

To force a literal string, use quotes. For instance when using  option 66 to send a literal IP address as TFTP server name, it is necessary to do --dhcp-option=66,"1.2.3.4" 

#2 Updated by Filippo Carletti over 5 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Filippo Carletti
  • % Done changed from 20 to 30

#3 Updated by Filippo Carletti over 5 years ago

  • Status changed from ON_DEV to MODIFIED
  • % Done changed from 30 to 60

I also used explicit options names instead of numbers, i.e. option:tftp-server instead of 66, I think it's easier to read and understand..

#4 Updated by Filippo Carletti over 5 years ago

  • Status changed from MODIFIED to ON_QA
  • % Done changed from 60 to 70

In nethserver-testing:
nethserver-dnsmasq-1.5.4-1.2.g2584258.ns6.noarch.rpm
nethserver-dnsmasq-1.5.5-1.5.g7a2fa14.ns6.noarch.rpm

Test case.
If you have a tftp server in your lan, set it's ip in dhcp advanced options and check that your devices can boot.

Another option is to capture traffic on the dhcp server to check for the right option.

tcpdump -nn -p -i eth0 -s 1500 -v ether host 08:00:27:xx:xx:xx

where eth0 is the dhcp interface and 08:00:27... is the mac address of the dhcp client.
On the client, I used "dhclient -v -d enp0s3" to obtain the ip.
The packet captured in the server has the following lines:
      Client-Ethernet-Address 08:00:27:xx:xx:xx
      sname "1.2.3.4" 


where 1.2.3.4 is the tftp server I put in the dhcp page.

#5 Updated by Filippo Carletti over 5 years ago

  • Assignee deleted (Filippo Carletti)

#6 Updated by Giacomo Sanchietti over 5 years ago

  • Assignee set to Giacomo Sanchietti

#7 Updated by Giacomo Sanchietti over 5 years ago

  • Status changed from ON_QA to VERIFIED
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 70 to 90

VERIFIED

Set DHCP on a blue interface, with TFTP server option "192.168.1.2".
Before update:

[root@test1 cgp]# grep 192.168.1.2 /etc/dnsmasq.conf 
dhcp-option=eth3,66,192.168.1.2 # TFTP

After update:

[root@test1 cgp]# grep 192.168.1.2 /etc/dnsmasq.conf 
dhcp-option=eth3,option:tftp-server,"192.168.1.2" 

#8 Updated by Giacomo Sanchietti over 5 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100

Released in 6.7/nethserver-updates:
nethserver-dnsmasq-1.5.6-1.ns6.noarch.rpm

Released in 7.2.1511/nethserver-updates:
nethserver-dnsmasq-1.5.6-1.8.g590a8bb.ns7.noarch.rpm

Also available in: Atom PDF