Print this page
6121 Copy-paste bug in mac_init_rings()

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/mac/mac.c
          +++ new/usr/src/uts/common/io/mac/mac.c
↓ open down ↓ 4028 lines elided ↑ open up ↑
4029 4029                              int, cap_rings->mr_group_type);
4030 4030                          err = EINVAL;
4031 4031                          goto bail;
4032 4032                  }
4033 4033  
4034 4034  
4035 4035                  /*
4036 4036                   * Driver must register group->mgi_addmac/remmac() for rx groups
4037 4037                   * to support multiple MAC addresses.
4038 4038                   */
4039      -                if (rtype == MAC_RING_TYPE_RX) {
4040      -                        if ((group_info.mgi_addmac == NULL) ||
4041      -                            (group_info.mgi_addmac == NULL)) {
4042      -                                goto bail;
4043      -                        }
     4039 +                if (rtype == MAC_RING_TYPE_RX &&
     4040 +                    ((group_info.mgi_addmac == NULL) ||
     4041 +                    (group_info.mgi_remmac == NULL))) {
     4042 +                        err = EINVAL;
     4043 +                        goto bail;
4044 4044                  }
4045 4045  
4046 4046                  /* Cache driver-supplied information */
4047 4047                  group->mrg_info = group_info;
4048 4048  
4049 4049                  /* Update the group's status and group count. */
4050 4050                  mac_set_group_state(group, MAC_GROUP_STATE_REGISTERED);
4051 4051                  group_free++;
4052 4052  
4053 4053                  group->mrg_rings = NULL;
↓ open down ↓ 3948 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX