Networking and gentoo scripts [Solved]

Issues Related to Networking (Wired and Wireless)

Moderator: Moderators

Networking and gentoo scripts [Solved]

Postby Darke » Sun Mar 21, 2010 14:12

Hi,
I did a search of the forums but didnt find posts that would answer my questions.

Im having the following problem. I have a computer here that needs a wireless system connection
thats started during boot.I managed to get one working using the gentoo networking scripts.
It lost the connection about ever 15minutes but it always reconnected. (think that might be
related to using ndiswrapper and therefore not being able to change the settings of the wireless
card.)

Anyway my problem now is that during one of the updates something apparently decided to remove
my config files for the wlan0 interface. No problem I thought I probably have it written down somewhere.
I did but looking at it i realized i hadnt used enough details so i couldnt retrace my steps.
Using the gentoo wiki I started from scratch and now have a connection that goes active during boot
BUT now when it looses the connection it does NOT reconnect unless there is traffic going out from that computer
i.e. I set it to ping one of my other machines.

the configuration for the connections are

/etc/conf.d/net
Code: Select all
config_eth0="dhcp"
dhcp_eth0="nosendhost"

modules=( "dhcpcd" )
modules=( "wpa_supplicant" )
wpa_supplicant_wlan0="-Dwext -c /etc/wpa_supplicant/wpa_supplicant.conf"
wpa_timeout_wlan0=60
dhcpcd_wlan0="-t 30"
config_wlan0="dhcp"


/etc/wpa_supplicant.conf
Code: Select all
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=1


network={
        ssid="myssid"
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP TKIP
        group=CCMP TKIP
        psk=mypskkey
}


wanted to do
Code: Select all
ls -s net.lo net.wlan0

but /etc/init.d/ already contains actual files called that

added the connection to rc with

Code: Select all
rc-update add net.wlan0 default


manually doing
Code: Select all
/etc/init.d/net.wlan0 start

results in this output.
Code: Select all
* Caching service dependencies...                                         [ ok ]
* Bringing up interface wlan0
*   Starting ifplugd on wlan0...                                           [ ok ]
*     Backgrounding ...
* WARNING: net.wlan0 has started, but is inactive


Again the problem isnt that the connection isnt working its that it will not reconnect automatically UNLESS the machine is producing outgoing traffic.
Hoping someone here might have an idea to what im missing (must have done it the first time around)

The solution
Edited the post since I didn't want to double post
Marking the problem as solved.

Switching back to wpa 0.6.10 solved the issue of wpa_supplicant not reconnecting.

This is what I found with wpa_supplicant 0.7.0 and 0.7.1

When wpa_supplicant disconnects from the AP it apparently runs into
some problem while scanning or after below is the output while running wpa_supplicant.

Code: Select all
RTM_NEWLINK: operstate=1 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
RTM_NEWLINK: operstate=1 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:00:00:00:00:00
Setting scan request: 0 sec 100000 usec
Added BSSID 00:24:01:9d:a5:e1 into blacklist
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
State: COMPLETED -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 1->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
EAPOL: SUPP_BE entering state INITIALIZE
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
State: DISCONNECTED -> SCANNING
Starting AP scan for wildcard SSID
Scan requested (ret=0) - scan timeout 5 seconds
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING           
RTM_NEWLINK: operstate=0 ifi_flags=0x1002 ()
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
l2_packet_receive - recvfrom: Network is down
RTM_NEWLINK: operstate=0 ifi_flags=0x1002 ()
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
RX ctrl_iface - hexdump_ascii(len=9):
     54 45 52 4d 49 4e 41 54 45                        TERMINATE       
