Bug 169199

Summary: [ath] Cannot set up static ip addresses for wireless with wpa encryption
Product: Base System Reporter: donaldcallen
Component: wirelessAssignee: freebsd-sysinstall (Nobody) <sysinstall>
Status: Open ---    
Severity: Affects Some People CC: allanjude, avos, cy
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Possible fix none

Description donaldcallen 2012-06-18 15:00:22 UTC
During installation of 9.0 on a Thinkpad G41 with an Atheros-based pcmcia
wireless card, I ran into trouble trying to set up wireless networking. I
have multiple machines behind a NAT router and I want static IP addresses
that I can stick in /etc/hosts so, for example, I can ssh from one to the
other, rsync my home directory, etc. The installer found my base station
just fine, accepted the wpa pass key and then asked if I wanted to do IPV4
setup. Yes. DHCP or static? Static, please. I then entered the IP address,
netmask, and gateway address and clicked 'ok'. I immediately ended up back
at the page that gives you a choice of network interfaces to configure. It
did not proceed, as the Handbook suggests and as one would expect, to
collect addresses of DNS servers and ask if I wanted to do IPV6 configuration.
I have done this multiple times to no avail. The information I entered was
correct. And if it was not, I would expect an error message, which I did
not get. If I just click 'cancel ' when it mysteriously loops back, I can
proceed with the rest of the install, but none of the static IP setup info
makes it into /etc/rc.conf or anywhere else.

My wireless base station does allow you to configure its DHCP server to
assign IP addresses based on MAC address, so the address assigned to a
particular machine is predictable. I prefer using static IP addresses
because it avoids the handshake time with the DHCP server every time you
boot. But in this case, I was unable to get static IP address assignment
working, so I resorted to DHCP, which did work.

I do not know if this problem is wireless-specific or wpa-specific; I can
only speak about my own specific case.

I will not be able to do anything further with this machine on this problem,
as I abandoned the install of FreeBSD -- just too many problems during
installation.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2012-06-25 09:20:52 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-wireless

Over to maintainer(s).
Comment 2 Adrian Chadd freebsd_committer freebsd_triage 2012-06-25 09:37:39 UTC
Hi,

This sounds like an installer problem. Have you created PRs for all
the other installer issues that you were seeing?

I use static and DHCP IPs on a variety of atheros NICs on -8, -9 and
-10. I've had no problems.

If you don't mind, I'll file this over to whoever looks after the
installer PRs for them to look at. it may have been fixed after
9.0-RELEASE was made and thus a 9-STABLE snapshot would work better.

Thanks,


Adrian
Comment 3 donaldcallen 2016-04-15 11:32:26 UTC
I just attempted to install 10.3 on a Thinkpad, having had good results with this release on a couple of desktops. I got bitten by this same problem in the installer. I need static IP addresses so I can scp, rsync, and ssh among my various machines whose addresses I list in /etc/hosts. I realize I'm not paying for this software and you don't have infinite resources, but I can't believe I'm the only one who sets up multiple machines on a LAN this way and it's been almost two years since I originally reported this bug and it has still not been fixed.
Comment 4 donaldcallen 2016-04-16 20:53:50 UTC
(In reply to donaldcallen from comment #3)
I misread the date on my original post. This bug is now almost 4 years old.
Comment 5 Andriy Voskoboinyk freebsd_committer freebsd_triage 2016-04-21 08:33:20 UTC
+1 (RTL8188CUS, i386-20160408-r297692-bootonly snapshot); as I can see in ttyv2, it fails with:

DEBUG: dialog.subr: DIALOG_SELF_INITIALIZE=[1]
DEBUG: f_dialog_init: ARGV=[wlan0 WPA ] GETOPTS_STDARGS=[dD:SX]
DEBUG: f_dialog_init: SECURE=[] USE_XDIALOG=[]
DEBUG: f_dialog_init: dialog(1) API initialized.
DEBUG: dialog.subr: Successfully loaded.
ifconfig: WPA: bad value
route: route has not been found
route: writing to routing socket: Network is unreachable
ifconfig: create: bad value

(looks like it tries to pass WPA as an argument to ifconfig(8)).
Comment 6 Allan Jude freebsd_committer freebsd_triage 2016-04-21 15:17:44 UTC
(In reply to Andriy Voskoboinyk from comment #5)
route: route has not been found
route: writing to routing socket: Network is unreachable

Suggests you entered a default gateway outside of your subnet

What exactly did you enter for the ip, subnet mask, and gateway?
Comment 7 Andriy Voskoboinyk freebsd_committer freebsd_triage 2016-04-21 15:26:54 UTC
(In reply to Allan Jude from comment #6)
192.168.1.2/255.255.255.0/192.168.1.1
Comment 8 Andriy Voskoboinyk freebsd_committer freebsd_triage 2016-04-21 17:21:26 UTC
Created attachment 169530 [details]
Possible fix
Comment 9 commit-hook freebsd_committer freebsd_triage 2016-05-02 21:40:56 UTC
A commit references this bug:

Author: avos
Date: Mon May  2 21:40:34 UTC 2016
New revision: 298946
URL: https://svnweb.freebsd.org/changeset/base/298946

Log:
  bsdinstall: fix static address assignment for protected wireless networks.

  Filter out IFCONFIG_PREFIX variable (which may contain WPA keyword)
  from ifconfig parameters.

  PR:		169199

Changes:
  head/usr.sbin/bsdinstall/scripts/netconfig_ipv4
Comment 10 Eitan Adler freebsd_committer freebsd_triage 2018-05-28 19:43:17 UTC
batch change:

For bugs that match the following
-  Status Is In progress 
AND
- Untouched since 2018-01-01.
AND
- Affects Base System OR Documentation

DO:

Reset to open status.


Note:
I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.
Comment 11 Cy Schubert freebsd_committer freebsd_triage 2018-05-28 19:50:44 UTC
I have an old laptop with ath running 12-CURRENT. I'll try to find some time to determine if there's a problem.