[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/3] tcp: add a dprintf for opening tcp connections
From: |
Josef Bacik |
Subject: |
[PATCH 2/3] tcp: add a dprintf for opening tcp connections |
Date: |
Fri, 11 Mar 2016 11:28:34 -0500 |
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 <address@hidden>
---
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
- [PATCH 1/3] push/pop errno in initrd read file path, Josef Bacik, 2016/03/11
- [PATCH 2/3] tcp: add a dprintf for opening tcp connections,
Josef Bacik <=
- [PATCH 3/3] pxenet: process transmit interrupts when out of resources, Josef Bacik, 2016/03/11
- Re: [PATCH 1/3] push/pop errno in initrd read file path, Vladimir 'phcoder' Serbinenko, 2016/03/11
- Re: [PATCH 1/3] push/pop errno in initrd read file path, Josef Bacik, 2016/03/11
- Re: [PATCH 1/3] push/pop errno in initrd read file path, Vladimir 'phcoder' Serbinenko, 2016/03/11
- Re: [PATCH 1/3] push/pop errno in initrd read file path, Josef Bacik, 2016/03/11
- Re: [PATCH 1/3] push/pop errno in initrd read file path, Vladimir 'phcoder' Serbinenko, 2016/03/11
- Re: [PATCH 1/3] push/pop errno in initrd read file path, Andrei Borzenkov, 2016/03/12
- Re: [PATCH 1/3] push/pop errno in initrd read file path, Vladimir 'phcoder' Serbinenko, 2016/03/15