aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Paukrt <tomaspaukrt@email.cz>2019-10-08 11:51:48 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2019-10-08 13:52:12 +0200
commit4527273f1c5bca044577f2f8ed2d7e4f203bf485 (patch)
tree0d2a7784cbaab27001b1f448689b639bddc83a76
parent427c12cc5199813328bf7fdf0bc4fc3a7672bf0f (diff)
downloadbusybox-4527273f1c5bca044577f2f8ed2d7e4f203bf485.tar.gz
route: fix output of "route -n -A inet6"
The output of the command "route -n -A inet6" may be corrupted due to partially initialized structure snaddr6 in the function INET6_displayroutes. Signed-off-by: Tomas Paukrt <tomaspaukrt@email.cz> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--networking/route.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/networking/route.c b/networking/route.c
index a5d8d7cb9..e785b1da6 100644
--- a/networking/route.c
+++ b/networking/route.c
@@ -628,6 +628,7 @@ static void INET6_displayroutes(void)
r = 0;
while (1) {
+ memset(&snaddr6, 0, sizeof(snaddr6));
inet_pton(AF_INET6, addr6x + r,
(struct sockaddr *) &snaddr6.sin6_addr);
snaddr6.sin6_family = AF_INET6;