From vs@lambda.foldr.org  Thu Aug 15 11:13:19 2002
Return-Path: <vs@lambda.foldr.org>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 74BA937B400
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 15 Aug 2002 11:13:19 -0700 (PDT)
Received: from lambda.foldr.org (lambda.foldr.org [198.78.66.36])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 0D3B243E72
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 15 Aug 2002 11:13:19 -0700 (PDT)
	(envelope-from vs@lambda.foldr.org)
Received: from lambda.foldr.org (lambda.foldr.org [198.78.66.36])
	by lambda.foldr.org (8.12.3/8.11.6) with ESMTP id g7FIDJgQ096004
	(using TLSv1/SSLv3 with cipher EDH-RSA-DES-CBC3-SHA (168 bits) verified OK)
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 15 Aug 2002 20:13:25 +0200 (CEST)
	(envelope-from vs@lambda.foldr.org)
Received: (from vs@localhost)
	by lambda.foldr.org (8.12.3/8.11.6/Submit) id g7FID8ff095861;
	Thu, 15 Aug 2002 20:13:08 +0200 (CEST)
	(envelope-from vs)
Message-Id: <200208151813.g7FID8ff095861@lambda.foldr.org>
Date: Thu, 15 Aug 2002 20:13:08 +0200 (CEST)
From: Volker Stolz <vs@lambda.foldr.org>
Reply-To: Volker Stolz <vs@lambda.foldr.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Combining WLAN-SSID & DHCP in rc.conf
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         41691
>Category:       conf
>Synopsis:       Combining WLAN-SSID & DHCP in rc.conf
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dougb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 15 11:20:01 PDT 2002
>Closed-Date:    Sun Feb 02 04:54:06 PST 2003
>Last-Modified:  Sun Feb 02 04:54:06 PST 2003
>Originator:     Volker Stolz
>Release:        FreeBSD 4.5-RELEASE i386
>Organization:
Lehrstuhl fr Informatik II
>Environment:
System: FreeBSD lambda.foldr.org 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Mon Aug 12 20:33:20 PDT 2002 user@jail2.johncompanies.com:/usr/src/sys/compile/6300 i386


	
>Description:
Currently there's no way of setting a preferred SSID for wireless NICs
and asking for DHCP-setup in rc.conf.

You can either configure the NIC manually using e.g.
ifconfig_wi0="... ssid foo..." *or* set ifconfig_wi0 to DHCP and hope
you end up in the correct network.

>How-To-Repeat:
Use two accesspoints to offer two different networks, enable DHCP in both
and then try setting up your NIC correctly in rc.conf.
>Fix:
Add an option to rc.conf which gets queried before setting up the
NIC and which contains the preferred SSID, e.g.

  ifconfig_wi0_ssid="foo"

Modify /etc/rc.network accordingly.

Another, more generic approach would be to have

  wicontrol_wi0="..."

in rc.conf, which would allow for setting *any* parameter
understood by wicontrol, including the SSID.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: dougb 
State-Changed-When: Sun Feb 2 04:52:36 PST 2003 
State-Changed-Why:  

The proper way to do this is to use /etc/dhclient-exit-hooks. Take 
a look at the man page for dhclient.conf, and dhclient-script. 
It's not that tough to set up. 

Good luck, 

Doug 


Responsible-Changed-From-To: freebsd-bugs->dougb 
Responsible-Changed-By: dougb 
Responsible-Changed-When: Sun Feb 2 04:52:36 PST 2003 
Responsible-Changed-Why:  

I closed this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41691 
>Unformatted:
