Project

General

Profile

Actions

Bug #7137

open

in.ndpd should correctly initialise with IN6ADDR_LOOPBACK_INIT

Added by Richard PALO over 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2016-06-24
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

as found via 7127, in.ndpd main incorrectly initialises the sockaddr_in6 instead of its
component member sin6_addr.

This can be fixed via the following patch:

--- a/usr/src/cmd/cmd-inet/usr.lib/in.ndpd/main.c
+++ b/usr/src/cmd/cmd-inet/usr.lib/in.ndpd/main.c
@@ -1942,7 +1942,7 @@ loopback_ra_enqueue(struct phyint *pi, struct nd_router_advert *ra, int len)
 static void
 loopback_ra_dequeue(void)
 {
-       struct sockaddr_in6 from = IN6ADDR_LOOPBACK_INIT;
+       struct sockaddr_in6 from = { 0, 0, 0, IN6ADDR_LOOPBACK_INIT };
        struct raq *raq;

        if (debug & D_PKTIN)

NB: Makefile explicitly builds c89

No data to display

Actions

Also available in: Atom PDF