From c7b46b71a0cf8abc554f13abe71874eb6512a39d Mon Sep 17 00:00:00 2001 From: Gao feng Date: Fri, 28 Aug 2015 20:46:33 +0800 Subject: [PATCH] fix incorrectly writting to resolv.conf Signed-off-by: Gao feng --- src/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net.c b/src/net.c index 8a59001..ff1f3c6 100644 --- a/src/net.c +++ b/src/net.c @@ -821,7 +821,7 @@ int hyper_setup_dns(struct hyper_pod *pod) } while (len < size) { - l = write(fd, buf, size); + l = write(fd, buf + len, size - len); if (l < 0) { perror("fail to write resolv.conf"); goto out;