Modify

Opened 3 years ago

Last modified 3 years ago

#19205 new defect

/var/etc/dnsmasq.conf need concurrent write protection ?

Reported by: spiritbook Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: dnsmas, dhcp Cc:

Description

The script /etc/init.d/dnsmasq may be called multithreading, like the command "/etc/init.d/dnsmasq start" in /etc/hotplug.d/iface/25-dnsmasq。

Does the configuration file "/var/etc/dnsmasq.conf" need some protection ?
just when the older process dnsmasq is reading this file,the newer script dnsmasq is changing this file。

thx

Attachments (0)

Change History (2)

comment:1 Changed 3 years ago by spiritbook

finally, the /var/etc/dnsmasq.conf is

# auto-generated config file from /etc/config/dhcp
conf-file=/etc/dnsmasq.conf
rebind-localhost-ok
dhcp-broadcast=tag:needs-broadcast

dhcp-authoritative
domain-needed
localise-queries
read-ethers
bogus-priv
expand-hosts
dhcp-host=d4:97:0b:b7:9e:de,192.168.110.202,miphone

domain=lan
server=/lan/
dhcp-leasefile=/tmp/dhcp.leases
resolv-file=/tmp/resolv.conf.auto
addn-hosts=/tmp/hosts
conf-dir=/tmp/dnsmasq.d
stop-dns-rebind
host-record=Ruijie.lan,Ruijie,192.168.110.1

rebind-localhost-ok
dhcp-broadcast=tag:needs-broadcast

dhcp-host=d4:97:0b:b7:9e:de,192.168.110.202,miphone

host-record=Ruijie.lan,Ruijie,192.168.110.1

dhcp-range=lan,192.168.110.100,192.168.110.249,255.255.255.0,8h
no-dhcp-interface=pppoe-wan

dhcp-range=lan,192.168.110.100,192.168.110.249,255.255.255.0,8h
no-dhcp-interface=pppoe-wan

have duplicate dhcp-host, and dnsmasq quit when init.
Tue Mar 17 18:29:20 2015 daemon.crit dnsmasq[17837]: duplicate dhcp-host IP address 192.168.110.202 at line 27 of /var/etc/dnsmasq.c15-03-17 06:30:16 onf
Tue Mar 17 18:29:20 2015 daemon.crit dnsmasq[17837]: FAILED to start up

comment:2 Changed 3 years ago by anonymous

Indeed some locking is needed ...

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.