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

           Summary: need an effective WiFi connection self-test
    Classification: Development
           Product: nwam
           Version: unspecified
          Platform: ANY/Generic
        OS/Version: All
            Status: ACCEPTED
 Status Whiteboard: nwam1-build:2009-07-07
          Severity: enhancement
          Priority: P2
         Component: ON daemon
        AssignedTo: nwam-dev at opensolaris.org
        ReportedBy: alan.maguire at sun.com
         QAContact: nwam-dev at opensolaris.org


Secure WiFi connections appear to succeed even if the key is not correct. As a
consequence, no traffic flows, but things appear to be okay. It's not possible
to use the (lack of) DHCP server response as an indicator of (failure of)
connectivity, since the DHCP server may well be down/slow. We had a scheme of
using a libdlpi ether frame sent with matching source/destination ether address
on a loopback test SAP, but it turns out some APs filter out such frames, so
it's not a totally reliable test.

The phase 0.5 GUI counts the ippackets kstat for DHCP requests to determine
connectivity, perhaps something along those lines could be adapted (pasting
code from Darren here):

    if (self->prv->kstat_ctl == NULL) {
        if ((self->prv->kstat_ctl = kstat_open ()) == NULL) {
            g_warning("Cannot open /dev/kstat: %s", strerror (errno));
            return( rx_packets );
        }
    }
    if (kstat_chain_update (self->prv->kstat_ctl) < 0) {
        int e = errno;
        kstat_close (self->prv->kstat_ctl);
        self->prv->kstat_ctl = NULL;
        g_warning("Cannot update kstats: %s", strerror (e));
        return( rx_packets );
    }

    device_name = nwamui_ncu_get_device_name( ncu );

    if ((ksp = kstat_lookup (self->prv->kstat_ctl, NULL, -1, device_name )) ==
NULL) {
        kstat_close (self->prv->kstat_ctl);
        self->prv->kstat_ctl = NULL;
        g_warning("Cannot find information on network interface '%s'",
device_name);
        g_free(device_name);
        return( rx_packets );
    }

    g_free(device_name);

    if (kstat_read (self->prv->kstat_ctl, ksp, NULL) < 0) {
        kstat_close (self->prv->kstat_ctl);
        self->prv->kstat_ctl = NULL;
        g_warning("Cannot read kstat");
        return( rx_packets );
    }

    if ((kn = kstat_data_lookup (ksp, "ipackets")) != NULL) {
        rx_packets = kn->value.ui32;
    }

    return( rx_packets );

-- 
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.
You are the assignee for the bug.

Reply via email to