From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1aePvp-00021T-HG for mharc-grub-devel@gnu.org; Fri, 11 Mar 2016 11:28:53 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50373) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aePvk-0001vi-Op for grub-devel@gnu.org; Fri, 11 Mar 2016 11:28:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aePvg-0001zS-Mx for grub-devel@gnu.org; Fri, 11 Mar 2016 11:28:48 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:36346) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aePvg-0001zI-H6 for grub-devel@gnu.org; Fri, 11 Mar 2016 11:28:44 -0500 Received: from pps.filterd (m0001303.ppops.net [127.0.0.1]) by m0001303.ppops.net (8.15.0.59/8.15.0.59) with SMTP id u2BGQqRE025014 for ; Fri, 11 Mar 2016 08:28:43 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fb.com; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=facebook; bh=/PTVnp/5srw0meUhV8N/v2jzHZhke48Vg6wTpEo6qsI=; b=c0fTqPcjZ3WBAuhU0DV3iGt1adZQrVKm6AxB3XZEF+dPBjEiC5JkCD4iqFX3r4D7GT1B bu9/t6MniEmjM3s0Eafk1K+XE9KowwcO4Jo6Zq9/SMOLdVWX5KOw226BBaQo0O+zuM/2 gItNfkWnBZRsstpHfF3vEbu6rPG+AZQrhrs= Received: from mail.thefacebook.com ([199.201.64.23]) by m0001303.ppops.net with ESMTP id 21kub11vsp-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Fri, 11 Mar 2016 08:28:43 -0800 Received: from localhost (192.168.52.123) by mail.thefacebook.com (192.168.16.19) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 11 Mar 2016 08:28:38 -0800 From: Josef Bacik To: , Subject: [PATCH 2/3] tcp: add a dprintf for opening tcp connections Date: Fri, 11 Mar 2016 11:28:34 -0500 Message-ID: <1457713715-31708-2-git-send-email-jbacik@fb.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1457713715-31708-1-git-send-email-jbacik@fb.com> References: <1457713715-31708-1-git-send-email-jbacik@fb.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.168.52.123] X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-03-11_08:, , signatures=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 67.231.153.30 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2016 16:28:49 -0000 In debugging strange timeouts and other network problems it has been helpful to see when we're opening new connections to get an idea of where we're having a breakdown. Signed-off-by: Josef Bacik --- grub-core/net/tcp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/grub-core/net/tcp.c b/grub-core/net/tcp.c index 2d1706e..cb97d05 100644 --- a/grub-core/net/tcp.c +++ b/grub-core/net/tcp.c @@ -632,6 +632,8 @@ grub_net_tcp_open (char *server, grub_uint8_t *nbd; grub_net_link_level_address_t ll_target_addr; grub_size_t headersize; + char addr_buf[GRUB_NET_MAX_STR_ADDR_LEN]; + char gateway_buf[GRUB_NET_MAX_STR_ADDR_LEN]; err = grub_net_resolve_address (server, &addr); if (err) @@ -656,6 +658,11 @@ grub_net_tcp_open (char *server, if (socket == NULL) return NULL; + grub_net_addr_to_str (&addr, addr_buf); + grub_net_addr_to_str (&gateway, gateway_buf); + grub_dprintf("net", "opening connection to %s on inf %s via gateway %s\n", + addr_buf, inf->name, gateway_buf); + socket->out_port = out_port; socket->inf = inf; socket->out_nla = addr; -- 2.5.0