Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 May 2012 01:20:11 GMT
From:      Erik Fonnesbeck <efonnes@gmail.com>
To:        freebsd-wireless@FreeBSD.org
Subject:   Re: bin/144109: hostapd(8) uses the MAC of the wireless interface,  but should use the BSSID.
Message-ID:  <201205060120.q461KB7B050434@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/144109; it has been noted by GNATS.

From: Erik Fonnesbeck <efonnes@gmail.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/144109: hostapd(8) uses the MAC of the wireless interface,
 but should use the BSSID.
Date: Sat, 5 May 2012 19:14:44 -0600

 --00248c6a66a6fc9c5f04bf53e0fd
 Content-Type: text/plain; charset=ISO-8859-1
 
 This patch I made a while ago gets the BSSID instead of the
 interface's ethernet MAC so that hostapd works even if the two do not
 match.  It is incomplete, however; because with this patch hostapd
 does not work if the interface was not up already when hostapd was
 started (it fails to acquire the BSSID).  If there is some way to get
 it without the interface being up, that would probably be better.  It
 must exist somewhere, because it is obviously already stored
 somewhere, but I just do not know how to get it.  If it is not
 possible, it could be necessary to bring up the interface a bit sooner
 in hostapd.
 
 --00248c6a66a6fc9c5f04bf53e0fd
 Content-Type: application/octet-stream; 
 	name="hostapd-eth_get-bssid-incomplete.patch"
 Content-Disposition: attachment; 
 	filename="hostapd-eth_get-bssid-incomplete.patch"
 Content-Transfer-Encoding: base64
 X-Attachment-Id: f_h1ve8srd0
 
 LS0tIHVzci5zYmluL3dwYS9sMl9wYWNrZXQuYy5vbGQJMjAxMC0xMi0wMSAxOToxNTo0Ni4wMDAw
 MDAwMDAgLTA3MDAKKysrIHVzci5zYmluL3dwYS9sMl9wYWNrZXQuYwkyMDEwLTEyLTAxIDE5OjIx
 OjI2LjAwMDAwMDAwMCAtMDcwMApAQCAtMjksNiArMjksNyBAQAogI2luY2x1ZGUgPG5ldC9yb3V0
 ZS5oPgogI2luY2x1ZGUgPG5ldGluZXQvaW4uaD4KICNpbmN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HwKLQkJICAgIChpZm0tPmlmbV9hZGRycyAmIFJUQV9JRlApID09
 IDApCi0JCQljb250aW51ZTsKLQkJaWYgKHNkbC0+c2RsX2ZhbWlseSAhPSBBRl9MSU5LIHx8IHNk
 bC0+c2RsX25sZW4gPT0gMCB8fAotCQkgICAgbWVtY21wKHNkbC0+c2RsX2RhdGEsIGRldmljZSwg
 c2RsLT5zZGxfbmxlbikgIT0gMCkKLQkJCWNvbnRpbnVlOwotCQltZW1jcHkoZWEsIExMQUREUihz
 ZGwpLCBzZGwtPnNkbF9hbGVuKTsKLQkJYnJlYWs7Ci0JfQotCWZyZWUoYnVmKTsKIAotCWlmIChw
 ID49IGJ1ZiArIGxlbikgewotCQllcnJubyA9IEVTUkNIOworCW1lbXNldCgmaXJlcSwgMCwgc2l6
 ZW9mKGlyZXEpKTsKKwlzdHJuY3B5KGlyZXEuaV9uYW1lLCBkZXZpY2UsIHNpemVvZihpcmVxLmlf
 bmFtZSkpOworCWlyZXEuaV90eXBlID0gSUVFRTgwMjExX0lPQ19CU1NJRDsKKwlpcmVxLmlfZGF0
 YSA9ICh2b2lkICopIGVhOworCWlyZXEuaV9sZW4gPSBFVEhfQUxFTjsKKwlpZiAoaW9jdGwocywg
 U0lPQ0c4MDIxMSwgJmlyZXEpIDwgMCkgeworCQljbG9zZShzKTsKIAkJcmV0dXJuIC0xOwogCX0K
 KworCWNsb3NlKHMpOwogCXJldHVybiAwOwogfQogCg==
 --00248c6a66a6fc9c5f04bf53e0fd--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205060120.q461KB7B050434>