Hello,

I'm using my (Ubuntu) mobile device as AP to connect my FreeBSD laptop
to the Internet. While this is working fine most of the times, I
encounter in some situation problems getting an IP addr with DHCP from
the mobile. It looks somehow like a race condition between WPA
associating and DHCP (dhclient) asking to early (and giving up). Here is
a typical situation when it does not work:


Dec 27 11:58:25 c720-r314251 kernel: ifa_maintain_loopback_route: insertion 
failed for interface wlan0: 17
Dec 27 11:59:22 c720-r314251 wpa_supplicant[7871]: wlan0: Trying to associate 
with 4e:74:03:65:46:a9 (SSID='UbuntuBQ' freq=2412 MHz)
Dec 27 11:59:32 c720-r314251 wpa_supplicant[7871]: wlan0: Authentication with 
4e:74:03:65:46:a9 timed out.
Dec 27 11:59:32 c720-r314251 wpa_supplicant[7871]: wlan0: 
CTRL-EVENT-DISCONNECTED bssid=4e:74:03:65:46:a9 reason=3 locally_generated=1
Dec 27 11:59:52 c720-r314251 wpa_supplicant[7871]: wlan0: Trying to associate 
with 4e:74:03:65:46:a9 (SSID='UbuntuBQ' freq=2412 MHz)
Dec 27 11:59:52 c720-r314251 wpa_supplicant[7871]: wlan0: Associated with 
4e:74:03:65:46:a9
Dec 27 11:59:52 c720-r314251 kernel: wlan0: link state changed to UP
Dec 27 11:59:52 c720-r314251 dhclient[7941]: send_packet: No buffer space 
available
Dec 27 11:59:53 c720-r314251 wpa_supplicant[7871]: wlan0: WPA: Key negotiation 
completed with 4e:74:03:65:46:a9 [PTK=CCMP GTK=CCMP]
Dec 27 11:59:53 c720-r314251 wpa_supplicant[7871]: wlan0: CTRL-EVENT-CONNECTED 
- Connection to 4e:74:03:65:46:a9 completed [id=1 id_str=]

As you can see, the 'dhclient[7941]: send_packet: No buffer space available' 
comes *before* the connection to the AP is completed. A tcpdump  shows
in such a situation that the device is not answering:

root@c720-r314251:/var/db # tcpdump -n -i wlan0 port 67
09:52:45.426053 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 
90:48:9a:92:9e:43, length 300
09:52:45.426926 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 
90:48:9a:92:9e:43, length 300
09:52:46.465668 EAPOL key (3) v2, len 95
09:52:46.466180 EAPOL key (3) v1, len 117
09:52:46.472944 EAPOL key (3) v2, len 151
09:52:46.473183 EAPOL key (3) v1, len 95
09:52:52.429945 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 
90:48:9a:92:9e:43, length 300
09:53:02.438749 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 
90:48:9a:92:9e:43, length 300
09:53:19.446098 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 
90:48:9a:92:9e:43, length 300
09:53:40.455949 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 
90:48:9a:92:9e:43, length 300

It seems that the BOOTP/DHCP requests are not really sent to the AP because they
are not visible with tcpdump in the Ubuntu device.

At the same time, they are not logged by the ipfilter firewall on my
laptop. The rules in question are:

pass out quick log on wlan0 proto tcp from any to any  port = 53 flags S keep 
state
pass out quick log on wlan0 proto udp from any to any  port = 53 keep state
pass out quick log on wlan0 proto udp from any to any  port = 67 keep state
pass out quick log on wlan0 proto udp from any to any  port = 68 keep state

Any ideas re/ the following question:

1. How could I delay the dhclient until connection is fine?
2. Why the BOOTP/DHCP are not logged by the ipfilter?

This could smell as a problem caused by the AP, but any other device
(for example an iPhone) connects fine and gets an IP addr.

Thanks

        matthias

-- 
Matthias Apitz, ‚úČ g...@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
October, 7 -- The GDR was different: Peace instead of Bundeswehr and wars, 
Druschba
instead of Nazis, to live instead of to survive.
_______________________________________________
freebsd-wireless@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"

Reply via email to