[Dnsmasq-discuss] Dnsmasq-discuss Digest, Vol 138, Issue 13

Albert ARIBAUD albert.aribaud at free.fr
Tue Nov 22 19:29:08 GMT 2016


Bonjour,

Le Tue, 22 Nov 2016 17:47:09 +0000
Rahul Jain <rahul2308 at outlook.com> a écrit:

> Hi Albert, thank you for replying. I have access to the source code
> of the router and all it's internals.
> 
> I can download the source code of dnsmasq, compile and build it for
> the router(not on the router) but I need to run the dnsmasq as a
> service which I can't do on mipsel-linux because it doesn't contain
> anything equivalent to "service". So I'm generating the binary on a
> ubuntu(16.04 LTS) system and using that in the router running
> mipsel-linux.

Er... If your router does not contain anything equivalent to "service",
then there is no point in trying to run "service dnsmasq start" on this
router.

> On the ubuntu system, when I run dnsmasq with add-mac in the
> configuration, I'm able to see EDNS0 option in the dns query. This is
> happening only when I installed and run dnsmasq from apt-get. When I
> tried to compile it and run it from the same configurations, I'm not
> able to see the EDNS0 option.

I assume you are talking about some PC with Ubuntu running on it? This
is a different system than your router and there is no reason that this
PC should behave the same as the router, and you simply cannot infer
much from one system to the other.

> Now I'm left with two things, one is to
> install dnsmasq from the apt-get on mipsel-linux which is not
> possible because it does not have apt-get or any other package
> manager and the second option being to compile the source for the
> router.

I suspect this conclusion is premature.

For one thing, do you have the right tools to build a binary for your
router? Do you know which kernel it runs (not simply the version, but
the actual kernel headers)? Do you know which C library it uses? Do you
know which compiler toolchain was used to build this system? Do you have
all these thinkgs -- kernel, lib, toolchain -- in working order? Can
you rebuild the whole router system? If no, then compiling is IMO not
a valid option right now.

> So for now, I want to compile the dnsmasq source code on my ubuntu
> system or for the router, not from the apt-get, and want the EDNS0
> option in the dns query.

I believe this is not the right approach to solve your problem (which,
IIUC, is to be able to enable the "add-mac" option on the dnsmasq which 
runs on your router; if this is not what you are actually trying to
achieve, then do correct me).

First, to run your Ubuntu's own dnsmasq with the add-mac option enabled
does not require any compilation; adding a single one-line file at the
right place is all it takes -- I've just checked this on the very
Xubuntu machine I am writing this mail on.

Second, even once you've done it, it will be of no use for the dnsmasq
on your router, because your router is not a Ubuntu system, and nothing
will happen if you add the same file in the same location -- a location
which quite possibly does not even exist on your router.

But there are good chances that on that router, there is /another/
location, where adding (or modifying) /another/ file in /another/ way
will have the effect you are looking for.

My suggestion is that you forget the whole "building on Ubuntu" thing
for now, and even the "building" thing at all, and concentrate on your
router, to find that location and file which control the options of your
router's dnsmasq.

As /dev/rob0 and I told you, you are having a system question, not a
dnsmasq question. The right way to tackle it is not to look in dnsmasq,
but to look in the system (and in the /right/ system).

A good start would be to indicate which router it is that you are
working on, and which firmware it runs.

HTH

Amicalement,
-- 
Albert.



More information about the Dnsmasq-discuss mailing list