Skip to content

Commit cf51fcf

Browse files
committed
nvme-print: fix traddr transformation for ave discovery log
inet_ntop wants the network address structure as input not converted string. Fixes: 1571543 ("nvme: add ave-discovery-log command") Signed-off-by: Daniel Wagner <[email protected]>
1 parent da2f1b1 commit cf51fcf

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

nvme-print-json.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5641,7 +5641,7 @@ static void obj_add_traddr(struct json_object *o, const char *k, __u8 adrfam, __
56415641
size = INET6_ADDRSTRLEN;
56425642
}
56435643

5644-
if (inet_ntop(af, libnvmf_adrfam_str(adrfam), dst, size))
5644+
if (inet_ntop(af, traddr, dst, size))
56455645
obj_add_str(o, k, dst);
56465646
}
56475647

nvme-print-stdout.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6651,7 +6651,7 @@ static void print_traddr(char *field, __u8 adrfam, __u8 *traddr)
66516651
size = INET6_ADDRSTRLEN;
66526652
}
66536653

6654-
if (inet_ntop(af, libnvmf_adrfam_str(adrfam), dst, size))
6654+
if (inet_ntop(af, traddr, dst, size))
66556655
printf("%s: %s\n", field, dst);
66566656
}
66576657

0 commit comments

Comments
 (0)