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

ravin goyal ravirocks1021 at gmail.com
Tue Jun 14 13:30:00 BST 2016


Hi Sir

I actually need to do it in code rather than in the conf file itself.
Can you tell me that i am making changes at right function and in the right
file or should i do something else?

I hope you get the idea behind what i am trying to do here

thanks in advance

Regards
Ravin

On 14 June 2016 at 17:08, Albert ARIBAUD <albert.aribaud at free.fr> wrote:

> 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20160614/02d1cad4/attachment.html>


More information about the Dnsmasq-discuss mailing list