VLAN dynamic interface down

Bertrand Jacquin beber
Sat Aug 25 13:12:40 PDT 2012


Hi,

I can confirm that it is working as expected with
a9277e85ca26ac1f674d8b4734a32d7bd05c9454 with libnl3. New binary is
really huge comparing to 1.0 (+300k).

Thanks,
Bertrand

D'ar lun 13 a viz Eost 2012 e 21 eur 37, ? michael-dev ? he deus skrivet :
> Hi,
> 
> I remember I once (>2 years ago) had issues, that let me add an 
> explicit ifconfig-up to vlan_init.c (after the new 
> wlan-per-vlan-interface has been created), but I'm not certain.
> Maybe this would help in your case, too?
> I cannot reproduce this with current HEAD.
> 
> Regards,
>   M. Braun
> 
> Am 11.08.2012 16:41, schrieb Bertrand Jacquin:
> > Hi,
> >
> > Not anyone is getting the same issue ?
> >
> > Bertrand
> >
> > D'ar yaou 02 a viz Eost 2012 e 23 eur 42, ? Bertrand Jacquin ? he
> > deus skrivet :
> >> Hi,
> >>
> >> I've setup a small configuration to let hostapd created dynamic
> >> interface using the dynamic_vlan functionality as the follow :
> >>
> >>   logger_syslog=-1
> >>   logger_syslog_level=1
> >>   logger_stdout=-1
> >>   logger_stdout_level=2
> >>   dump_file=/var/run/hostapd-wlan0.dump
> >>   ctrl_interface=/var/run/hostapd
> >>   ctrl_interface_group=0
> >>   interface=wlan0
> >>   driver=nl80211
> >>   ssid=Scabb Island
> >>   ieee80211d=1
> >>   country_code=FR
> >>   hw_mode=g
> >>   channel=1
> >>   beacon_int=100
> >>   dtim_period=10
> >>   ignore_broadcast_ssid=0
> >>   wmm_enabled=0
> >>   auth_algs=1
> >>   wpa=2
> >>   wpa_passphrase=XXXXXX
> >>   wpa_key_mgmt=WPA-PSK
> >>   wpa_pairwise=CCMP
> >>
> >>   dynamic_vlan=1
> >>   vlan_file=/etc/hostapd/vlan.lst
> >>   accept_mac_file=/etc/hostapd/accept.lst
> >>
> >> /etc/hostapd/vlan.lst contain the following :
> >>
> >>   *	vlan#
> >>
> >> Interface vlanX is correctly created but remain DOWN :
> >>
> >>   # ip link show dev vlan34
> >>   44: vlan34: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN 
> >> qlen 1000
> >>       link/ether 00:1b:b1:03:70:6a brd ff:ff:ff:ff:ff:ff
> >>
> >> So hostapd fail to add STA to freshly created interface :
> >>
> >>   nl80211: NL80211_ATTR_STA_VLAN (addr=5c:0a:5b:25:9d:a7 
> >> ifname=vlan34 vlan_id=34) failed: -100 (Network is down)
> >>   wlan0: STA 5c:0a:5b:25:9d:a7 IEEE 802.11: could not bind the STA 
> >> entry to vlan_id=34
> >>
> >>
> >> If I manually set up iface vlan34, all is fine, but I would like not 
> >> to
> >> do this.
> >>
> >> Looking for this on Google seems to explain that this dynamic iface
> >> should be a bridge, but it's not :
> >>
> >>   # ethtool -i vlan34
> >>   driver: ath5k
> >>   version: 3.1.10-allin1
> >>   firmware-version: N/A
> >>   bus-info: 0000:00:0c.0
> >>   supports-statistics: no
> >>   supports-test: no
> >>   supports-eeprom-access: no
> >>   supports-register-dump: no
> >>
> >> Is something wrong ? I'm using hostapd v1.0 :
> >>
> >>   # hostapd -v
> >>   hostapd v1.0
> >>   User space daemon for IEEE 802.11 AP management,
> >>   IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
> >>   Copyright (c) 2002-2012, Jouni Malinen <j at w1.fi> and contributors
> >>
> >> I include a log file generated by launching hostapd as the follow :
> >>
> >>   # hostapd -dd -K -P /var/run/hostapd-wlan0.pid 
> >> /etc/hostapd/wlan0.conf
> >>
> >> I volontary suppressed all 'Add randomness' lines as really annoying 
> >> and also masked PSK.
> >>
> >> Regards,
> >>
> >> --
> >> Beber
> >
> >> random: Trying to read entropy from /dev/random
> >> Configuration file: /etc/hostapd/wlan0.conf
> >> ctrl_interface_group=0
> >> nl80211: interface wlan0 in phy phy0
> >> rfkill: Cannot open RFKILL control device
> >> nl80211: RFKILL status not available
> >> nl80211: Using driver-based off-channel TX
> >> nl80211: Add own interface ifindex 5
> >> nl80211: Set mode ifindex 5 iftype 3 (AP)
> >> nl80211: Create interface iftype 6 (MONITOR)
> >> nl80211: New interface mon.wlan0 created: ifindex=43
> >> nl80211: Add own interface ifindex 43
> >> BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
> >> nl80211: Regulatory information - country=00
> >> nl80211: 2402-2472 @ 40 MHz
> >> nl80211: 2457-2482 @ 20 MHz
> >> nl80211: 2474-2494 @ 20 MHz
> >> nl80211: 5170-5250 @ 40 MHz
> >> nl80211: 5735-5835 @ 40 MHz
> >> nl80211: Added 802.11b mode based on 802.11g information
> >> Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=20 dBm
> >> Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=20 dBm
> >> Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=20 dBm
> >> Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=20 dBm
> >> Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=20 dBm
> >> Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=20 dBm
> >> Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=20 dBm
> >> Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=20 dBm
> >> Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=20 dBm
> >> Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=20 dBm
> >> Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=20 dBm
> >> Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=20 dBm
> >> Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=20 dBm
> >> Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=20 dBm
> >> Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=20 dBm
> >> Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=20 dBm
> >> Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=20 dBm
> >> Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=20 dBm
> >> Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=20 dBm
> >> Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=20 dBm
> >> Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=20 dBm
> >> Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=20 dBm
> >> Completing interface initialization
> >> Mode: IEEE 802.11g  Channel: 1  Frequency: 2412 MHz
> >> nl80211: Set freq 2412 (ht_enabled=0 sec_channel_offset=0)
> >> RATE[0] rate=10 flags=0x1
> >> RATE[1] rate=20 flags=0x1
> >> RATE[2] rate=55 flags=0x1
> >> RATE[3] rate=110 flags=0x1
> >> RATE[4] rate=60 flags=0x0
> >> RATE[5] rate=90 flags=0x0
> >> RATE[6] rate=120 flags=0x0
> >> RATE[7] rate=180 flags=0x0
> >> RATE[8] rate=240 flags=0x0
> >> RATE[9] rate=360 flags=0x0
> >> RATE[10] rate=480 flags=0x0
> >> RATE[11] rate=540 flags=0x0
> >> Flushing old station entries
> >> Deauthenticate all stations
> >> wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=(nil) key_idx=0 
> >> set_tx=0 seq_len=0 key_len=0
> >> wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=(nil) key_idx=1 
> >> set_tx=0 seq_len=0 key_len=0
> >> wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=(nil) key_idx=2 
> >> set_tx=0 seq_len=0 key_len=0
> >> wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=(nil) key_idx=3 
> >> set_tx=0 seq_len=0 key_len=0
> >> Using interface wlan0 with hwaddr 00:1b:b1:03:70:6a and ssid 'Scabb 
> >> Island'
> >> Deriving WPA PSK based on passphrase
> >> SSID - hexdump_ascii(len=12):
> >>      53 63 61 62 62 20 49 73 6c 61 6e 64               Scabb Island
> >> PSK (ASCII passphrase) - hexdump_ascii(len=8):
> >>      XXXXX MASKED XXXX
> >> PSK (from passphrase) - hexdump(len=32): XXXXX MASKED XXXX
> >> random: Cannot read from /dev/random: Resource temporarily 
> >> unavailable
> >> random: Got 0/20 bytes from /dev/random
> >> random: Only 0/20 bytes of strong random data available from 
> >> /dev/random
> >> random: Not enough entropy pool available for secure operations
> >> WPA: Not enough entropy in random pool for secure operations - 
> >> update keys later when the first station connects
> >> Get randomness: len=32 entropy=0
> >> GMK - hexdump(len=32): XXXXX MASKED XXXX
> >> Get randomness: len=32 entropy=0
> >> Key Counter - hexdump(len=32): XXXXX MASKED XXXX
> >> WPA: Delay group state machine start until Beacon frames have been 
> >> configured
> >> nl80211: Set beacon (beacon_set=0)
> >> WPA: Start group state machine to set initial keys
> >> WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
> >> Get randomness: len=16 entropy=0
> >> GTK - hexdump(len=16): XXXXX MASKED XXXX
> >> WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
> >> wpa_driver_nl80211_set_key: ifindex=5 alg=3 addr=0x80aa754 key_idx=1 
> >> set_tx=1 seq_len=0 key_len=16
> >>    broadcast key
> >> wpa_driver_nl80211_set_operstate: operstate 0->1 (UP)
> >> netlink: Operstate: linkmode=-1, operstate=6
> >> wlan0: Setup of interface done.
> >> RTM_NEWLINK: operstate=1 ifi_flags=0x1002 ()
> >> nl80211: Ignore interface down event since interface mon.wlan0 is up
> >> RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
> >> RTM_NEWLINK, IFLA_IFNAME: Interface 'mon.wlan0' added
> >> Unknown event 5
> >> RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
> >> RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
> >> nl80211: if_removed already cleared - ignore event
> >> mgmt::deauth cb
> >> mgmt::auth
> >> authentication: STA=5c:0a:5b:25:9d:a7 auth_alg=0 auth_transaction=1 
> >> status_code=0 wep=0
> >>   New STA
> >> wlan0: STA 5c:0a:5b:25:9d:a7 RADIUS: VLAN ID 34
> >> wlan0: STA 5c:0a:5b:25:9d:a7 IEEE 802.11: authentication OK (open 
> >> system)
> >> wlan0: STA 5c:0a:5b:25:9d:a7 MLME: 
> >> MLME-AUTHENTICATE.indication(5c:0a:5b:25:9d:a7, OPEN_SYSTEM)
> >> wlan0: STA 5c:0a:5b:25:9d:a7 MLME: 
> >> MLME-DELETEKEYS.request(5c:0a:5b:25:9d:a7)
> >> authentication reply: STA=5c:0a:5b:25:9d:a7 auth_alg=0 
> >> auth_transaction=2 resp=0 (IE len=0)
> >> mgmt::auth cb
> >> wlan0: STA 5c:0a:5b:25:9d:a7 IEEE 802.11: authenticated
> >> mgmt::assoc_req
> >> association request: STA=5c:0a:5b:25:9d:a7 capab_info=0x431 
> >> listen_interval=10
> >>   new AID 1
> >> wlan0: STA 5c:0a:5b:25:9d:a7 IEEE 802.11: association OK (aid 1)
> >> mgmt::assoc_resp cb
> >> wlan0: STA 5c:0a:5b:25:9d:a7 IEEE 802.11: associated (aid 1)
> >> wlan0: STA 5c:0a:5b:25:9d:a7 MLME: 
> >> MLME-ASSOCIATE.indication(5c:0a:5b:25:9d:a7)
> >> wlan0: STA 5c:0a:5b:25:9d:a7 MLME: 
> >> MLME-DELETEKEYS.request(5c:0a:5b:25:9d:a7)
> >> wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x8a4bba0 key_idx=0 
> >> set_tx=1 seq_len=0 key_len=0
> >>    addr=5c:0a:5b:25:9d:a7
> >> VLAN: vlan_add_dynamic(vlan_id=34 ifname=vlan#)
> >> nl80211: Create interface iftype 4 (unknown)
> >> nl80211: New interface vlan34 created: ifindex=44
> >> nl80211: Add own interface ifindex 44
> >> wlan0: STA 5c:0a:5b:25:9d:a7 IEEE 802.11: added new dynamic VLAN 
> >> interface 'vlan34'
> >> wlan0: STA 5c:0a:5b:25:9d:a7 IEEE 802.11: binding station to 
> >> interface 'vlan34'
> >> WPA: Add group state machine for VLAN-ID 34
> >> random: Cannot read from /dev/random: Resource temporarily 
> >> unavailable
> >> random: Got 0/20 bytes from /dev/random
> >> random: Only 0/20 bytes of strong random data available from 
> >> /dev/random
> >> random: Not enough entropy pool available for secure operations
> >> WPA: Not enough entropy in random pool for secure operations - 
> >> update keys later when the first station connects
> >> Get randomness: len=32 entropy=154
> >> GMK - hexdump(len=32): XXXXX MASKED XXXX
> >> Get randomness: len=32 entropy=122
> >> Key Counter - hexdump(len=32): XXXXX MASKED XXXX
> >> WPA: group state machine entering state GTK_INIT (VLAN-ID 34)
> >> Get randomness: len=16 entropy=90
> >> GTK - hexdump(len=16): XXXXX MASKED XXXX
> >> WPA: group state machine entering state SETKEYSDONE (VLAN-ID 34)
> >> wpa_driver_nl80211_set_key: ifindex=44 alg=3 addr=0x80aa754 
> >> key_idx=1 set_tx=1 seq_len=0 key_len=16
> >>    broadcast key
> >> nl80211: set_key failed; err=-100 Network is down)
> >> WPA: Moving STA 5c:0a:5b:25:9d:a7 to use group state machine for 
> >> VLAN ID 34
> >> nl80211: NL80211_ATTR_STA_VLAN (addr=5c:0a:5b:25:9d:a7 ifname=vlan34 
> >> vlan_id=34) failed: -100 (Network is down)
> >> wlan0: STA 5c:0a:5b:25:9d:a7 IEEE 802.11: could not bind the STA 
> >> entry to vlan_id=34
> >> RTM_NEWLINK: operstate=1 ifi_flags=0x1002 ()
> >> nl80211: Ignore interface down event since interface vlan34 is up
> >> RTM_NEWLINK: operstate=1 ifi_flags=0x1002 ()
> >> nl80211: Ignore interface down event since interface vlan34 is up
> >> nl80211: Event message available
> >> nl80211: New station 5c:0a:5b:25:9d:a7
> >> mgmt::disassoc
> >> disassocation: STA=5c:0a:5b:25:9d:a7 reason_code=8
> >> wlan0: STA 5c:0a:5b:25:9d:a7 WPA: event 2 notification
> >> wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x8a4bba0 key_idx=0 
> >> set_tx=1 seq_Killed by signal 2.
> >
> >
> >
> >
> >> _______________________________________________
> >> HostAP mailing list
> >> HostAP at lists.shmoo.com
> >> http://lists.shmoo.com/mailman/listinfo/hostap
> 
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap

-- 
Beber
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20120825/8c979f83/attachment.pgp 



More information about the Hostap mailing list