Bug 229218 - dns/dnsmasq starts dnsmasq via rc.d too early in some cases
Summary: dns/dnsmasq starts dnsmasq via rc.d too early in some cases
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Matthias Andree
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-21 18:25 UTC by Vladimir
Modified: 2018-06-24 09:04 UTC (History)
0 users

See Also:
mandree: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir 2018-06-21 18:25:39 UTC
Too early start dnsmasq via rc.d in some cases leads dnsmasq failed to create listening socket. Often met case is starting dnsmasq before openvpn with listen on tun iface leads to fail.
For now rcorder places 'dnsmasq' before 'openvpn'.
Solution is "START_LATE" config option like it done in dns/bind99 (See: dns/bind99/pkg-help) ports r388211
Comment 1 Matthias Andree freebsd_committer freebsd_triage 2018-06-21 18:37:37 UTC
We cannot fix this for all users. 

Either you need interfaces to launch Dnsmasq on, as in your case, others may  need Dnsmasq to launch the VPN tunnel daemon in the first place.

Consider not binding Dnsmasq to interfaces, or restart it after the VPN is up.
Comment 2 Vladimir 2018-06-21 18:55:50 UTC
Suggested "START_LATE" option is not 'fix for all users'.
It's config option offed by default.
From pkg-help in Bind:
"Most of the time, BIND needs to start early in the boot
process.  Enable this if BIND starts too early for you and
you need it to start later."
Don't see why it isn't applicable by dnsmasq.
Comment 3 Vladimir 2018-06-21 19:17:20 UTC
(In reply to Matthias Andree from comment #1)
Suggested "START_LATE" option is not 'fix for all users'.
It's config option offed by default.
From pkg-help in Bind:
"Most of the time, BIND needs to start early in the boot
process.  Enable this if BIND starts too early for you and
you need it to start later."
Don't see why it isn't applicable by dnsmasq.
Comment 4 Matthias Andree freebsd_committer freebsd_triage 2018-06-24 09:04:41 UTC
The question is not whether it weren't applicable, but why it were necessary. dnsmasq normally binds to the wildcard address so I don't see why it needs to start after openvpn.  Plus you can configure openvpn to restart dnsmasq, see the "--up cmd" option.