Bug 126392 - [patch] rc.conf ifconfig_xx keywords cannot be escaped
Summary: [patch] rc.conf ifconfig_xx keywords cannot be escaped
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 7.0-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-09 13:40 UTC by Jean-Charles Longuet
Modified: 2018-01-03 05:13 UTC (History)
0 users

See Also:


Attachments
network.subr.patch (1.35 KB, patch)
2008-08-23 10:02 UTC, jclonguet
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Charles Longuet 2008-08-09 13:40:01 UTC
Special keywords in ifconfig_xx varaibles in /etc/rc.conf cannot be escaped. However, some of these keywords may be mandatory in ifconfig arguments, for example, in :

ifconfig_ath0="inet 192.168.101.1 netmask 255.255.255.0 ssid Winet channel 9 mode 11g mediaopt hostap media OFDM54 authmode WPA"

The "WPA" is used to mounf the interface using WPA, insead of setting the authmode.

How-To-Repeat: 
Configure an interface this way :
ifconfig_ath0="inet 192.168.101.1 netmask 255.255.255.0 ssid Winet channel 9 mode 11g mediaopt hostap media OFDM54 authmode WPA"

Other keywords like DHCP may trigger the problem as well.
Comment 1 Brooks Davis freebsd_committer 2008-08-11 18:43:00 UTC
State Changed
From-To: open->feedback

Requested feedback. 


Comment 2 Brooks Davis freebsd_committer 2008-08-11 18:43:00 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-rc

This is part of rc.d.
Comment 3 Brooks Davis freebsd_committer 2008-08-11 18:43:34 UTC
Setting "authmode WPA" makes no sense.  It's only supported by ifconfig for
completeness and is useless without wpa_supplicant.  As such I can't see a
reason to try to fix this.  Do you have a practical example?

-- Brooks
Comment 4 jclonguet 2008-08-12 20:10:04 UTC
 
 From what I understand, wpa_supplicant is only used by client stations. 
In my case, I am configuring an access point with hostapd for the wpa 
handling, and do not require wpa_supplicant in any way, hence the 
configuration line I added in the intial report.

More generaly, keywords can not be used anywhere in the ifconfig command 
line: you cannot set your ssid to such values, for example. There are 
workarounds, like running an extra ifconfig command in start_if.ath0, 
but that's just plain ugly, and I use FreeBSD to avoid this. Having an 
extra keyword meaning "do not look thereafter" could do the trick 
(something like "--" on command lines).

--  Jc
Comment 5 jclonguet 2008-08-23 10:02:31 UTC
Here is a patch for /etc/network.subr that handles a special
string "--" so that keywords found thereafter are ignored.

-- Jc
Comment 6 Gavin Atkinson freebsd_committer freebsd_triage 2008-12-02 13:29:56 UTC
State Changed
From-To: feedback->open

Feedback and a patch was received some time ago.
Comment 7 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:28 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped