Bug 104117

Summary: rcnetwork does not set ESSID for wireless configs from /etc/sysconfig/network/ifcfg-*
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Matthias Hopf <mhopf>
Component: Mobile DevicesAssignee: Joachim Gleissner <joachim.gleissner>
Status: VERIFIED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P3 - Medium CC: forgotten_--EoyBps8f, forgotten_6CfSUJ5Yw_, jrobiso2, mvidner, suse-beta
Version: Beta 1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: /var/log/messages
ifcfg for wireless

Description Matthias Hopf 2005-08-11 13:57:18 UTC
If you configure your wireless network in yast for a secific ESSID (e.g. our
hidden 'onenet'), and fire up your connection with ifup (i.e. configured for
manual startup), the ESSID isn't set.

Currently, the only working solution is to do it manually with iwconfig.

kinternet does not have any means for entering a hidden ESSID either.
Comment 1 Joachim Gleissner 2005-08-11 14:50:25 UTC
Non-WPA modes are broken on Beta1. You can install a new sysconfig package  
(currently /work/CDs/all/full-i386/suse/i586/sysconfig.rpm) or set  
PREFER_WPA_SUPPLICANT='no' in your ifcfg-file. Please reopen if it doesn't 
help. 
Comment 2 Matthias Hopf 2005-08-11 15:07:12 UTC
I updated sysconfig.rpm, stopped network, unloaded ipw2200, reloaded, started
network again, ifup eth1 -> it attached itself to some other ESSID than
configured in the ifcfg-file, just before giving it up again (off/any).

Now I tried this after a clean reboot, same behavior.
Comment 3 Joachim Gleissner 2005-08-11 15:09:45 UTC
Please attach /var/log/messages. 
Comment 4 Lenz Grimmer 2005-08-11 15:35:56 UTC
Im am seeing a similar behaviour here - the wireless settings do not seem to be
applied correctly. Running "ifup eth0", I see:

[SNIP]
    eth0      device: Intel Corporation PRO/Wireless 2200BG (rev 05)
    eth0      configuration: wlan-id-00:0e:35:45:2f:49
    eth0      starting wpa_supplicant
Line 6: unknown network field 'wep_tx_keyid'.
Line 8: failed to parse network block.
Failed to read configuration file '/var/run/wpa_supplicant-eth0.conf'.
Starting DHCP Client Daemon on eth0... . . . . . no IP address yet... backgrounding.
[SNIP]

/var/log/messages did not reveal anything useful. Is it possible to enable
debugging? I will try setting PREFER_WPA_SUPPLICANT='no' now.
Comment 5 Matthias Hopf 2005-08-11 15:37:01 UTC
Created attachment 45785 [details]
/var/log/messages

After reboot:

ifup eth1  (says device:... config:... starting wpa_supplicant	Starting DHCP
Client...)
Comment 6 Matthias Hopf 2005-08-11 15:37:32 UTC
Created attachment 45788 [details]
ifcfg for wireless
Comment 7 Joachim Gleissner 2005-08-11 15:46:08 UTC
Comment 4: PREFER_WPA_SUPPLICANT='no' should fix the error.   
   
There is currently a problem with the combination ipw2200, wpa_supplicant, and   
DHCP (at least with some DHCP servers). Please also try   
PREFER_WPA_SUPPLICANT='no' (which will be most probably default in the final 
10.0, btw). 
Comment 8 Matthias Hopf 2005-08-11 15:58:19 UTC
This works as expected. Thanks!

