Commit graph

9 commits

Author SHA1 Message Date
Jouni Malinen 0f0120148a Verify that readlink() did not truncate result
linux_br_get() was forcing null termination on the buffer, but did not
check whether the string could have been truncated. Make this more
strict by rejecting any truncation case.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-10-26 15:55:39 +03:00
Ben Greear addde1399e Better logging for ioctl set flags failure
Let user know if the call failed setting interface up vs. down.

Signed-hostap: Ben Greear <greearb@candelatech.com>
2012-08-04 20:41:35 +03:00
Jouni Malinen 0f3d578efc Remove the GPL notification from files contributed by Jouni Malinen
Remove the GPL notification text from the files that were
initially contributed by myself.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-02-11 19:39:36 +02:00
Jouni Malinen 59d249255c nl80211: Ignore netlink interface down if interface is up
The netlink event processing is delayed since they are only returned
after control returns to eloop. This can result in netlink down events
being processed at a point when the interface has is actually still
there (the first event on new interface is down) and that can result in
odd behavior especially when the resulting interface-disabled event is
delivered to AP mode interface with wpa_supplicant.

Work around this by filtering netlink down events if the matching
interface is up at the time the netlink event is processed. This fixes
an issue brought up by commit 36d84860bb.
2011-10-28 21:08:15 +03:00
Jouni Malinen 6e8183d714 nl80211: Stop more quickly on initialization errors
Stop on fatal errors like an attempt to use a non-existing interface or
not have root privileges to avoid producing confusing error messages.
2011-10-20 21:36:36 +03:00
Jouni Malinen de1b2d143a Make sure the resutl from readlink is properly null terminated 2010-01-16 17:19:06 +02:00
Jouni Malinen 94627f6cc8 hostapd: Detect bridge interface automatically
This makes the bridge parameter unnecessary for cases where the interface
is already in a bridge and sysfs is mounted to /sys so that the detection
code works.

For nl80211, the bridge parameter can be used to request the AP
interface to be added to the bridge automatically (brctl may refuse to
do this before hostapd has been started to change the interface mode).
If needed, the bridge interface is also created.
2010-01-16 15:19:58 +02:00
Jouni Malinen 2ac9688eb8 Use common driver code for Linux hwaddr get/set 2010-01-03 22:17:08 +02:00
Jouni Malinen 34f2f814e0 Share a single Linux ioctl helper fo setting interface up/down
Number of Linux driver wrappers included this more or less identical
function, so lets add a new helper file to be able to share some more
code between the driver wrappers.
2010-01-03 22:08:26 +02:00