Re: smtpd w/ async DNS

2010-10-30 Thread Gilles Chehade
On 10/15/10 10:50, Gilles Chehade wrote: Hi tech@, A new tarball has been uploaded yesterday, it contains the fixes eric@ wrote for the issues reported on asr. For now, only two issues have been reported on smtpd: 1- smtpd does not catch up changes to /etc/resolv.conf; 2- smtpd does not look

Re: smtpd w/ async DNS

2010-10-30 Thread Peter J. Philipp
On Sat, Oct 30, 2010 at 04:55:36PM +0200, Gilles Chehade wrote: Hi tech@, A new tarball with all reported issues fixed is available at: http://www.poolp.org/~gilles/smtpd-asyncdns.tar.gz smtpd now catches changes in /etc/resolv.conf and should work fine with inet6 records. I have

Re: smtpd w/ async DNS

2010-10-30 Thread Gilles Chehade
On 10/30/10 17:23, Peter J. Philipp wrote: On Sat, Oct 30, 2010 at 04:55:36PM +0200, Gilles Chehade wrote: Hi tech@, A new tarball with all reported issues fixed is available at: http://www.poolp.org/~gilles/smtpd-asyncdns.tar.gz smtpd now catches changes in /etc/resolv.conf and should

Re: smtpd w/ async DNS

2010-10-30 Thread Peter J. Philipp
On Sat, Oct 30, 2010 at 05:28:42PM +0200, Gilles Chehade wrote: It was a typo indeed, tarball has been updated and also contains a fix for a crash experienced by todd@ when using relay via Gilles I had a look at the pack.c file where the DNS compression is being handled. It looks good to me.

Re: smtpd w/ async DNS

2010-10-30 Thread Eric Faurot
On Sat, Oct 30, 2010 at 07:26:00PM +0200, Peter J. Philipp wrote: I had a look at the pack.c file where the DNS compression is being handled. It looks good to me. But I have one concern that needs to be confirmed. In function dname_expand() on lines: 54 ptr =

Re: smtpd w/ async DNS

2010-10-15 Thread Eric Faurot
On Thu, Oct 14, 2010 at 03:20:06PM -0600, Theo de Raadt wrote: On Thu, Oct 14, 2010 at 11:57 AM, Mike Belopuhov m...@crypt.org.ru wrote: this dns code has a serious flaw. you use arc4random to allocate request IDs. this is a bad decision, as you actually want a non-repeating property.

Re: smtpd w/ async DNS

2010-10-15 Thread Gilles Chehade
On Thu, Oct 14, 2010 at 04:47:26PM +0200, Gilles Chehade wrote: Dear tech@, eric@ has written an (awesome :p) asynchronous resolver that allows us to do non-blocking DNS lookups. As of today, smtpd implements non-blocking lookups through a fork+imsg hack, creating a socketpair() and a new

smtpd w/ async DNS

2010-10-14 Thread Gilles Chehade
Dear tech@, eric@ has written an (awesome :p) asynchronous resolver that allows us to do non-blocking DNS lookups. As of today, smtpd implements non-blocking lookups through a fork+imsg hack, creating a socketpair() and a new process for each lookup. It kind of worked ok but recently a bug

Re: smtpd w/ async DNS

2010-10-14 Thread Ted Unangst
On Thu, Oct 14, 2010 at 10:47 AM, Gilles Chehade gil...@openbsd.org wrote: eric@ has written an (awesome :p) asynchronous resolver that allows us to do non-blocking DNS lookups. Why not use the evdns resolver in libevent? If you're already using libevent, wouldn't that be a good fit? DNS

Re: smtpd w/ async DNS

2010-10-14 Thread Theo de Raadt
On Thu, Oct 14, 2010 at 10:47 AM, Gilles Chehade gil...@openbsd.org wrote: eric@ has written an (awesome :p) asynchronous resolver that allows us to do non-blocking DNS lookups. Why not use the evdns resolver in libevent? If you're already using libevent, wouldn't that be a good fit?

Re: smtpd w/ async DNS

2010-10-14 Thread Mike Belopuhov
On Thu, Oct 14, 2010 at 5:06 PM, Ted Unangst ted.unan...@gmail.com wrote: On Thu, Oct 14, 2010 at 10:47 AM, Gilles Chehade gil...@openbsd.org wrote: eric@ has written an (awesome :p) asynchronous resolver that allows us to do non-blocking DNS lookups. Why not use the evdns resolver in

Re: smtpd w/ async DNS

2010-10-14 Thread Gilles Chehade
On 10/14/10 17:06, Ted Unangst wrote: On Thu, Oct 14, 2010 at 10:47 AM, Gilles Chehadegil...@openbsd.org wrote: eric@ has written an (awesome :p) asynchronous resolver that allows us to do non-blocking DNS lookups. Why not use the evdns resolver in libevent? If you're already using

Re: smtpd w/ async DNS

2010-10-14 Thread Ted Unangst
On Thu, Oct 14, 2010 at 11:17 AM, Gilles Chehade gil...@poolp.org wrote: we don't have evdns in our libevent and I'm pretty confident it's not going to happen any time soon given how many times I heard no fucking way by different hackers :p In that case, here's some more constructive feedback

Re: smtpd w/ async DNS

2010-10-14 Thread Christiano F. Haesbaert
OS X routed all dns lookups to a daemon (both unicast and multicast), they can do local cashing and probably async lookups, maybe thats a future solution ? just my two cents.

Re: smtpd w/ async DNS

2010-10-14 Thread Gilles Chehade
On 10/14/10 17:30, Ted Unangst wrote: On Thu, Oct 14, 2010 at 11:17 AM, Gilles Chehadegil...@poolp.org wrote: we don't have evdns in our libevent and I'm pretty confident it's not going to happen any time soon given how many times I heard no fucking way by different hackers :p In

Re: smtpd w/ async DNS

2010-10-14 Thread Mike Belopuhov
On Thu, Oct 14, 2010 at 4:47 PM, Gilles Chehade gil...@openbsd.org wrote: Dear tech@, eric@ has written an (awesome :p) asynchronous resolver that allows us to do non-blocking DNS lookups. this dns code has a serious flaw. you use arc4random to allocate request IDs. this is a bad decision,

Re: smtpd w/ async DNS

2010-10-14 Thread Theo de Raadt
On Thu, Oct 14, 2010 at 11:57 AM, Mike Belopuhov m...@crypt.org.ru wrote: this dns code has a serious flaw. you use arc4random to allocate request IDs. this is a bad decision, as you actually want a non-repeating property. Why? Each query transmission uses a newly allocated socket with