Removing interface wlan0
No keys have been configured - skip key clearing
State: SCANNING -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
wpa_driver_wext_set_countermeasures
No keys have been configured - skip key clearing
CTRL_IFACE wait for attached monitors to receive messages
*** glibc detected *** wpa_supplicant: double free or corruption (fasttop): 0x083b2d38 ***
======= Backtrace: =========
/lib/libc.so.6[0xb73c9db1]
/lib/libc.so.6[0xb73cb4da]
/lib/libc.so.6(cfree+0x6d)[0xb73ce53d]
wpa_supplicant[0x8059e22]
wpa_supplicant[0x8081744]
wpa_supplicant[0x808182f]
wpa_supplicant[0x8081884]
wpa_supplicant[0x80879a6]
/lib/libc.so.6(__libc_start_main+0xe6)[0xb7374a66]
wpa_supplicant[0x804d701]
======= Memory map: ========
08048000-080b8000 r-xp 00000000 08:01 31490930   /usr/sbin/wpa_supplicant
080b8000-080b9000 r--p 00070000 08:01 31490930   /usr/sbin/wpa_supplicant
080b9000-080ba000 rw-p 00071000 08:01 31490930   /usr/sbin/wpa_supplicant
083b2000-083d3000 rw-p 00000000 00:00 0          [heap]
b7000000-b7021000 rw-p 00000000 00:00 0
b7021000-b7100000 ---p 00000000 00:00 0
b71d4000-b71f1000 r-xp 00000000 08:01 33199679   /usr/lib/gcc/i686-pc-linux-gnu/4.4.2/libgcc_s.so.1
b71f1000-b71f2000 r--p 0001c000 08:01 33199679   /usr/lib/gcc/i686-pc-linux-gnu/4.4.2/libgcc_s.so.1
b71f2000-b71f3000 rw-p 0001d000 08:01 33199679   /usr/lib/gcc/i686-pc-linux-gnu/4.4.2/libgcc_s.so.1
b71f3000-b71fd000 r-xp 00000000 08:01 2031732    /lib/libnss_files-2.10.1.so
b71fd000-b71fe000 r--p 00009000 08:01 2031732    /lib/libnss_files-2.10.1.so
b71fe000-b71ff000 rw-p 0000a000 08:01 2031732    /lib/libnss_files-2.10.1.so
b722d000-b722f000 rw-p 00000000 00:00 0
b722f000-b7240000 r-xp 00000000 08:01 2031766    /lib/libresolv-2.10.1.so
b7240000-b7241000 r--p 00010000 08:01 2031766    /lib/libresolv-2.10.1.so
b7241000-b7242000 rw-p 00011000 08:01 2031766    /lib/libresolv-2.10.1.so
b7242000-b7244000 rw-p 00000000 00:00 0
b7244000-b7246000 r-xp 00000000 08:01 2031711    /lib/libkeyutils-1.2.so
b7246000-b7247000 r--p 00001000 08:01 2031711    /lib/libkeyutils-1.2.so
b7247000-b7248000 rw-p 00002000 08:01 2031711    /lib/libkeyutils-1.2.so
b7248000-b724e000 r-xp 00000000 08:01 51779501   /usr/lib/libkrb5support.so.0.1
b724e000-b724f000 r--p 00005000 08:01 51779501   /usr/lib/libkrb5support.so.0.1
b724f000-b7250000 rw-p 00006000 08:01 51779501   /usr/lib/libkrb5support.so.0.1
b7250000-b7252000 r-xp 00000000 08:01 2031671    /lib/libcom_err.so.2.1
b7252000-b7253000 r--p 00001000 08:01 2031671    /lib/libcom_err.so.2.1
b7253000-b7254000 rw-p 00002000 08:01 2031671    /lib/libcom_err.so.2.1
b7254000-b7255000 rw-p 00000000 00:00 0
b7255000-b7266000 r-xp 00000000 08:01 32377718   /lib/libz.so.1.2.3
b7266000-b7267000 r--p 00010000 08:01 32377718   /lib/libz.so.1.2.3
b7267000-b7268000 rw-p 00011000 08:01 32377718   /lib/libz.so.1.2.3
b7268000-b728e000 r-xp 00000000 08:01 51779139   /usr/lib/libk5crypto.so.3.1
b728e000-b728f000 ---p 00026000 08:01 51779139   /usr/lib/libk5crypto.so.3.1
b728f000-b7290000 r--p 00026000 08:01 51779139   /usr/lib/libk5crypto.so.3.1
b7290000-b7291000 rw-p 00027000 08:01 51779139   /usr/lib/libk5crypto.so.3.1
b7291000-b7331000 r-xp 00000000 08:01 51779498   /usr/lib/libkrb5.so.3.3
b7331000-b7336000 r--p 0009f000 08:01 51779498   /usr/lib/libkrb5.so.3.3
b7336000-b7337000 rw-p 000a4000 08:01 51779498   /usr/lib/libkrb5.so.3.3
b7337000-b7338000 rw-p 00000000 00:00 0
b7338000-b735c000 r-xp 00000000 08:01 2031717    /lib/libm-2.10.1.so
b735c000-b735d000 r--p 00023000 08:01 2031717    /lib/libm-2.10.1.so
b735d000-b735e000 rw-p 00024000 08:01 2031717    /lib/libm-2.10.1.so
b735e000-b749e000 r-xp 00000000 08:01 2031663    /lib/libc-2.10.1.so
b749e000-b749f000 ---p 00140000 08:01 2031663    /lib/libc-2.10.1.so
b749f000-b74a1000 r--p 00140000 08:01 2031663    /lib/libc-2.10.1.so
b74a1000-b74a2000 rw-p 00142000 08:01 2031663    /lib/libc-2.10.1.so
b74a2000-b74a5000 rw-p 00000000 00:00 0
b74a5000-b74ac000 r-xp 00000000 08:01 2031768    /lib/librt-2.10.1.so
b74ac000-b74ad000 r--p 00006000 08:01 2031768    /lib/librt-2.10.1.so
b74ad000-b74ae000 rw-p 00007000 08:01 2031768    /lib/librt-2.10.1.so
b74ae000-b74af000 rw-p 00000000 00:00 0
b74af000-b74c4000 r-xp 00000000 08:01 2031757    /lib/libpthread-2.10.1.so
b74c4000-b74c5000 r--p 00014000 08:01 2031757    /lib/libpthread-2.10.1.so
b74c5000-b74c6000 rw-p 00015000 08:01 2031757    /lib/libpthread-2.10.1.so
b74c6000-b74c8000 rw-p 00000000 00:00 0
b74c8000-b7502000 r-xp 00000000 08:01 33686955   /usr/lib/libdbus-1.so.3.5.0
b7502000-b7503000 r--p 00039000 08:01 33686955   /usr/lib/libdbus-1.so.3.5.0
b7503000-b7504000 rw-p 0003a000 08:01 33686955   /usr/lib/libdbus-1.so.3.5.0
b7504000-b7506000 r-xp 00000000 08:01 2031687    /lib/libdl-2.10.1.so
b7506000-b7507000 r--p 00001000 08:01 2031687    /lib/libdl-2.10.1.so
b7507000-b7508000 rw-p 00002000 08:01 2031687    /lib/libdl-2.10.1.so
b7508000-b763a000 r-xp 00000000 08:01 31523141   /usr/lib/libcrypto.so.0.9.8
b763a000-b7642000 r--p 00131000 08:01 31523141   /usr/lib/libcrypto.so.0.9.8
b7642000-b7651000 rw-p 00139000 08:01 31523141   /usr/lib/libcrypto.so.0.9.8
b7651000-b7654000 rw-p 00000000 00:00 0
b7654000-b769e000 r-xp 00000000 08:01 31523144   /usr/lib/libssl.so.0.9.8
b769e000-b769f000 r--p 00049000 08:01 31523144   /usr/lib/libssl.so.0.9.8
b769f000-b76a2000 rw-p 0004a000 08:01 31523144   /usr/lib/libssl.so.0.9.8
b76a2000-b76f0000 r-xp 00000000 08:01 51779886   /usr/lib/libnl.so.1.1
b76f0000-b76f1000 r--p 0004d000 08:01 51779886   /usr/lib/libnl.so.1.1
b76f1000-b76f4000 rw-p 0004e000 08:01 51779886   /usr/lib/libnl.so.1.1
b76f4000-b76f5000 rw-p 00000000 00:00 0
b76f8000-b7701000 r-xp 00000000 08:01 2031736    /lib/libnss_nis-2.10.1.so
b7701000-b7702000 r--p 00008000 08:01 2031736    /lib/libnss_nis-2.10.1.so
b7702000-b7703000 rw-p 00009000 08:01 2031736    /lib/libnss_nis-2.10.1.so
b7703000-b7716000 r-xp 00000000 08:01 2031726    /lib/libnsl-2.10.1.so
b7716000-b7717000 r--p 00012000 08:01 2031726    /lib/libnsl-2.10.1.so
b7717000-b7718000 rw-p 00013000 08:01 2031726    /lib/libnsl-2.10.1.so
b7718000-b771a000 rw-p 00000000 00:00 0
b771a000-b7720000 r-xp 00000000 08:01 2031728    /lib/libnss_compat-2.10.1.so
b7720000-b7721000 r--p 00006000 08:01 2031728    /lib/libnss_compat-2.10.1.so
b7721000-b7722000 rw-p 00007000 08:01 2031728    /lib/libnss_compat-2.10.1.so
b7722000-b7723000 rw-p 00000000 00:00 0
b7723000-b773f000 r-xp 00000000 08:01 2031634    /lib/ld-2.10.1.so
b773f000-b7740000 r--p 0001b000 08:01 2031634    /lib/ld-2.10.1.so
b7740000-b7741000 rw-p 0001c000 08:01 2031634    /lib/ld-2.10.1.so
bfdb4000-bfdc9000 rw-p 00000000 00:00 0          [stack]
ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
Aborted
reign10 / #


Don't know if the author is aware of this?

The problem doesnt seem to come up in network manager or wicd but I guess they probably
dont let wpa_supplicant roam or do the scanning for them?

Anyone here know how I prevent wpa_supplicant from roaming or just connecting to my AP
without doing any scanning?
Darke
Baby Hen
 
Posts: 8
Joined: Wed Oct 15, 2008 17:21

Return to Networking and Wireless

Who is online

Users browsing this forum: No registered users and 1 guest