Thread
:
udhcp and dnsmasq info
View Single Post
Malakai
2017-02-07 , 20:39
Posts: 175 | Thanked: 210 times | Joined on Mar 2013
#
3
Hello sicelo,
Thanks for your response.
As I see it udhcpc doesn't directly update
/var/run/resolv.conf
, as in
/etc/dnsmasq.conf
there are multiple entries, one for each interface (
/var/run.resolv.conf.wlan
,
/var/run.resolv.conf.gprs
,
/var/run.resolv.conf.lo
and
/var/run.resolv.conf.ppp0
), and
/var/run.resolv.conf
is never created (at least when I was looking there). Each file (
/var/run/resolv.conf.$interface
) is created when connecting to that specific interface and contains the DNS server(s).
Now after digging a little more I've seen that there is a file
/etc/udhcpc/libicd_network_ipv4.script
that execute
run-parts -a "$1" /etc/maemo-dhcp.d
.
In
/etc/maemo-dhcp.d/
there is only one file called
50_ipv4_network_setup
which seem to be the one to create
/var/run/resolv.conf.$interface
. What I don't know is what calls the
/etc/udhcpc/libicd_network_ipv4.script
file in first place.
Any ideas?
Originally Posted by
sicelo
Any specific reason for asking?
I've setup an openvpn client on my N900 with some scripts to set a static mac address to its interface to get the same ip from the remote dhcp server (as in a consumer router, not from openvpn server itself), as I've seen the openvpn applet doesn't allow to set static mac address.
The scripts I've put in place seem to work and overall I'm satisfied with them but I feel like it could be better integrated if I could just call the scripts that udhcpc already calls with specific parameters to reach the same goal instead of using my own (maybe not so well written) scripts (at least for the ip and dns servers procurement).
Now what I look to achieve is better integrate the openvpn ip and dns servers request with the default udhcpc and dnsmasq way of working. The script I'm calling is
/etc/openvpn/maemo-update-resolvconf
which seem not to respect dnsmasq way on the N900 as it adds the dns server(s) obtained in /etc/resolv.conf (in which only the localhost ip should be) as this way dnsmasq is bypassed and the queries go directly to the upstream dns servers obtained without going through dnsmasq.
Hope the explaining was not to bad.
Quote & Reply
|
Malakai
View Public Profile
Send a private message to Malakai
Find all posts by Malakai