Print this page
10085 sctp_getpeeraddrs() doesn't need to check for a NULL primary

@@ -21,10 +21,14 @@
 
 /*
  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 
+/*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
+
 #include <sys/types.h>
 #include <sys/stream.h>
 #define _SUN_TPI_VERSION 2
 #include <sys/tihdr.h>
 #include <sys/socket.h>

@@ -1491,11 +1495,10 @@
                         sin6->sin6_addr = addr;
                         sin6->sin6_port = connp->conn_fport;
                         sin6->sin6_family = AF_INET6;
                         sin6->sin6_flowinfo = connp->conn_flowinfo;
                         if (IN6_IS_ADDR_LINKSCOPE(&addr) &&
-                            sctp->sctp_primary != NULL &&
                             (sctp->sctp_primary->sf_ixa->ixa_flags &
                             IXAF_SCOPEID_SET)) {
                                 sin6->sin6_scope_id =
                                     sctp->sctp_primary->sf_ixa->ixa_scopeid;
                         } else {