From 62601723f4692631105f5e05da1871dc36a795f4 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 13 Aug 2003 16:12:15 +0000 Subject: many fixes git-svn-id: file:///home/lennart/svn/public/ifplugd/trunk@32 2bf48fe7-cfc1-0310-909f-d9042e1e0fef --- src/interface.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/interface.c') diff --git a/src/interface.c b/src/interface.c index b6f1ee6..9128c11 100644 --- a/src/interface.c +++ b/src/interface.c @@ -247,10 +247,10 @@ static int is_assoc_ap(uint8_t mac[ETH_ALEN]) { } interface_status_t interface_detect_beat_wlan(int fd, char *iface) { + if (interface_auto_up) interface_up(fd, iface); - uint8_t mac[6]; int q; struct iwreq req; @@ -264,6 +264,8 @@ interface_status_t interface_detect_beat_wlan(int fd, char *iface) { return IFSTATUS_ERR; } + memcpy(mac, &(req.u.ap_addr.sa_data), ETH_ALEN); + if (!is_assoc_ap(mac)) return IFSTATUS_DOWN; -- cgit