Print this page
4586 dhcpv6 client id malformed
Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>
Reviewed by: Marcel Telka <marcel@telka.sk>

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libdhcpagent/common/dhcp_stable.c
          +++ new/usr/src/lib/libdhcpagent/common/dhcp_stable.c
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
  27      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  28      -
  29   27  /*
  30   28   * This module reads and writes the stable identifier values, DUID and IAID.
  31   29   */
  32   30  
  33   31  #include <stdio.h>
  34   32  #include <stdlib.h>
  35   33  #include <unistd.h>
  36   34  #include <string.h>
  37   35  #include <limits.h>
  38   36  #include <fcntl.h>
↓ open down ↓ 97 lines elided ↑ open up ↑
 136  134          dlpi_handle_t dh = NULL;
 137  135          uint_t arptype;
 138  136          duid_en_t *den;
 139  137  
 140  138          /*
 141  139           * Try to read the MAC layer address for the physical interface
 142  140           * provided as a hint.  If that works, we can use a DUID-LLT.
 143  141           */
 144  142  
 145  143          if (dlpi_open(physintf, &dh, 0) == DLPI_SUCCESS &&
      144 +            dlpi_bind(dh, DLPI_ANY_SAP, NULL) == DLPI_SUCCESS &&
 146  145              dlpi_info(dh, &dlinfo, 0) == DLPI_SUCCESS &&
 147  146              (len = dlinfo.di_physaddrlen) > 0 &&
 148  147              (arptype = dlpi_arptype(dlinfo.di_mactype) != 0)) {
 149  148                  duid_llt_t *dllt;
 150  149                  time_t now;
 151  150  
 152  151                  if ((dllt = malloc(sizeof (*dllt) + len)) == NULL) {
 153  152                          dlpi_close(dh);
 154  153                          return (NULL);
 155  154                  }
↓ open down ↓ 148 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX