Print this page
4586 dhcpv6 client id malformed

@@ -39,10 +39,11 @@
 #include <arpa/inet.h>
 #include <sys/sysmacros.h>
 #include <libinetutil.h>
 #include <libdlpi.h>
 #include <netinet/dhcp6.h>
+#include <sys/ethernet.h>
 
 #include "dhcp_symbol.h"
 #include "dhcp_inittab.h"
 
 static void             inittab_msg(const char *, ...);

@@ -505,11 +506,13 @@
                                         maclen++;
                                         dig = val = 0;
                                 }
                         }
                 } else {
-                        if (dlpi_info(dh, &dlinfo, 0) != DLPI_SUCCESS) {
+                        if (dlpi_bind(dh, ETHERTYPE_IPV6, NULL) !=
+                            DLPI_SUCCESS || dlpi_info(dh, &dlinfo, 0) !=
+                            DLPI_SUCCESS) {
                                 dlpi_close(dh);
                                 goto failed;
                         }
                         maclen = dlinfo.di_physaddrlen;
                         (void) memcpy(outbuf, dlinfo.di_physaddr, maclen);