diff options
author | Tomas Paukrt | 2019-10-08 11:51:48 +0200 |
---|---|---|
committer | Denys Vlasenko | 2019-10-08 13:52:12 +0200 |
commit | 4527273f1c5bca044577f2f8ed2d7e4f203bf485 (patch) | |
tree | 0d2a7784cbaab27001b1f448689b639bddc83a76 /networking | |
parent | 427c12cc5199813328bf7fdf0bc4fc3a7672bf0f (diff) | |
download | busybox-4527273f1c5bca044577f2f8ed2d7e4f203bf485.zip busybox-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>
Diffstat (limited to 'networking')
-rw-r--r-- | networking/route.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/networking/route.c b/networking/route.c index a5d8d7c..e785b1d 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; |