[CRIU] [PATCH 5/7] sockets: Use socket family in show_inetsk
Cyrill Gorcunov
gorcunov at openvz.org
Fri Apr 20 18:56:38 EDT 2012
Needed for IPv6.
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
sockets.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sockets.c b/sockets.c
index 3088324..5a07e67 100644
--- a/sockets.c
+++ b/sockets.c
@@ -984,13 +984,13 @@ void show_inetsk(int fd, struct cr_options *o)
if (ret <= 0)
goto out;
- if (inet_ntop(AF_INET, (void *)ie.src_addr, src_addr,
+ if (inet_ntop(ie.family, (void *)ie.src_addr, src_addr,
INET_ADDR_LEN) == NULL) {
pr_perror("Failed to translate src address");
}
if (ie.state == TCP_ESTABLISHED) {
- if (inet_ntop(AF_INET, (void *)ie.dst_addr, dst_addr,
+ if (inet_ntop(ie.family, (void *)ie.dst_addr, dst_addr,
INET_ADDR_LEN) == NULL) {
pr_perror("Failed to translate dst address");
}
--
1.7.7.6
More information about the CRIU
mailing list