[Dnsmasq-discuss] Sending a fake reply to client by dnsmasq

Albert ARIBAUD albert.aribaud at free.fr
Tue Jun 14 12:38:03 BST 2016


Hi Ravin,

Le Tue, 14 Jun 2016 16:30:41 +0530
ravin goyal <ravirocks1021 at gmail.com> a écrit:

> Hi, I am working on dnsmasq-2.75 and i want to send a fake reply to
> client when it reqest dnsmasq for answers such that dnsmasq rather
> than sending the packet contaning the reply it sends the fake reply
> 
> I tried changing daemon->packet memory location to some random valid
> memory location in reply_query function of forward.c file since char
> *packet of daemon struct contains the reply that dnsmasq will forward
> to client right??
> 
> But afterwards dnsmasq fails to resppond to any query sent by client?
> First i tried setting the daemon->packet to NULL then sendmsg failed
> by giving error
> "Bad address";
> 
> Is there way that i can proceed with this? OR I am doing something
> wrong here

Can you not use address= lines in the standard dnsmasq conf line?

> Regards
> Ravin

Amicalement,
-- 
Albert.



More information about the Dnsmasq-discuss mailing list