[LEDE-DEV] dnsmasq possible bug on creating config

Uwe Arnold donvipre at gmail.com
Tue Jun 20 12:16:28 PDT 2017


Hi guys,

I'm using openwrt / lede devices for at least 5 years but never
actively submitted any line of code or something.
But i think the time has come ;)

I hope this is the right channel for this:
I added below lines to /etc/dnsmasq.conf:
# inspect the vendor class string and match the text to set the tag
dhcp-vendorclass=BIOS,PXEClient:Arch:00000
dhcp-vendorclass=UEFI32,PXEClient:Arch:00006
dhcp-vendorclass=UEFI,PXEClient:Arch:00007
dhcp-vendorclass=UEFI64,PXEClient:Arch:00009

# Set the boot file name based on the matching tag from the vendor
class (above)
dhcp-boot=net:UEFI32,i386-efi/ipxe.efi,tftpboot-server,192.168.30.254
dhcp-boot=net:UEFI,ipxe.efi,tftpboot-server,192.168.30.254
dhcp-boot=net:UEFI64,ipxe.efi,tftpboot-server,192.168.30.254

And the below lines to /etc/config/dhcp:
config boot linux
        option filename         'pxelinux.0'
        option serveraddress    '192.168.30.254'
        option servername       'tftpboot-server'

the auto generated config file /var/etc/dnsmasq.conf.cfg02411c
will only contain this line:
dhcp-boot=pxelinux.0,tftpboot-server,192.168.30.254

I'm a bit confused as i thought that the above dhcp-boot=net:UEFI*
lines should be available in the generated config which is indeed not
the case.

In /etc/init.d/dnsmasq I found in line 843:
append_parm "$cfg" "dhcp_boot" "--dhcp-boot"

as for example the pxe_service is scripted as a config_list_foreach:
config_list_foreach "$cfg" "pxe_service" append_pxe_service

below the version information and so on:
cat /etc/openwrt_releaseappend_parm "$cfg" "dhcp_boot" "--dhcp-boot"
DISTRIB_ID='LEDE'
DISTRIB_RELEASE='SNAPSHOT'
DISTRIB_REVISION='r4407-a3332f2'
DISTRIB_CODENAME='reboot'
DISTRIB_TARGET='ar71xx/generic'
DISTRIB_ARCH='mips_24kc'
DISTRIB_DESCRIPTION='LEDE Reboot SNAPSHOT r4407-a3332f2'
DISTRIB_TAINTS='no-all'
uname -mrvo
4.4.71 #0 Wed Jun 14 15:47:08 UTC 2017 mips GNU/Linux
dnsmasq -v
Dnsmasq version 2.77  Copyright (c) 2000-2016 Simon Kelley
Compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-
DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth no-DNSSEC no-ID loop-
detect inotify

This software comes with ABSOLUTELY NO WARRANTY.
Dnsmasq is free software, and you are welcome to redistribute it
under the terms of the GNU General Public License, version 2 or 3.

Don't hesistate to contact me if you need more information and indeed
i'm willing to investgate this.

Best regards,
Uwe



More information about the Lede-dev mailing list