need to call iwconfig key off if no key is provided

Bug #8588 reported by Matt Zimmerman
12
Affects Status Importance Assigned to Milestone
gnome-system-tools (Ubuntu)
Fix Released
Medium
Matt Zimmerman

Bug Description

Based on user feedback, this seems like a fairly major omission from the UI.
All of the necessary primitives seem to be there to allow this to be set in
/etc/network/interfaces. The backend seems to have support for setting the key,
though of course I have no idea if it works.

Is it at all feasible to fix this for Warty?

Revision history for this message
Vincent Untz (vuntz) wrote :

There's support for the wep keys in the g-s-t network backend, but it's not
exposed in the UI:

2004-08-29 Carlos Garnacho Parro <email address hidden>

        * network.pl.in: added support for WEP keys, this isn't reflected
        in the frontends still

Revision history for this message
Vincent Untz (vuntz) wrote :

Created an attachment (id=251)
Proposed dpatch.

This is totally untested. But it might work :-)
Could someone with a wireless card test the patch?

Revision history for this message
Vincent Untz (vuntz) wrote :

I'm not sure, but you'll probably need to s/wep_key/key/ in the patch.

Revision history for this message
Matt Zimmerman (mdz) wrote :

I tested this out, and it seems to mostly DTRT:

auto eth1
iface eth1 inet dhcp
        name Wireless LAN card
        wireless_essid essid_here
        wireless_key 1a 2n 3c 4e 5f

One piece is missing, though. If I configure a WEP key, and then remove it (by
emptying the input box), the wireless_key entry is removed from
/etc/network/interfaces, but the actual network interface seems to retain this
configuration until "iwconfig <interface> key off". Perhaps it should write
"wireless_key off" to the interfaces file when the box is empty? Or is this
last bit perhaps a wireless-tools bug+

Revision history for this message
Vincent Untz (vuntz) wrote :

Matt: I don't know where it should be done.

A possible patch for wireless-tools could be:
--- debian/pre-up.old 2004-10-03 14:01:15.826375004 +0200
+++ debian/pre-up 2004-10-03 14:01:16.960289589 +0200
@@ -52,6 +52,8 @@

 if [ -n "$IF_WIRELESS_KEY" ]; then
   eval $IWCONFIG "$IFACE" key $IF_WIRELESS_KEY
+else
+ eval $IWCONFIG "$IFACE" key off
 fi

 if [ -n "$IF_WIRELESS_KEY1" ]; then

Another solution would be to set the key variable to "off" in g-s-t when it is
not set by the user.

What is the policy for ifupdown? Is it ok to change a parameter when it's not
specified in /etc/network/interfaces?

Revision history for this message
Matt Zimmerman (mdz) wrote :

That seems like a reasonable change to ifupdown. I'll put it all together and
test it out sometime this week.

Revision history for this message
Sebastien Bacher (seb128) wrote :

 gnome-system-tools (1.0.0-0ubuntu5) warty; urgency=low
 .
   * debian/patches/13_wep_key.dpatch:
     - patch by Vincent Untz <email address hidden> to add an entry for the WEP
       keys in the interface (Warty: #1851).

The gst part is fixed, I keep the bug open for the second part, reassigning to matt

Revision history for this message
Matt Zimmerman (mdz) wrote :

wireless-tools (26+27pre22-1ubuntu1) warty; urgency=low

  * Patch from Vincent Untz to clear the key if none is specified

 -- Matt Zimmerman <email address hidden> Tue, 5 Oct 2004 14:16:10 -0700

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.