On 07.07.2013 11:27, Philip Guenther wrote:
> On Sat, 6 Jul 2013, Alexis de BRUYN wrote:
> ...
>> On a fresh install, while trying to hide the network ID (ESSID)
>> with the following command :
>> ifconfig athn0 192.168.0.56 255.255.255.0 \
>> media autoselect mode 11g mediaopt hostap \
>> nwid network-id nwflag hidenwid
>>
>> this error message is returned "ifconfig: SIOCS80211FLAGS: Invalid argument".
> ...
>> Like mentionned, I have tried to move the nwflag in the command line (or
>> in /etc/hostname.athn0, even put nwflag hidenwid in the second line),
>> but no success.
>
> What error, if any, do you get if you completely separate nwflag into a
> separate ifconfig invocation? I.e., first run
> ifconfig athn0 192.168.0.56 255.255.255.0 \
> media autoselect mode 11g mediaopt hostap \
> nwid network-id
>
> then give it a moment and verify that it shows the media as hostap, and
> only then do
> ifconfig athn0 nwflag hidenwid
>
> ?
In my first tests, before writing to bugs@, I have executed the second
command to fast I guess, because I still had this error.
Now, if I am waiting at least a couple of seconds, it is working with no
error message .
And :
* `ifconfig athn0` shows `hidenwid` :
$ ifconfig athn0
athn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:21:63:a4:3a:28
priority: 4
groups: wlan
media: IEEE802.11 autoselect (autoselect mode 11g hostap)
status: active
ieee80211: nwid network-id chan 6 bssid 00:21:63:a4:3a:28 hidenwid
inet 192.168.0.56 netmask 0xffffff00 broadcast 192.168.0.255
inet6 fe80::221:63ff:fea4:3a28%athn0 prefixlen 64 scopeid 0x1
* Clients can connect too :
$ ifconfig athn0 scan
athn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:21:63:a4:3a:28
priority: 4
groups: wlan
media: IEEE802.11 autoselect (autoselect mode 11g hostap)
status: active
ieee80211: nwid network-id chan 6 bssid 00:21:63:a4:3a:28
lladdr 00:15:af:2f:3a:6c 64dB 54M
privacy,short_preamble,short_slottime assoc
inet 192.168.0.56 netmask 0xffffff00 broadcast 192.168.0.255
Here is a hostname.athn0 file to get things working at boot time (btw
without adding a delay before nwflag):
$ cat /etc/hostname.athn0
inet 192.168.0.56 255.255.255.0 NONE \
media autoselect mode 11g mediaopt hostap \
nwid network-id
!ifconfig athn0 nwflag hidenwid
Thanks for your help Philip !
>
>
> It appears to me that ifconfig knows to delay/combine media and mediaopt
> settings, but it performs nwflag as it parses the command line...before it
> process the delayed media command. Since the ioctl() for setting "nwflag
> hidenwid" is an error if not _currently_ in hostap mode, it'll fail if
> used in the very ifconfig invocation that turns on hostap mode. That
> means it *should* work if done in a separate command, as seen by "William
> Graeber" from the archive message you linked to. If you don't see that
> behavior, then something else is going on.
>
>
> Philip Guenther
>
--
Alexis de BRUYN