The combined patch for OUTGOING_IP and QMTPC (qmail-1.03-qmtpc_outgoingip.patch) fails to pass the 'outip' parameter to timeoutconn() which results in a segfault. Fix: The current combined patch has this block: + + if (qmtp_priority(ip.ix[i].pref)) { + if (timeoutconn(smtpfd,&ip.ix[i].ip,(unsigned int) qmtp_port,timeoutconnect) == 0) { + tcpto_err(&ip.ix[i].ip,0); + partner = ip.ix[i].ip; + qmtp(); /* does not return */ + } + close(smtpfd); + smtpfd = socket(AF_INET,SOCK_STREAM,0); + if (smtpfd == -1) temp_oserr(); + } - if (timeoutconn(smtpfd,&ip.ix[i].ip,(unsigned int) port,timeoutconnect) == 0) { + if (timeoutconn(smtpfd,&ip.ix[i].ip,&outip,(unsigned int) smtp_port,timeoutconnect) == 0) { ------------------------ The first timeoutconn should be fixed to: if (timeoutconn(smtpfd,&ip.ix[i].ip,&outip, (unsigned int) qmtp_port,timeoutconnect) == 0) Note the &outip being passed in, same as the smtp timeoutconn() call. No patch attached. Let me know if you would like one. How-To-Repeat: Enable OUTGOING_IP and QMTPC. Send an email to a server with QMTP support enabled. 12801 in its MX. Tracing with gdb shows that the crash is in timeoutconn() as the 'outip' param is 0xd1 (209).
Responsible Changed From-To: freebsd-ports-bugs->garga Over to maintainer (via the GNATS Auto Assign Tool)
What you are saying is exactly the patch does, it replaces the line: if (timeoutconn(smtpfd,&ip.ix[i].ip,(unsigned int) port,timeoutconnect) == 0) { for: if (timeoutconn(smtpfd,&ip.ix[i].ip,&outip,(unsigned int) smtp_port,timeoutconnect) == 0) { Maybe I missed something on your explanation, please, send a patch and i'll take a look. Thanks -- Renato Botelho <garga @ FreeBSD.org> <garga @ freebsdbrasil.com.br> GnuPG Key: http://www.FreeBSD.org/~garga/pubkey.asc But these pills can't be habit forming; I've been taking them for years.
Renato, I am referring to the combined patch called qmail-1.03-qmtpc_outgoingip.patch. The one that is used when selecting both QMTPC and OUTGOINGIP as opposed to 2 different patches. Yes, the timeoutconn for the smtp port is proper. The line for the qmtp port is not. See attached patch against qmail-1.03-qmtpc_outgoingip.patch. Thanks, Bryan
State Changed From-To: open->closed Committed. Thanks!
garga 2009-07-01 17:27:44 UTC FreeBSD ports repository Modified files: mail/qmail Makefile distinfo Log: Fix qmtpc + outgoingip patch to prevent a segfault when both are applied PR: ports/136176 Submitted by: Bryan Drewery <bryan@shatow.net> Revision Changes Path 1.143 +1 -1 ports/mail/qmail/Makefile 1.74 +3 -3 ports/mail/qmail/distinfo _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"