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>
This commit is contained in:
parent
427c12cc51
commit
4527273f1c
@ -628,6 +628,7 @@ static void INET6_displayroutes(void)
|
|||||||
|
|
||||||
r = 0;
|
r = 0;
|
||||||
while (1) {
|
while (1) {
|
||||||
|
memset(&snaddr6, 0, sizeof(snaddr6));
|
||||||
inet_pton(AF_INET6, addr6x + r,
|
inet_pton(AF_INET6, addr6x + r,
|
||||||
(struct sockaddr *) &snaddr6.sin6_addr);
|
(struct sockaddr *) &snaddr6.sin6_addr);
|
||||||
snaddr6.sin6_family = AF_INET6;
|
snaddr6.sin6_family = AF_INET6;
|
||||||
|
Loading…
Reference in New Issue
Block a user