<div dir="ltr">Hello Simon,<div><br></div><div>I just tried dnsmasq-2.67test2 and I can confirm that it's working as intended: it's not segfaulting, and connections are being marked as expected.</div><div><br></div>
<div style>Thanks a lot!</div><div style><br></div><div style>-- Giacomo</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 22, 2013 at 2:22 PM, Simon Kelley <span dir="ltr"><<a href="mailto:simon@thekelleys.org.uk" target="_blank">simon@thekelleys.org.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">diff -u is good. But a well characterised bug, with a patch, is much better! Many thanks.<br>
<br>
I tweaked your patch a little, since it turns out that the information required to do the conntrack marking is always available in the forwarding record.<br>
<br>
The fixed code is in the git repo and dnsmasq-2.67test2 now. Please could you check that I didn't reverse your fix?<br>
<br>
<br>
Cheers,<br>
<br>
Simon.<div class="im"><br>
<br>
<br>
On 21/04/13 21:11, Giacomo Tazzari wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Thanks for the tip!<br>
This is the very first time I use a mailing list and the very first time I<br>
submit a patch of any kind.<br>
<br>
diff -u dnsmasq-2.66/src/forward.c dnsmasq-2.66-fixed/src/<u></u>forward.c<br>
--- dnsmasq-2.66/src/forward.c  2013-04-17 14:52:49.000000000 +0200<br>
+++ dnsmasq-2.66-fixed/src/<u></u>forward.c    2013-04-21 18:08:31.755258777 +0200<br>
@@ -369,7 +369,7 @@<br>
<br>
  #ifdef HAVE_CONNTRACK<br>
                   /* Copy connection mark of incoming query to outgoing<br>
connection. */<br>
-                 if (option_bool(OPT_CONNTRACK))<br></div>
+                 if (udpaddr&&  option_bool(OPT_CONNTRACK))<div class="im"><br>
                     {<br>
                       unsigned int mark;<br>
                       if (get_incoming_mark(udpaddr, dst_addr, 0,&mark))<br>
<br>
<br>
On Sun, Apr 21, 2013 at 9:50 PM, Matthias Andree<<a href="mailto:matthias.andree@gmx.de" target="_blank">matthias.andree@gmx.de</a>><u></u>wrote:<br>
<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Am <a href="tel:21.04.2013%2018" value="+12104201318" target="_blank">21.04.2013 18</a>:34, schrieb Giacomo Tazzari:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello!<br>
<br>
I encountered a bug that makes dnsmasq segfaults when the --conntrack<br>
option is enabled.<br>
I am not entirely sure how to reproduce it: on my router (an Ubuntu<br>
server) it seems to occur sometimes when a remote DNS responds with<br>
ServFail to an A query.<br>
<br>
Anyway, after compiling with debugging symbols, I figured out how to fix<br>
</blockquote>
it:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
$ diff dnsmasq-2.66/src/forward.c dnsmasq-2.66-fixed/src/<u></u>forward.c<br>
372c372<br>
<                  if (option_bool(OPT_CONNTRACK))<br>
---<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                 if (udpaddr&&  option_bool(OPT_CONNTRACK))<br>
</blockquote>
<br>
</blockquote><div class="im">
<br>
I am not speaking on behalf of Simon,<br>
<br>
but please, for any diff/patch submissions (not only for dnsmasq, but<br>
any open source project I've worked with), always use diff -u, or if<br>
your diff does not offer that option, diff -c, because that way it is<br>
easier to review, and also easier to apply should anything have changed.<br>
<br>
Please re-send your patch in that format to ease Simon's work.<br>
<br>
Thank you.<br>
<br>
<br>
______________________________<u></u>_________________<br>
Dnsmasq-discuss mailing list<br>
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.<u></u>thekelleys.org.uk</a><br>
<a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" target="_blank">http://lists.thekelleys.org.<u></u>uk/mailman/listinfo/dnsmasq-<u></u>discuss</a><br>
<br>
</div></blockquote><div class="im">
<br>
<br>
<br>
______________________________<u></u>_________________<br>
Dnsmasq-discuss mailing list<br>
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.<u></u>thekelleys.org.uk</a><br>
<a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" target="_blank">http://lists.thekelleys.org.<u></u>uk/mailman/listinfo/dnsmasq-<u></u>discuss</a><br>
</div></blockquote><div class="HOEnZb"><div class="h5">
<br>
<br>
______________________________<u></u>_________________<br>
Dnsmasq-discuss mailing list<br>
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.<u></u>thekelleys.org.uk</a><br>
<a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" target="_blank">http://lists.thekelleys.org.<u></u>uk/mailman/listinfo/dnsmasq-<u></u>discuss</a><br>
</div></div></blockquote></div><br></div>