Print UDP RTT on its own line.
authorGuus Sliepen <guus@tinc-vpn.org>
Wed, 13 Jun 2018 20:41:02 +0000 (22:41 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Wed, 13 Jun 2018 20:41:02 +0000 (22:41 +0200)
src/info.c

index f0dce8c..562b5ff 100644 (file)
@@ -145,10 +145,6 @@ static int info_node(int fd, const char *item) {
 
        if(status.udp_confirmed) {
                printf(" udp_confirmed");
-
-               if(udp_ping_rtt != -1) {
-                       printf(" (rtt %d.%03d)", udp_ping_rtt / 1000, udp_ping_rtt % 1000);
-               }
        }
 
        printf("\n");
@@ -185,6 +181,10 @@ static int info_node(int fd, const char *item) {
                printf("unknown\n");
        } else if(minmtu > 0) {
                printf("directly with UDP\nPMTU:         %d\n", pmtu);
+
+               if(udp_ping_rtt != -1) {
+                       printf("RTT:          %d.%03d\n", udp_ping_rtt / 1000, udp_ping_rtt % 1000);
+               }
        } else if(!strcmp(nexthop, item)) {
                printf("directly with TCP\n");
        } else {