FS#1448 - Host file from removed dnsmasq section remains in effect.

Open
#6,412 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Domain
networking

Research direction

Start with the dnsmasq reload path invoked by /etc/init.d/dnsmasq and inspect how /tmp/hosts/dhcp.bar is created and removed when /etc/config/dhcp changes. Reproduce the two configurations and reloads, then verify that the removed host file no longer exists or affects connected clients.

Written by the indexing model from the issue text.

Description

flyspray

philsauce:

Using OpenWrt trunk, if a dnsmasq section is removed from the dhcp uci file, its host file will remain in /tmp/hosts/

To replicate:

Set the content of /etc/config/dhcp to:

config dnsmasq 'foo'

config dnsmasq 'bar'

config 'domain'
option instance 'bar'
option name 'baz'
option ip '127.1.1.1'

Run:
/etc/init.d/dnsmasq reload

Set the content of /etc/config/dhcp to:

config dnsmasq 'foo'

Run:
/etc/init.d/dnsmasq reload

The file /tmp/hosts/dhcp.bar still exists, and its content will remain in effect for connected clients.

Dominant language
C
Stars
28.5k
Forks
13k
Avg merge
3d 1h
Merged PRs (30d)
160

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openwrt/openwrt

All issues in openwrt/openwrt

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.