Core: dnsmasq: junk found in command line

Created on 5 Apr 2019  路  2Comments  路  Source: opnsense/core

Describe the bug
When new is entered into Advanced options on /services_dnsmasq.php page, dnsmasq fail to start. Log file:

dnsmasq[28494]: junk found in command line
dnsmasq[28494]: FAILED to start up
opnsense-devel: /services_dnsmasq.php: The command '/usr/local/sbin/dnsmasq --all-servers --rebind-localhost-ok --stop-dns-rebind -H /var/etc/dnsmasq-hosts  --port=53  --bogus-priv  '--ipset=/youtube.com/ytimg.com/googlevideo.com/youtube' '--ipset=/freeconet.pl/fcn.pl/voip' '--' --dns-forward-max=5000 --cache-size=10000 --local-ttl=1' returned exit code '1', the output was ' dnsmasq: junk found in command line'
dhcpleases: Could not deliver signal HUP to process because its pidfile does not exist, No such process.
dhcpd: All rights reserved.
dhcpd: For info, please visit https://www.isc.org/software/dhcp/
dhcpleases: Could not deliver signal HUP to process because its pidfile does not exist, No such process.
dhcpd: Config file: /etc/dhcpd.conf

To Reproduce
On page 'services_dnsmasq.php' write some additional options like:

ipset=/youtube.com/ytimg.com/googlevideo.com/youtube
ipset=/freeconet.pl/fcn.pl/voip

NOTE: empty newline at end

Expected behavior
UI should trim trailing newlines to prevent errors.

Version

User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0
FreeBSD 11.2-RELEASE-p9-HBSD  f083bc4f8a0(stable/19.1) amd64
OPNsense 19.7.a_288 3cff50bc2
Plugins os-clamav-1.5_1 os-dmidecode-1.1 os-dyndns-1.13 os-etpro-telemetry-1.2 os-iperf-1.0 os-mail-backup-devel-0.1 os-net-snmp-1.3 os-ntopng-1.2 os-nut-1.4 os-redis-1.0 os-smart-1.5 os-vnstat-1.1_1 os-wol-2.1 
Time Fri, 05 Apr 2019 06:47:18 +0000
OpenSSL 1.0.2r  26 Feb 2019
PHP 7.1.27
bug

Most helpful comment

Thank you for fast fix.
You right, there should be separate settings to provide ipset domains pattern and ipset/pftables name.
When I found more "meantime" I will try to implement this.

All 2 comments

I'm glad we're not offering "advanced" settings in new components and have removed a lot of them in the past, these are prone to errors and impossible to validate.

Thank you for fast fix.
You right, there should be separate settings to provide ipset domains pattern and ipset/pftables name.
When I found more "meantime" I will try to implement this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xpac1985 picture xpac1985  路  5Comments

StrikerTwo picture StrikerTwo  路  8Comments

darkain picture darkain  路  4Comments

gauthig picture gauthig  路  3Comments

namezero111111 picture namezero111111  路  5Comments