<div dir="ltr"><div><div><div><div>Hi Sir<br><br></div>I actually need to do it in code rather than in the conf file itself.<br></div>Can you tell me that i am making changes at right function and in the right file or should i do something else?<br><br></div><div>I hope you get the idea behind what i am trying to do here<br><br></div><div>thanks in advance<br></div><div><br></div>Regards<br></div>Ravin<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 14 June 2016 at 17:08, Albert ARIBAUD <span dir="ltr"><<a href="mailto:albert.aribaud@free.fr" target="_blank">albert.aribaud@free.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Ravin,<br>
<br>
Le Tue, 14 Jun 2016 16:30:41 +0530<br>
ravin goyal <<a href="mailto:ravirocks1021@gmail.com">ravirocks1021@gmail.com</a>> a écrit:<br>
<span class=""><br>
> Hi, I am working on dnsmasq-2.75 and i want to send a fake reply to<br>
> client when it reqest dnsmasq for answers such that dnsmasq rather<br>
> than sending the packet contaning the reply it sends the fake reply<br>
><br>
> I tried changing daemon->packet memory location to some random valid<br>
> memory location in reply_query function of forward.c file since char<br>
> *packet of daemon struct contains the reply that dnsmasq will forward<br>
> to client right??<br>
><br>
> But afterwards dnsmasq fails to resppond to any query sent by client?<br>
> First i tried setting the daemon->packet to NULL then sendmsg failed<br>
> by giving error<br>
> "Bad address";<br>
><br>
> Is there way that i can proceed with this? OR I am doing something<br>
> wrong here<br>
<br>
</span>Can you not use address= lines in the standard dnsmasq conf line?<br>
<br>
> Regards<br>
> Ravin<br>
<br>
Amicalement,<br>
<span class="HOEnZb"><font color="#888888">--<br>
Albert.<br>
</font></span></blockquote></div><br></div>