Print this page
4838 Fix for 4596 has some inverted booleans
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/ip/icmp.c
          +++ new/usr/src/uts/common/inet/ip/icmp.c
↓ open down ↓ 3455 lines elided ↑ open up ↑
3456 3456                          ixa->ixa_flags |= IXAF_SCOPEID_SET;
3457 3457                  } else {
3458 3458                          ixa->ixa_flags &= ~IXAF_SCOPEID_SET;
3459 3459                  }
3460 3460                  v4mapped = IN6_IS_ADDR_V4MAPPED(&v6dst);
3461 3461                  if (v4mapped)
3462 3462                          ixa->ixa_flags |= IXAF_IS_IPV4;
3463 3463                  else
3464 3464                          ixa->ixa_flags &= ~IXAF_IS_IPV4;
3465 3465                  if (srcid != 0 && IN6_IS_ADDR_UNSPECIFIED(&v6src)) {
3466      -                        if (ip_srcid_find_id(srcid, &v6src, IPCL_ZONEID(connp),
     3466 +                        if (!ip_srcid_find_id(srcid, &v6src, IPCL_ZONEID(connp),
3467 3467                              v4mapped, connp->conn_netstack)) {
3468 3468                                  /* Mismatched v4mapped/v6 specified by srcid. */
3469 3469                                  mutex_exit(&connp->conn_lock);
3470 3470                                  error = EADDRNOTAVAIL;
3471 3471                                  goto failed;    /* Does freemsg() and mib. */
3472 3472                          }
3473 3473                  }
3474 3474          } else {
3475 3475                  /* Connected case */
3476 3476                  v6dst = connp->conn_faddr_v6;
↓ open down ↓ 971 lines elided ↑ open up ↑
4448 4448                          ixa->ixa_flags |= IXAF_SCOPEID_SET;
4449 4449                  } else {
4450 4450                          ixa->ixa_flags &= ~IXAF_SCOPEID_SET;
4451 4451                  }
4452 4452                  v4mapped = IN6_IS_ADDR_V4MAPPED(&v6dst);
4453 4453                  if (v4mapped)
4454 4454                          ixa->ixa_flags |= IXAF_IS_IPV4;
4455 4455                  else
4456 4456                          ixa->ixa_flags &= ~IXAF_IS_IPV4;
4457 4457                  if (srcid != 0 && IN6_IS_ADDR_UNSPECIFIED(&v6src)) {
4458      -                        if (ip_srcid_find_id(srcid, &v6src, IPCL_ZONEID(connp),
     4458 +                        if (!ip_srcid_find_id(srcid, &v6src, IPCL_ZONEID(connp),
4459 4459                              v4mapped, connp->conn_netstack)) {
4460 4460                                  /* Mismatched v4mapped/v6 specified by srcid. */
4461 4461                                  mutex_exit(&connp->conn_lock);
4462 4462                                  error = EADDRNOTAVAIL;
4463 4463                                  goto ud_error;
4464 4464                          }
4465 4465                  }
4466 4466          }
4467 4467          /* Handle IP_PKTINFO/IPV6_PKTINFO setting source address. */
4468 4468          if (connp->conn_xmit_ipp.ipp_fields & IPPF_ADDR) {
↓ open down ↓ 1392 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX