Segmentation Fault (Hostapd-0.5.7)

Nazeer Khan Nazeer.Khan at nicta.com.au
Sun May 6 04:25:52 EDT 2007


I am getting segmentation fault at the line which i have commented out in
the function. => cb(iface, status);

-------------------------------

/**
 * setup_interface_finalize - Finish setup interface & call the callback
 * @iface: Pointer to interface data.
 * @status: Status of the setup interface (0 on success; -1 on failure).
 * Returns: 0 on success; -1 on failure (e.g., was not in progress).
 */
static int setup_interface_finalize(struct hostapd_iface *iface, int status)
{
	hostapd_iface_cb cb;

	if (!iface->setup_cb)
		return -1;

	eloop_cancel_timeout(setup_interface_start, iface, NULL);
	eloop_cancel_timeout(setup_interface2_handler, iface, NULL);
	hostapd_select_hw_mode_stop(iface);

	cb = iface->setup_cb;

	iface->setup_cb = NULL;

//	cb(iface, status);

	return 0;
}

--------------------------------------------

If i don't comment it out, i am getting segmentation fault here. I have
checked the value of iface and status, both are valid and iface is not
NULL.

If i comment out, everything works fine for me.

I am using hostapd-0.5.7 with madwifi-ng for EAP-TLS and EAP-PSK. If i
comment out, both the schemes work fine. If i don't, i cannot setup the
interface.

I was woundering what cb() is doing here ???

Thank you,

Nazeer




More information about the HostAP mailing list