http://defect.opensolaris.org/bz/show_bug.cgi?id=11948


Anurag S. Maskey <Anurag.Maskey at Sun.COM> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ACCEPTED                    |CAUSEKNOWN


--- Comment #3 from Anurag S. Maskey <Anurag.Maskey at Sun.COM> 2009-10-14 
15:15:26 UTC ---
conditions.c:check_wlan() is called with either a ESSIB or BSSID set to NULL
depending on what is in the condition.  If a BSSID was specified in the
condition, the strcmp() was comparing ESSID.  See snippet below:

static int
check_wlan(const char *linkname, void *arg)
{
[ ... ]
    if (wa->exp_bssid != NULL) {
        /* Is the NIC associated with the expected access point? */
        (void) dladm_wlan_bssid2str(&attr.la_wlan_attr.wa_bssid,
            cur_bssid);
        switch (wa->condition) {
        case NWAM_CONDITION_IS:
            wa->res = strcmp(cur_essid, wa->exp_essid) == 0;
            if (wa->res)
                return (DLADM_WALK_TERMINATE);
            break;
        case NWAM_CONDITION_IS_NOT:
            wa->res = strcmp(cur_essid, wa->exp_essid) != 0;
            if (!wa->res)
                return (DLADM_WALK_TERMINATE);
            break;
        default:
            return (DLADM_WALK_TERMINATE);
        }
        return (DLADM_WALK_CONTINUE);
    }
[ ... ]
}

The fix is to compare cur_bssid and wa->exp_bssid.

-- 
Configure bugmail: http://defect.opensolaris.org/bz/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Reply via email to