If regular wireless using kinternet works as well (can't test that here), I
agree this should be the default.
Comment 9 Joachim Gleissner 2005-08-12 15:34:02 UTC
*** Bug 104428 has been marked as a duplicate of this bug. ***
Comment 10 Joachim Gleissner 2005-08-12 15:38:40 UTC
kinternet has no support for hidden essid. 
The current ifup-wireless tries to use wpa_supplicant whenever possible so we 
have the chance to detect failures which we would miss otherwise. I plan 
change the default in a later beta.  
Comment 11 Martin Vidner 2005-08-16 08:16:14 UTC
*** Bug 104826 has been marked as a duplicate of this bug. ***
Comment 12 Matthias Hopf 2005-08-17 14:59:28 UTC
Seems to work with beta2 now, thanks!
Comment 13 Joachim Gleissner 2005-08-17 15:06:08 UTC
Ok, thanks for the report. 
Comment 14 Joachim Gleissner 2005-08-17 15:33:38 UTC
*** Bug 105211 has been marked as a duplicate of this bug. ***
Comment 15 Forgotten User --EoyBps8f 2005-09-21 09:45:22 UTC
I still get this bug using RC1! 
  
When I insert the PCMCIA-card, wpa is not loaded, however, if I use rcnetwork  
restart, or ifup eth1, it is.  
  
My question would be: How should Joe Smith know about having to add the 
PREFER_WPA_SUPPLICANT='no'? It was stated above that this line is likely to be 
default in the final release, it is not in RC1, so is it sure that this change 
will make it into the final release? 
 
If it is of any use, here is what I get when using ifup or rcnetwork: 
 
pc192s:/home/rabauke # ifdown eth1 
    eth1      device: Intersil Corporation Intersil ISL3890 [Prism GT/Prism 
Duette] (rev 01) 
    eth1      configuration: wlan-id-00:09:5b:98:2f:70 
pc192s:/home/rabauke # ifup eth1 
    eth1      device: Intersil Corporation Intersil ISL3890 [Prism GT/Prism 
Duette] (rev 01) 
    eth1      configuration: wlan-id-00:09:5b:98:2f:70 
    eth1      starting wpa_supplicant 
wpa_driver_prism54_set_countermeasures - not yet implemented 
Starting DHCP Client Daemon on eth1... . . . . . no IP address yet... 
backgrounding. 
ERROR: Warning: Could not set up default route via interface 
       Command ip route replace to default via 192.168.0.1 returned: 
       . RTNETLINK answers: Network is unreachable 
       Configuration line: default 192.168.0.1 - - 
       This needs NOT to be AN ERROR if you set up multiple interfaces. 
       See man 5 routes how to avoid this warning. 
Comment 16 Forgotten User --EoyBps8f 2006-01-10 11:54:33 UTC
Is this issue fixed in SuSE 10.1?

When I configured my ipw2200 to use WEP with SuSE 10 final and all YOU patches installed, it did not use the key until I added the PREFER_WPA... to the config-file manually. This should not be necessary! Same issue with the prism54 driver.

There are reports about this issue on the mailinlist as well as in the newsgroups. That means that this issue is not resolved and certainly not fixed. Thus it has to be re-opened and maybe marked as a WONTFIX, if this is not considered worth fixing.
Comment 17 Joachim Gleissner 2006-01-18 15:32:05 UTC
Support for prism54 devices in 10.0 is broken, this is right. Adding PREFER_WPA_SUPPLICANT='no' is a work-around, and there is a sysconfig update on its way to fix this for 10.0. The bug is of course also fixed in 10.1.

For ipw2200 it is different, it should also work with wpa_supplicant for any operation mode. What do you mean with "did not use the key"? iwconfig did not show it? Until wpa_supplicant did not choose an access point to associate with it does not set a WEP key. You can't trust iwconfig in that case. 'wpa_cli status verbose' shows you the proper status information.
Comment 18 Forgotten User --EoyBps8f 2006-01-18 17:13:06 UTC
I do not have the notebook at hand right now, yet I'll try to explain it as detailed as possible.

For the ipw2200:
I set the WLAN up without the PREFER_WPA_SUPPLICANT="no".
ifup eth0 results in iwconfig showing no WEP key. It does not help to wait. Kwifimanager is showing a connection, i.e. 54 MBit. So it should be connected to the AP. It never gets an IP though, because it does not use the WEP-key.

If I add the PREFER... and ifup eth0, I get an IP instantly and iwconfig shows the WEP-key used instantly too.

Anyway, I'll check 'wpa_cli status verbose', if Kwifimanager shows a connection even if no AP was selected yet.
Comment 19 Jonathon Robison 2006-01-18 17:21:07 UTC
Silly question for you all, but why the heck would 'wpa_cli status' give me the following error:

Selected interface 'airnet.pid'
Failed to connect to wpa_supplicant - wpa_ctrl_open: Connection refused

I happen to be connected via ipw2100 (interface named airnet) while doing this, so, does anyone have a clue why?  I try with sudo, I try as root, I try as a regular user.  Same answer to all cases.
Comment 20 Forgotten User --EoyBps8f 2006-01-25 11:10:48 UTC
There was a thread on suse_laptop. Another user using ipw2200 encounters the same issues, i.e. WPA_SUPPLICANT not working properly.

Adding PREFER_WPA_SUPPLICANT="no" resolves the issue for him too, so it is doubtable that WPA_SUPPLICANT can handle WEP for ipw2200 on SuSE 10.

http://lists.suse.com/archive/suse-laptop/2006-Jan/0128.html

Apparently bug 141127 is also confirmed, but I'll investigate further.
Comment 21 Forgotten User --EoyBps8f 2006-01-30 15:02:05 UTC
Here we go. The user from the thread I mentioned above, i.e. using ipw2200 with WEP not working until adding PREFER_WPA..="no" gathered the data requested. He said that when he executed PREFER... was commented out, so the WPA-supplicant was in use. The wirelss-connection however did not work.

x21lx-jensb:/etc/sysconfig/network # ifup eth1
    eth1      device: Intel Corporation PRO/Wireless 2200BG (rev 05)
    eth1      configuration: wlan-id-00:0e:35:95:ad:40

DHCP client is already running on eth1
ERROR: Warning: Could not set up default route via interface
       Command ip route replace to default via 192.168.0.1 returned:
       . RTNETLINK answers: Network is unreachable
       Configuration line: default 192.168.0.1 - -
       This needs NOT to be AN ERROR if you set up multiple interfaces.
       See man 5 routes how to avoid this warning.

x21lx-jensb:/home/jens-home # wpa_cli status verbose
Selected interface 'eth1'
bssid=00:11:95:0a:0c:76
ssid=ArcorWLANBZ
pairwise_cipher=WEP-40
group_cipher=WEP-40
key_mgmt=NONE
wpa_state=COMPLETED
Supplicant PAE state=UNKNOWN
suppPortStatus=Authorized
heldPeriod=60
authPeriod=30
startPeriod=30
maxStart=3
portControl=ForceAuthorized
Supplicant Backend state=IDLE
EAP state=FAILURE
reqMethod=0
methodState=NONE
decision=FAIL
ClientTimeout=60
Comment 23 Joachim Gleissner 2006-04-05 09:26:31 UTC
10.1 should fix this. I've tested various non-WPA connection with wpa_supplicant with ipw2100 and ipw2200 without problems, so resolving as fixed. Please reopen in case you still encounter this problem.
Comment 24 Forgotten User --EoyBps8f 2006-09-23 13:41:05 UTC
According to comment #17 prism54 should be setup in 10.1 with PREFER_WPA_SUPPLICANT="no", or to put it differently, it should no longer be necessary to use this workaround because there was a fix.

Yet 10.1 did not fix this! I have all updates installed and still had to add the line before my WEP-connection worked with a prism54-card. Re-opening.
Comment 25 Forgotten User --EoyBps8f 2006-09-23 13:42:38 UTC
Shall I open a seperate bug, since NetworkManager (knetworkmanager) does not work either with that card and I suspect due to the same reason?
Comment 26 Joachim Gleissner 2006-09-25 09:39:57 UTC
Comment 24: This is strange because 10.1 does not use wpa_supplicant for non WPA connections. Could you run 'rcnetwork status' after the network was set up and post the output?

Comment 25: NetworkManager does always use wpa_supplicant, therefore it may break. Feel free to open a bug report for it (something like 'NetworkManager does not work with prism54').
Comment 27 Forgotten User --EoyBps8f 2006-09-25 10:22:37 UTC
I think I found the reason. First I tried with NetworkManager, which failed. So I used the cli-yast to switch from nm to traditional. After that it still did not owrk, so I tried rcnetwork restart with no success, the key was set correctly, yet the card did not associate with the AP. After I removed the PCMCIA-card (I guess that unloads the module) and plugged it in again, it did work.

So me putting the PREFER..=no into the ifcfg... and the card starting to work was just a coincidence as it seems. I am not sure why I have to unload/load the module in order to get the card working after NetworkManager tried to set it up, but I think that would be another bug.

pc192s:/home/rabauke # ps aux | grep NetworkManager
root      7132  0.0  0.5   2812   740 pts/0    S+   12:03   0:00 grep NetworkMan
ager
pc192s:/home/rabauke # rcnetwork restart
Shutting down network interfaces:
    cipsec0   
              No configuration found for cipsec0 
              Nevertheless the interface will be shut down.          done
    eth1      device: Intersil Corporation ISL3890 [Prism GT/Prism Duette]/ISL38
86 [Prism Javelin/Prism Xbow] (rev 01)
    eth1      configuration: wlan-id-00:09:5b:98:2f:70               done
Shutting down service network  .  .  .  .  .  .  .  .  .  .  .  .  . done.
Hint: you may set mandatory devices in /etc/sysconfig/network/config
Setting up network interfaces:
    lo        
    lo        IP address: 127.0.0.1/8                                done
    cipsec0   
              No configuration found for cipsec0                     unused
    eth1      device: Intersil Corporation ISL3890 [Prism GT/Prism Duette]/ISL38
86 [Prism Javelin/Prism Xbow] (rev 01)
    eth1      configuration: wlan-id-00:09:5b:98:2f:70
    eth1      is controlled by ifplugd
SuSEfirewall2: Warning: ip6tables does not support state matching. Extended IPv6
 support disabled.
SuSEfirewall2: Setting up rules from /etc/sysconfig/SuSEfirewall2 ...
SuSEfirewall2: Warning: no interface active
SuSEfirewall2: batch committing...
SuSEfirewall2: Firewall rules successfully set                       done
Setting up service network  .  .  .  .  .  .  .  .  .  .  .  .  .  . done.
SuSEfirewall2: Warning: ip6tables does not support state matching. Extended IPv6
 support disabled.
SuSEfirewall2: Setting up rules from /etc/sysconfig/SuSEfirewall2 ...
SuSEfirewall2: Warning: no interface active
SuSEfirewall2: batch committing...
SuSEfirewall2: Firewall rules successfully set
pc192s:/home/rabauke # iwconfig 
lo        no wireless extensions.

sit0      no wireless extensions.

cipsec0   no wireless extensions.

eth1      IEEE 802.11b/g  Nickname:"pc192s"
          Mode:Managed  Frequency:2.427 GHz  Access Point: Not-Associated   
          Bit Rate:0 kb/s   Tx-Power=31 dBm   Sensitivity=20/200  
          Retry min limit:8   RTS thr:2347 B   Fragment thr:2346 B   
          Encryption key:xxxxxxxxxxxxxxx   Security mode:restri
cted
          Link Quality:26  Signal level:0  Noise level:226
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

pc192s:/home/rabauke # rcnetwork status
Checking optional network interfaces:
    cipsec0   
              No configuration found for cipsec0                     unused
    eth1      device: Intersil Corporation ISL3890 [Prism GT/Prism Duette]/ISL38
86 [Prism Javelin/Prism Xbow] (rev 01)
    eth1      configuration: wlan-id-00:09:5b:98:2f:70
    eth1      is prepared for use with ifplugd
    eth1      is probably associated
    eth1      IP address: 192.168.18.192/22
eth1      IEEE 802.11b/g  Nickname:"pc192s"
          Mode:Managed  Frequency:2.472 GHz  Access Point: Not-Associated   
          Bit Rate:0 kb/s   Tx-Power=31 dBm   Sensitivity=20/200  
          Retry min limit:8   RTS thr:2347 B   Fragment thr:2346 B   
          Encryption key:xxxxxxxxxx   Security mode:restri
cted
          Link Quality:184  Signal level:0  Noise level:70
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
                                                                     running
Checking mandatory network interfaces:
    lo        
              IP address: 127.0.0.1/8                                running
Checking service network .  .  .  .  .  .  .  .  .  .  .  .  .  .  . running