summaryrefslogtreecommitdiff
path: root/usr.sbin/hostapd/privsep.c
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2006-12-31 03:25:59 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2006-12-31 03:25:59 +0000
commit295cbfa8ffebb5d97209ef81c3ac5ea24f0f71ab (patch)
tree44a0adca183edf5de72f1fcc20e7801a71cfc6d5 /usr.sbin/hostapd/privsep.c
parent64dfe7a539fee7a4ca51ad6b1f4eecbbc1653970 (diff)
add a channel hopper for wireless interfaces. the channel hopper will
jump to the next available channel after a configurable delay for the specified list of wireless "hostap" interfaces, see the new "set hostap hopper" commands in hostapd.conf(5). with help by jsg@
Diffstat (limited to 'usr.sbin/hostapd/privsep.c')
-rw-r--r--usr.sbin/hostapd/privsep.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/hostapd/privsep.c b/usr.sbin/hostapd/privsep.c
index 0cd46f9a056..a25129995b7 100644
--- a/usr.sbin/hostapd/privsep.c
+++ b/usr.sbin/hostapd/privsep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: privsep.c,v 1.20 2006/06/01 22:09:09 reyk Exp $ */
+/* $OpenBSD: privsep.c,v 1.21 2006/12/31 03:25:58 reyk Exp $ */
/*
* Copyright (c) 2004, 2005 Reyk Floeter <reyk@openbsd.org>
@@ -81,6 +81,7 @@ void
hostapd_priv_init(struct hostapd_config *cfg)
{
struct hostapd_iapp *iapp = &cfg->c_iapp;
+ struct hostapd_apme *apme;
int i, socks[2];
struct passwd *pw;
struct servent *se;
@@ -152,6 +153,9 @@ hostapd_priv_init(struct hostapd_config *cfg)
if (cfg->c_flags & HOSTAPD_CFG_F_APME) {
if ((cfg->c_apme_ctl = socket(AF_INET, SOCK_DGRAM, 0)) == -1)
hostapd_fatal("unable to open ioctl socket\n");
+ TAILQ_FOREACH(apme, &cfg->c_apmes, a_entries)
+ if (apme->a_chanavail != NULL)
+ hostapd_apme_sethopper(apme, 0);
}
hostapd_roaming_init(cfg);