diff --git a/mud b/mud index bb6b87b..b53248b 160000 --- a/mud +++ b/mud @@ -1 +1 @@ -Subproject commit bb6b87bb54689987ab6b473e6563bd8509f0f3ea +Subproject commit b53248b6dacbc719649e88893dbd4978d6f7e494 diff --git a/src/path.c b/src/path.c index 997aa83..eed3120 100644 --- a/src/path.c +++ b/src/path.c @@ -28,10 +28,13 @@ gt_path_status(int fd) return 0; char bindstr[INET6_ADDRSTRLEN] = {0}; + char publstr[INET6_ADDRSTRLEN] = {0}; char peerstr[INET6_ADDRSTRLEN] = {0}; if (gt_toaddr(bindstr, sizeof(bindstr), (struct sockaddr *)&res.path_status.local_addr) || + gt_toaddr(publstr, sizeof(publstr), + (struct sockaddr *)&res.path_status.r_addr) || gt_toaddr(peerstr, sizeof(peerstr), (struct sockaddr *)&res.path_status.addr)) return -2; @@ -46,12 +49,14 @@ gt_path_status(int fd) } printf("path %s\n" - " bind: %s\n" - " peer: %s port %"PRIu16"\n" - " mtu: %zu bytes\n" - " rtt: %.3f ms\n", - statestr, bindstr, peerstr, - gt_get_port((struct sockaddr *)&res.path_status.addr), + " bind: %s\n" + " public: %s port %"PRIu16"\n" + " peer: %s port %"PRIu16"\n" + " mtu: %zu bytes\n" + " rtt: %.3f ms\n", + statestr, bindstr, + publstr, gt_get_port((struct sockaddr *)&res.path_status.r_addr), + peerstr, gt_get_port((struct sockaddr *)&res.path_status.addr), res.path_status.mtu.ok + 28U, /* ip+udp hdr */ res.path_status.rtt/(double)1e3);