OpenWrt/LEDE Project

  • Status New
  • Percent Complete
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Medium
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Daniel Golle - 17.08.2016
Last edited by Ted Hess - 08.09.2016

FS#97 - dnsmasq doesn't receive updated dns servers when running inside ujail

Bind-mounting /tmp/ apparently doesn’t forward inotify events arriving from the kernel when was changed (e.g. upstream DNS servers were received by a DHCP client or pppd). Restarting dnsmasq or running it without ujail solves the issue.

Etienne CHAMPETIER commented on 18.08.2016 13:48

Hi Daniel,
can you check if the inode number of /tmp/ change when such events happen
(ls -i /tmp/

Project Manager
Daniel Golle commented on 30.08.2016 11:02

Yes, apparently it does.

root@test:~# ls -i /tmp/

 3400 /tmp/

root@test:~# /etc/init.d/network restart
root@test:~# ls -i /tmp/

 3897 /tmp/


Etienne CHAMPETIER commented on 04.09.2016 17:17

Hi Daniel,
It's one of the limitations of bind mounts, what you see in the jail is the file with inode 3400 and never the one with inode 3897, because what you really changed is /tmp

There is 2 workarounds:
1) write to the file instead of replacing it with a new one (with mv/rename). With this option you loose the atomicity of the rename
2) bind mount the parent dir of the file, bind mouting /tmp is not a good idea but maybe you can move in a dnsmasq dir

Nathaniel Wesley Filardo commented on 09.10.2017 20:09

May I propose that netifd write not to /tmp/ but to /tmp/netifd/resolv.conf or similar, so that /tmp/netifd can be mounted into the jail as a directory and inotify will work?


Available keyboard shortcuts


Task Details

Task Editing