# hostapd segfault

## GNUtoo

hello,

i'm migrating my router/access point/server from FreeBSD to Gentoo in order to have asterisk....

but i have to manualy start hostapd like this:

 /etc/init.d/hostapd start

otherwise at boot it segfault...i know it because there is this line in /var/log/messages:

Jul 29 18:45:52 router [   59.285002] hostapd[6940]: segfault at 0 ip 0804dced sp bf87df20 error 4 in hostapd[8048000+6c000]

what could be the reason...

Here's my config:

*kernel 2.6.26 vanilla

*patch for allowing the master mode in the 2.6.26 kernel(allow-ap-vlan-modes)

*ralink rt2500 pci with a special antenna

*hostapd from git

*this config:

```
interface=wlan0

driver=nl80211

logger_syslog=-1

logger_syslog_level=2

logger_stdout=-1

logger_stdout_level=2

dump_file=/tmp/hostapd.dump

ctrl_interface=/var/run/hostapd

ctrl_interface_group=0

ssid=my_essid_contains_underscores

country_code=IT

hw_mode=g

channel=11

beacon_int=100

dtim_period=2

max_num_sta=255

rts_threshold=2347

fragm_threshold=2346

supported_rates=10 20 55 110 60 90 120 180 240 360 480 540

macaddr_acl=0

auth_algs=3

ignore_broadcast_ssid=0

wme_enabled=1

wme_ac_bk_cwmin=4

wme_ac_bk_cwmax=10

wme_ac_bk_aifs=7

wme_ac_bk_txop_limit=0

wme_ac_bk_acm=0

wme_ac_be_aifs=3

wme_ac_be_cwmin=4

wme_ac_be_cwmax=10

wme_ac_be_txop_limit=0

wme_ac_be_acm=0

wme_ac_vi_aifs=2

wme_ac_vi_cwmin=3

wme_ac_vi_cwmax=4

wme_ac_vi_txop_limit=94

wme_ac_vi_acm=0

wme_ac_vo_aifs=2

wme_ac_vo_cwmin=2

wme_ac_vo_cwmax=3

wme_ac_vo_txop_limit=47

wme_ac_vo_acm=0

eapol_key_index_workaround=0

eap_server=0
```

here's /etc/conf.d/net:

```
config_eth1=( null )

config_ppp0=( "ppp" )

link_ppp0="eth1"

plugins_ppp0=( "pppoe" )

username_ppp0='user'

password_ppp0='password'

pppd_ppp0=(

       "noauth"

       "defaultroute"

       "usepeerdns"

       "holdoff 3"

       "child-timeout 60"

       "lcp-echo-interval 15"

       "lcp-echo-failure 3"

       noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp

)

depend_ppp0() {

    need net.eth1

}

modules_wlan0=( "!iwconfig" "!wpa_supplicant" )

config_eth0=( "192.168.0.1/24" )

config_wlan0=( "192.168.1.1/24" )
```

and here's /etc/conf.d/hostapd

```
INTERFACES="wlan0"

CONFIGS="/etc/hostapd/hostapd.conf"

OPTIONS=""
```

----------

## alex.blackbit

could it be that for some reason during boot hostapd is started before your wlan card?

----------

## humanthing

Oh... I posted in an other thread before reading this one...

Does the rt2500 support master mode now?

I'm not so experienced, but trying to set up a kind of WLAN-Router.

Any help is appreciated!

----------

