Print this page
4586 dhcpv6 client id malformed

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libdhcputil/common/dhcp_inittab.c
          +++ new/usr/src/lib/libdhcputil/common/dhcp_inittab.c
↓ open down ↓ 33 lines elided ↑ open up ↑
  34   34  #include <libgen.h>
  35   35  #include <sys/isa_defs.h>
  36   36  #include <sys/socket.h>
  37   37  #include <net/if_arp.h>
  38   38  #include <netinet/in.h>
  39   39  #include <arpa/inet.h>
  40   40  #include <sys/sysmacros.h>
  41   41  #include <libinetutil.h>
  42   42  #include <libdlpi.h>
  43   43  #include <netinet/dhcp6.h>
       44 +#include <sys/ethernet.h>
  44   45  
  45   46  #include "dhcp_symbol.h"
  46   47  #include "dhcp_inittab.h"
  47   48  
  48   49  static void             inittab_msg(const char *, ...);
  49   50  static uchar_t          category_to_code(const char *);
  50   51  static boolean_t        encode_number(uint8_t, uint8_t, boolean_t, uint8_t,
  51   52                              const char *, uint8_t *, int *);
  52   53  static boolean_t        decode_number(uint8_t, uint8_t, boolean_t, uint8_t,
  53   54                              const uint8_t *, char *, int *);
↓ open down ↓ 446 lines elided ↑ open up ↑
 500  501                                  } else {
 501  502                                          goto failed;
 502  503                                  }
 503  504                                  if (++dig == 2) {
 504  505                                          *outbuf++ = val;
 505  506                                          maclen++;
 506  507                                          dig = val = 0;
 507  508                                  }
 508  509                          }
 509  510                  } else {
 510      -                        if (dlpi_info(dh, &dlinfo, 0) != DLPI_SUCCESS) {
      511 +                        if (dlpi_bind(dh, ETHERTYPE_IPV6, NULL) !=
      512 +                            DLPI_SUCCESS || dlpi_info(dh, &dlinfo, 0) !=
      513 +                            DLPI_SUCCESS) {
 511  514                                  dlpi_close(dh);
 512  515                                  goto failed;
 513  516                          }
 514  517                          maclen = dlinfo.di_physaddrlen;
 515  518                          (void) memcpy(outbuf, dlinfo.di_physaddr, maclen);
 516  519                          dlpi_close(dh);
 517  520                          if (hwtype == -1)
 518  521                                  hwtype = dlpi_arptype(dlinfo.di_mactype);
 519  522                  }
 520  523          }
↓ open down ↓ 1280 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX