Segmentation fault (hostapd)
Jouni Malinen
j
Tue Mar 6 20:09:14 PST 2007
On Tue, Mar 06, 2007 at 06:23:19PM +1100, Nazeer Khan wrote:
> I am sorry, i was using hostapd-0.4.9. And
>
> HOSTAPD_DEBUG(HOSTAPD_DEBUG_VERBOSE,
> "%s: dev_up=%d\n", __func__, dev_up);
>
> is in madwifi_set_iface_flags. I am worried tht where ever it is called, i
> will get a segmentation fault. :(
The only way this could cause a segmentation fault is if the local hapd
variable is not pointing to valid configuration (e.g., is NULL). By the
way, this has been modified to use wpa_printf() in 0.4.10 and I would
recommend updating to it since that would get rid of this crash in
addition to fixing number of other issues. Anyway, you should make sure
drv->hapd is set correctly.
> I modified the code myself. I am sending the config data from one PC1 to
> another PC2 where it fills the structure "hapd->conf". We have OPS for
> madwifi driver. The functions are called on PC1, but the ultimate action
> is taken at PC2. I mean let suppose we generate the keys and in the end
> want to set the keys for the driver. The keys are generated on PC1, and
> the data is sent to PC2 where it calls "set80211_priv" to set the keys etc
> etc. To be very precise it is like running hostapd on PC1 but the point
> where hostapd needs to do IOCTL calls the required data is transfered to
> PC2 in form of buffer and then given as argument to "set80211_priv" or
> "set80211_param" or made an IOCTL calls independently as in case of
> "madwifi_set_iface_flags" and "madwifi_get_we_version" etc etc
OK. I think you do not initialize all pointers correctly on the PC that
shows these segfaults..
> Anyways i got some help from google :) I did'nt understand it. Can someone
> be of little help in this case ???
> * fixed stdarg use in hostapd_logger(): if both stdout and syslog
> logging was enabled, hostapd could trigger a segmentation fault in
> vsyslog on some CPU -- C library combinations
> I tried to disable syslog by setting its value to "0" but was getting
> segmentation fault again.
This is for an unrelated issue.
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list