Project

General

Profile

Bug #6121

Copy-paste bug in mac_init_rings()

Added by Dan McDonald about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
networking
Start date:
2015-08-13
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:

Description

Consider this code snippet...

4035 /*
4036 * Driver must register group->mgi_addmac/remmac() for rx groups
4037 * to support multiple MAC addresses.
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 }
4044 }

The second check should be for mgi_remmac NULL.

History

#1

Updated by Dan McDonald about 5 years ago

Also, errno should be set here as well, prior to going to the "bail" label.

#2

Updated by Electric Monk about 5 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit d05c2e387bac9df4515e8771dbee0ef3f5fe121a

commit  d05c2e387bac9df4515e8771dbee0ef3f5fe121a
Author: Dan McDonald <danmcd@omniti.com>
Date:   2015-08-13T18:04:43.000Z

    6121 Copy-paste bug in mac_init_rings()
    Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: Richard Lowe <richlowe@richlowe.net>
    Reviewed by: Garrett D'Amore <garrett@damore.org>
    Approved by: Garrett D'Amore <garrett@damore.org>

Also available in: Atom PDF