From owner-freebsd-fs@FreeBSD.ORG Sun Oct 17 15:34:30 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28AF4106566B; Sun, 17 Oct 2010 15:34:30 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 7FE0B8FC17; Sun, 17 Oct 2010 15:34:28 +0000 (UTC) Received: by fxm12 with SMTP id 12so28073fxm.13 for ; Sun, 17 Oct 2010 08:34:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:user-agent:mime-version:content-type; bh=ZXe6PeCo52qEmn+ye+vlZmceQkmbkhfFOPjcqmEhbu0=; b=gQjyBW2S2oGR9ae88R9FoJJ9stSyOoq5leFdxf7X+6Tk/jNUNhhEL66TC47iWgmU3i KTag9Rbhjgdi21+fBLm+2gCQ7u+mSSn05rUcSEJyGB961ZF4VjFlbIVfCnhlWMDwSxmC HEfTEfX8zV+pOxAXiYSCG3SuyDnAz73PN2S5g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:user-agent:mime-version :content-type; b=QeTrKT/FyyPeGX6ZH11DafFDXfVaOhVfB3VJfqlaHLSj9S2OGzU9EXODWbIO+hkMOe 7EiDBJFWCFR0bsGfRx4nbBY58PXp1l+kCOCGOK4INSwVlyv/6vH/T3kAJ+3Cak8Fmjx0 +y5Duy3NI/fDe87OsYlpWOBQb+sNBI/7uLj68= Received: by 10.223.1.133 with SMTP id 5mr378367faf.18.1287329668174; Sun, 17 Oct 2010 08:34:28 -0700 (PDT) Received: from localhost ([95.69.174.185]) by mx.google.com with ESMTPS id s18sm3718576fax.34.2010.10.17.08.34.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 17 Oct 2010 08:34:27 -0700 (PDT) From: Mikolaj Golub To: freebsd-fs@freebsd.org Date: Sun, 17 Oct 2010 18:34:24 +0300 Message-ID: <86zkuc4yv3.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Cc: Pawel Jakub Dawidek Subject: hastd: wrong address is logged when cancelling half-open connection X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2010 15:34:30 -0000 --=-=-= Hi, It looks like there is a typo in the listen_accept(): when half-open connection is cancelled hastd reports a wrong address being cancelled. See the attached patch. -- Mikolaj Golub --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=hastd.cancel.patch Index: sbin/hastd/hastd.c =================================================================== --- sbin/hastd/hastd.c (revision 213978) +++ sbin/hastd/hastd.c (working copy) @@ -527,7 +527,7 @@ listen_accept(void) } else if (res->hr_remotein != NULL) { char oaddr[256]; - proto_remote_address(conn, oaddr, sizeof(oaddr)); + proto_remote_address(res->hr_remotein, oaddr, sizeof(oaddr)); pjdlog_debug(1, "Canceling half-open connection from %s on connection from %s.", oaddr, raddr); --=-=-=--