Date: Tuesday, October 4, 2016 @ 18:20:37 Author: spupykin Revision: 191335
archrelease: copy trunk to community-i686, community-x86_64 Added: hostapd/repos/community-i686/PKGBUILD (from rev 191334, hostapd/trunk/PKGBUILD) hostapd/repos/community-i686/config (from rev 191334, hostapd/trunk/config) hostapd/repos/community-i686/hostapd-2.3-noscan.patch (from rev 191334, hostapd/trunk/hostapd-2.3-noscan.patch) hostapd/repos/community-i686/hostapd.install (from rev 191334, hostapd/trunk/hostapd.install) hostapd/repos/community-i686/hostapd.service (from rev 191334, hostapd/trunk/hostapd.service) hostapd/repos/community-i686/openvswitch.patch (from rev 191334, hostapd/trunk/openvswitch.patch) hostapd/repos/community-x86_64/PKGBUILD (from rev 191334, hostapd/trunk/PKGBUILD) hostapd/repos/community-x86_64/config (from rev 191334, hostapd/trunk/config) hostapd/repos/community-x86_64/hostapd-2.3-noscan.patch (from rev 191334, hostapd/trunk/hostapd-2.3-noscan.patch) hostapd/repos/community-x86_64/hostapd.install (from rev 191334, hostapd/trunk/hostapd.install) hostapd/repos/community-x86_64/hostapd.service (from rev 191334, hostapd/trunk/hostapd.service) hostapd/repos/community-x86_64/openvswitch.patch (from rev 191334, hostapd/trunk/openvswitch.patch) Deleted: hostapd/repos/community-i686/PKGBUILD hostapd/repos/community-i686/config hostapd/repos/community-i686/hostapd-2.3-noscan.patch hostapd/repos/community-i686/hostapd.install hostapd/repos/community-i686/hostapd.service hostapd/repos/community-i686/openvswitch.patch hostapd/repos/community-x86_64/PKGBUILD hostapd/repos/community-x86_64/config hostapd/repos/community-x86_64/hostapd-2.3-noscan.patch hostapd/repos/community-x86_64/hostapd.install hostapd/repos/community-x86_64/hostapd.service hostapd/repos/community-x86_64/openvswitch.patch -------------------------------------------+ /PKGBUILD | 128 +++++++++++ /config | 196 +++++++++++++++++ /hostapd-2.3-noscan.patch | 116 ++++++++++ /hostapd.install | 6 /hostapd.service | 20 + /openvswitch.patch | 306 ++++++++++++++++++++++++++++ community-i686/PKGBUILD | 64 ----- community-i686/config | 98 -------- community-i686/hostapd-2.3-noscan.patch | 54 ---- community-i686/hostapd.install | 3 community-i686/hostapd.service | 10 community-i686/openvswitch.patch | 153 -------------- community-x86_64/PKGBUILD | 64 ----- community-x86_64/config | 98 -------- community-x86_64/hostapd-2.3-noscan.patch | 54 ---- community-x86_64/hostapd.install | 3 community-x86_64/hostapd.service | 10 community-x86_64/openvswitch.patch | 153 -------------- 18 files changed, 772 insertions(+), 764 deletions(-) Deleted: community-i686/PKGBUILD =================================================================== --- community-i686/PKGBUILD 2016-10-04 18:20:10 UTC (rev 191334) +++ community-i686/PKGBUILD 2016-10-04 18:20:37 UTC (rev 191335) @@ -1,64 +0,0 @@ -# $Id$ -# Maintainer: Sergej Pupykin <pupykin.s+a...@gmail.com> - -pkgname=hostapd -pkgver=2.6 -pkgrel=1 -pkgdesc="IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator" -arch=('i686' 'x86_64') -url="http://w1.fi/hostapd/" -license=('custom') -depends=('openssl' 'libnl') -install=hostapd.install -options=(emptydirs) -source=(http://w1.fi/releases/$pkgname-$pkgver.tar.gz - config - hostapd.service - hostapd-2.3-noscan.patch - openvswitch.patch) -md5sums=('eaa56dce9bd8f1d195eb62596eab34c7' - '43c0ec1d8b4d4e46f468bc161bb05c4b' - '380042b9cf4950e34ed34b3093ab9e7f' - 'eaf8e48a9a63b5902fddadff2b8933fa' - 'a0802a604ed957078da0e14863df74f0') - -prepare() { - cd $pkgname-$pkgver -# patch -p1 <$srcdir/hostapd-2.3-noscan.patch - patch -p1 <$srcdir/openvswitch.patch -} - -build() { - cd $pkgname-$pkgver/hostapd - cp ../../config .config - sed -i 's#/etc/hostapd#/etc/hostapd/hostapd#' hostapd.conf - export CFLAGS="$CFLAGS $(pkg-config --cflags libnl-3.0)" - make -} - -package() { - # Systemd unit - install -Dm644 hostapd.service "$pkgdir/usr/lib/systemd/system/hostapd.service" - - cd $pkgname-$pkgver - - # License - install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING" - - cd hostapd - - # Binaries - install -d "$pkgdir/usr/bin" - install -t "$pkgdir/usr/bin" hostapd hostapd_cli - - # Configuration - install -d "$pkgdir/etc/hostapd" - install -d "$pkgdir/usr/share/doc/hostapd" - install -m644 -t "$pkgdir/usr/share/doc/hostapd" \ - hostapd.{accept,conf,deny,eap_user,radius_clients,sim_db,vlan,wpa_psk} \ - wired.conf hlr_auc_gw.milenage_db - - # Man pages - install -Dm644 hostapd.8 "$pkgdir/usr/share/man/man8/hostapd.8" - install -Dm644 hostapd_cli.1 "$pkgdir/usr/share/man/man1/hostapd_cli.1" -} Copied: hostapd/repos/community-i686/PKGBUILD (from rev 191334, hostapd/trunk/PKGBUILD) =================================================================== --- community-i686/PKGBUILD (rev 0) +++ community-i686/PKGBUILD 2016-10-04 18:20:37 UTC (rev 191335) @@ -0,0 +1,64 @@ +# $Id$ +# Maintainer: Sergej Pupykin <pupykin.s+a...@gmail.com> + +pkgname=hostapd +pkgver=2.6 +pkgrel=2 +pkgdesc="IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator" +arch=('i686' 'x86_64') +url="http://w1.fi/hostapd/" +license=('custom') +depends=('openssl' 'libnl') +install=hostapd.install +options=(emptydirs) +source=(http://w1.fi/releases/$pkgname-$pkgver.tar.gz + config + hostapd.service + hostapd-2.3-noscan.patch + openvswitch.patch) +md5sums=('eaa56dce9bd8f1d195eb62596eab34c7' + '43c0ec1d8b4d4e46f468bc161bb05c4b' + '380042b9cf4950e34ed34b3093ab9e7f' + 'f3875fc2ac90d9b99501d690a0988857' + 'a0802a604ed957078da0e14863df74f0') + +prepare() { + cd $pkgname-$pkgver + patch -p1 <$srcdir/hostapd-2.3-noscan.patch + patch -p1 <$srcdir/openvswitch.patch +} + +build() { + cd $pkgname-$pkgver/hostapd + cp ../../config .config + sed -i 's#/etc/hostapd#/etc/hostapd/hostapd#' hostapd.conf + export CFLAGS="$CFLAGS $(pkg-config --cflags libnl-3.0)" + make +} + +package() { + # Systemd unit + install -Dm644 hostapd.service "$pkgdir/usr/lib/systemd/system/hostapd.service" + + cd $pkgname-$pkgver + + # License + install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING" + + cd hostapd + + # Binaries + install -d "$pkgdir/usr/bin" + install -t "$pkgdir/usr/bin" hostapd hostapd_cli + + # Configuration + install -d "$pkgdir/etc/hostapd" + install -d "$pkgdir/usr/share/doc/hostapd" + install -m644 -t "$pkgdir/usr/share/doc/hostapd" \ + hostapd.{accept,conf,deny,eap_user,radius_clients,sim_db,vlan,wpa_psk} \ + wired.conf hlr_auc_gw.milenage_db + + # Man pages + install -Dm644 hostapd.8 "$pkgdir/usr/share/man/man8/hostapd.8" + install -Dm644 hostapd_cli.1 "$pkgdir/usr/share/man/man1/hostapd_cli.1" +} Deleted: community-i686/config =================================================================== --- community-i686/config 2016-10-04 18:20:10 UTC (rev 191334) +++ community-i686/config 2016-10-04 18:20:37 UTC (rev 191335) @@ -1,98 +0,0 @@ -# Example hostapd build time configuration -# -# This file lists the configuration options that are used when building the -# hostapd binary. All lines starting with # are ignored. Configuration option -# lines must be commented out complete, if they are not to be included, i.e., -# just setting VARIABLE=n is not disabling that variable. -# -# This file is included in Makefile, so variables like CFLAGS and LIBS can also -# be modified from here. In most cass, these lines should use += in order not -# to override previous values of the variables. - -# Driver interface for Host AP driver -CONFIG_DRIVER_HOSTAP=y - -# Driver interface for wired authenticator -CONFIG_DRIVER_WIRED=y - -# Driver interface for Prism54 driver -CONFIG_DRIVER_PRISM54=y - -# IEEE 802.11F/IAPP -CONFIG_IAPP=y - -# WPA2/IEEE 802.11i RSN pre-authentication -CONFIG_RSN_PREAUTH=y - -# PeerKey handshake for Station to Station Link (IEEE 802.11e DLS) -CONFIG_PEERKEY=y - -# IEEE 802.11w (management frame protection) -# This version is an experimental implementation based on IEEE 802.11w/D1.0 -# draft and is subject to change since the standard has not yet been finalized. -# Driver support is also needed for IEEE 802.11w. -CONFIG_IEEE80211W=y - -# Integrated EAP server -CONFIG_EAP=y - -# EAP-MD5 for the integrated EAP server -CONFIG_EAP_MD5=y - -# EAP-TLS for the integrated EAP server -CONFIG_EAP_TLS=y - -# EAP-MSCHAPv2 for the integrated EAP server -CONFIG_EAP_MSCHAPV2=y - -# EAP-PEAP for the integrated EAP server -CONFIG_EAP_PEAP=y - -# EAP-GTC for the integrated EAP server -CONFIG_EAP_GTC=y - -# EAP-TTLS for the integrated EAP server -CONFIG_EAP_TTLS=y - -# EAP-SIM for the integrated EAP server -CONFIG_EAP_SIM=y - -# EAP-AKA for the integrated EAP server -CONFIG_EAP_AKA=y - -# EAP-PAX for the integrated EAP server -CONFIG_EAP_PAX=y - -# EAP-PSK for the integrated EAP server (this is _not_ needed for WPA-PSK) -CONFIG_EAP_PSK=y - -# EAP-SAKE for the integrated EAP server -CONFIG_EAP_SAKE=y - -# EAP-GPSK for the integrated EAP server -CONFIG_EAP_GPSK=y -# Include support for optional SHA256 cipher suite in EAP-GPSK -CONFIG_EAP_GPSK_SHA256=y - -# PKCS#12 (PFX) support (used to read private key and certificate file from -# a file that usually has extension .p12 or .pfx) -CONFIG_PKCS12=y - -# RADIUS authentication server. This provides access to the integrated EAP -# server from external hosts using RADIUS. -CONFIG_RADIUS_SERVER=y - -# Build IPv6 support for RADIUS operations -CONFIG_IPV6=y - -CONFIG_DRIVER_NL80211=y - -CONFIG_IEEE80211N=y - -CONFIG_LIBNL32=y - -CONFIG_ACS=y - -CONFIG_IEEE80211AC=y - -CONFIG_OPENVSWITCH=y Copied: hostapd/repos/community-i686/config (from rev 191334, hostapd/trunk/config) =================================================================== --- community-i686/config (rev 0) +++ community-i686/config 2016-10-04 18:20:37 UTC (rev 191335) @@ -0,0 +1,98 @@ +# Example hostapd build time configuration +# +# This file lists the configuration options that are used when building the +# hostapd binary. All lines starting with # are ignored. Configuration option +# lines must be commented out complete, if they are not to be included, i.e., +# just setting VARIABLE=n is not disabling that variable. +# +# This file is included in Makefile, so variables like CFLAGS and LIBS can also +# be modified from here. In most cass, these lines should use += in order not +# to override previous values of the variables. + +# Driver interface for Host AP driver +CONFIG_DRIVER_HOSTAP=y + +# Driver interface for wired authenticator +CONFIG_DRIVER_WIRED=y + +# Driver interface for Prism54 driver +CONFIG_DRIVER_PRISM54=y + +# IEEE 802.11F/IAPP +CONFIG_IAPP=y + +# WPA2/IEEE 802.11i RSN pre-authentication +CONFIG_RSN_PREAUTH=y + +# PeerKey handshake for Station to Station Link (IEEE 802.11e DLS) +CONFIG_PEERKEY=y + +# IEEE 802.11w (management frame protection) +# This version is an experimental implementation based on IEEE 802.11w/D1.0 +# draft and is subject to change since the standard has not yet been finalized. +# Driver support is also needed for IEEE 802.11w. +CONFIG_IEEE80211W=y + +# Integrated EAP server +CONFIG_EAP=y + +# EAP-MD5 for the integrated EAP server +CONFIG_EAP_MD5=y + +# EAP-TLS for the integrated EAP server +CONFIG_EAP_TLS=y + +# EAP-MSCHAPv2 for the integrated EAP server +CONFIG_EAP_MSCHAPV2=y + +# EAP-PEAP for the integrated EAP server +CONFIG_EAP_PEAP=y + +# EAP-GTC for the integrated EAP server +CONFIG_EAP_GTC=y + +# EAP-TTLS for the integrated EAP server +CONFIG_EAP_TTLS=y + +# EAP-SIM for the integrated EAP server +CONFIG_EAP_SIM=y + +# EAP-AKA for the integrated EAP server +CONFIG_EAP_AKA=y + +# EAP-PAX for the integrated EAP server +CONFIG_EAP_PAX=y + +# EAP-PSK for the integrated EAP server (this is _not_ needed for WPA-PSK) +CONFIG_EAP_PSK=y + +# EAP-SAKE for the integrated EAP server +CONFIG_EAP_SAKE=y + +# EAP-GPSK for the integrated EAP server +CONFIG_EAP_GPSK=y +# Include support for optional SHA256 cipher suite in EAP-GPSK +CONFIG_EAP_GPSK_SHA256=y + +# PKCS#12 (PFX) support (used to read private key and certificate file from +# a file that usually has extension .p12 or .pfx) +CONFIG_PKCS12=y + +# RADIUS authentication server. This provides access to the integrated EAP +# server from external hosts using RADIUS. +CONFIG_RADIUS_SERVER=y + +# Build IPv6 support for RADIUS operations +CONFIG_IPV6=y + +CONFIG_DRIVER_NL80211=y + +CONFIG_IEEE80211N=y + +CONFIG_LIBNL32=y + +CONFIG_ACS=y + +CONFIG_IEEE80211AC=y + +CONFIG_OPENVSWITCH=y Deleted: community-i686/hostapd-2.3-noscan.patch =================================================================== --- community-i686/hostapd-2.3-noscan.patch 2016-10-04 18:20:10 UTC (rev 191334) +++ community-i686/hostapd-2.3-noscan.patch 2016-10-04 18:20:37 UTC (rev 191335) @@ -1,54 +0,0 @@ ---- a/hostapd/config_file.c -+++ b/hostapd/config_file.c -@@ -2639,6 +2639,8 @@ static int hostapd_config_fill(struct ho - } - #endif /* CONFIG_IEEE80211W */ - #ifdef CONFIG_IEEE80211N -+ } else if (os_strcmp(buf, "noscan") == 0) { -+ conf->noscan = atoi(pos); - } else if (os_strcmp(buf, "ieee80211n") == 0) { - conf->ieee80211n = atoi(pos); - } else if (os_strcmp(buf, "ht_capab") == 0) { ---- a/src/ap/ap_config.h -+++ b/src/ap/ap_config.h -@@ -576,6 +576,7 @@ struct hostapd_config { - - int ht_op_mode_fixed; - u16 ht_capab; -+ int noscan; - int ieee80211n; - int secondary_channel; - int require_ht; ---- a/src/ap/hw_features.c -+++ b/src/ap/hw_features.c -@@ -690,7 +690,7 @@ static int ieee80211n_check_40mhz(struct - struct wpa_driver_scan_params params; - int ret; - -- if (!iface->conf->secondary_channel) -+ if (!iface->conf->secondary_channel || iface->conf->noscan) - return 0; /* HT40 not used */ - - hostapd_set_state(iface, HAPD_IFACE_HT_SCAN); ---- a/src/ap/ieee802_11_ht.c -+++ b/src/ap/ieee802_11_ht.c -@@ -220,6 +220,9 @@ void hostapd_2040_coex_action(struct hos - if (!(iface->conf->ht_capab & HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET)) - return; - -+ if (iface->conf->noscan) -+ return; -+ - if (len < IEEE80211_HDRLEN + 2 + sizeof(*bc_ie)) - return; - -@@ -317,6 +320,9 @@ void ht40_intolerant_add(struct hostapd_ - if (iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G) - return; - -+ if (iface->conf->noscan) -+ return; -+ - wpa_printf(MSG_INFO, "HT: Forty MHz Intolerant is set by STA " MACSTR - " in Association Request", MAC2STR(sta->addr)); - Copied: hostapd/repos/community-i686/hostapd-2.3-noscan.patch (from rev 191334, hostapd/trunk/hostapd-2.3-noscan.patch) =================================================================== --- community-i686/hostapd-2.3-noscan.patch (rev 0) +++ community-i686/hostapd-2.3-noscan.patch 2016-10-04 18:20:37 UTC (rev 191335) @@ -0,0 +1,58 @@ +diff -wbBur hostapd-2.6/hostapd/config_file.c hostapd-2.6.my/hostapd/config_file.c +--- hostapd-2.6/hostapd/config_file.c 2016-10-02 21:51:11.000000000 +0300 ++++ hostapd-2.6.my/hostapd/config_file.c 2016-10-04 21:14:04.986440035 +0300 +@@ -2863,6 +2863,8 @@ + } + #endif /* CONFIG_IEEE80211W */ + #ifdef CONFIG_IEEE80211N ++ } else if (os_strcmp(buf, "noscan") == 0) { ++ conf->noscan = atoi(pos); + } else if (os_strcmp(buf, "ieee80211n") == 0) { + conf->ieee80211n = atoi(pos); + } else if (os_strcmp(buf, "ht_capab") == 0) { +diff -wbBur hostapd-2.6/src/ap/ap_config.h hostapd-2.6.my/src/ap/ap_config.h +--- hostapd-2.6/src/ap/ap_config.h 2016-10-02 21:51:11.000000000 +0300 ++++ hostapd-2.6.my/src/ap/ap_config.h 2016-10-04 21:14:04.986440035 +0300 +@@ -664,6 +664,7 @@ + + int ht_op_mode_fixed; + u16 ht_capab; ++ int noscan; + int ieee80211n; + int secondary_channel; + int no_pri_sec_switch; +diff -wbBur hostapd-2.6/src/ap/hw_features.c hostapd-2.6.my/src/ap/hw_features.c +--- hostapd-2.6/src/ap/hw_features.c 2016-10-02 21:51:11.000000000 +0300 ++++ hostapd-2.6.my/src/ap/hw_features.c 2016-10-04 21:15:19.323105847 +0300 +@@ -226,7 +226,7 @@ + { + int pri_chan, sec_chan; + +- if (!iface->conf->secondary_channel) ++ if (!iface->conf->secondary_channel || iface->conf->noscan) + return 1; /* HT40 not used */ + + pri_chan = iface->conf->channel; +diff -wbBur hostapd-2.6/src/ap/ieee802_11_ht.c hostapd-2.6.my/src/ap/ieee802_11_ht.c +--- hostapd-2.6/src/ap/ieee802_11_ht.c 2016-10-02 21:51:11.000000000 +0300 ++++ hostapd-2.6.my/src/ap/ieee802_11_ht.c 2016-10-04 21:14:04.989773368 +0300 +@@ -244,6 +244,9 @@ + if (!(iface->conf->ht_capab & HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET)) + return; + ++ if (iface->conf->noscan) ++ return; ++ + if (len < IEEE80211_HDRLEN + 2 + sizeof(*bc_ie)) + return; + +@@ -368,6 +371,9 @@ + if (iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G) + return; + ++ if (iface->conf->noscan) ++ return; ++ + wpa_printf(MSG_INFO, "HT: Forty MHz Intolerant is set by STA " MACSTR + " in Association Request", MAC2STR(sta->addr)); + Deleted: community-i686/hostapd.install =================================================================== --- community-i686/hostapd.install 2016-10-04 18:20:10 UTC (rev 191334) +++ community-i686/hostapd.install 2016-10-04 18:20:37 UTC (rev 191335) @@ -1,3 +0,0 @@ -post_install() { - echo "> More info: https://wiki.archlinux.org/index.php/Software_Access_Point" -} Copied: hostapd/repos/community-i686/hostapd.install (from rev 191334, hostapd/trunk/hostapd.install) =================================================================== --- community-i686/hostapd.install (rev 0) +++ community-i686/hostapd.install 2016-10-04 18:20:37 UTC (rev 191335) @@ -0,0 +1,3 @@ +post_install() { + echo "> More info: https://wiki.archlinux.org/index.php/Software_Access_Point" +} Deleted: community-i686/hostapd.service =================================================================== --- community-i686/hostapd.service 2016-10-04 18:20:10 UTC (rev 191334) +++ community-i686/hostapd.service 2016-10-04 18:20:37 UTC (rev 191335) @@ -1,10 +0,0 @@ -[Unit] -Description=Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator -After=network.target - -[Service] -ExecStart=/usr/bin/hostapd /etc/hostapd/hostapd.conf -ExecReload=/bin/kill -HUP $MAINPID - -[Install] -WantedBy=multi-user.target Copied: hostapd/repos/community-i686/hostapd.service (from rev 191334, hostapd/trunk/hostapd.service) =================================================================== --- community-i686/hostapd.service (rev 0) +++ community-i686/hostapd.service 2016-10-04 18:20:37 UTC (rev 191335) @@ -0,0 +1,10 @@ +[Unit] +Description=Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator +After=network.target + +[Service] +ExecStart=/usr/bin/hostapd /etc/hostapd/hostapd.conf +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target Deleted: community-i686/openvswitch.patch =================================================================== --- community-i686/openvswitch.patch 2016-10-04 18:20:10 UTC (rev 191334) +++ community-i686/openvswitch.patch 2016-10-04 18:20:37 UTC (rev 191335) @@ -1,153 +0,0 @@ -diff --git a/src/drivers/drivers.mak b/src/drivers/drivers.mak -index 9434078..7d8786c 100644 ---- a/src/drivers/drivers.mak -+++ b/src/drivers/drivers.mak -@@ -145,6 +145,10 @@ DRV_WPA_OBJS += ../src/drivers/driver_wext.o - NEED_RFKILL=y - endif - -+ifdef CONFIG_OPENVSWITCH -+DRV_CFLAGS += -DCONFIG_OPENVSWITCH -+endif -+ - ifdef NEED_NETLINK - DRV_OBJS += ../src/drivers/netlink.o - endif -diff --git a/src/drivers/drivers.mk b/src/drivers/drivers.mk -index 8da4c53..4cee638 100644 ---- a/src/drivers/drivers.mk -+++ b/src/drivers/drivers.mk -@@ -132,6 +132,10 @@ DRV_WPA_OBJS += src/drivers/driver_wext.c - NEED_RFKILL=y - endif - -+ifdef CONFIG_OPENVSWITCH -+DRV_CFLAGS += -DCONFIG_OPENVSWITCH -+endif -+ - ifdef NEED_NETLINK - DRV_OBJS += src/drivers/netlink.c - endif -diff --git a/src/drivers/linux_ioctl.c b/src/drivers/linux_ioctl.c -index 837971d..f666e27 100644 ---- a/src/drivers/linux_ioctl.c -+++ b/src/drivers/linux_ioctl.c -@@ -14,6 +14,69 @@ - #include "utils/common.h" - #include "linux_ioctl.h" - -+#ifdef CONFIG_OPENVSWITCH -+#include <sys/wait.h> -+#include <sys/stat.h> -+ -+#define run_prog(p, ...) ({ \ -+ struct stat q; \ -+ int rc = -1, status; \ -+ if(stat(p, &q) == 0) \ -+ { \ -+ pid_t pid = fork(); \ -+ if (!pid) \ -+ exit(execl(p, p, ##__VA_ARGS__, NULL)); \ -+ if (pid < 0) { \ -+ rc = -1; \ -+ } else { \ -+ while ((rc = waitpid(pid, &status, 0)) == -1 && errno == EINTR); \ -+ rc = (rc == pid && WIFEXITED(status)) ? WEXITSTATUS(status) : -1; \ -+ } \ -+ } \ -+ rc; \ -+}) -+ -+int ovs_br_get(char *brname, const char *ifname) -+{ -+ FILE *f; -+ char cmd[64]; -+ char *c; -+ struct stat q; -+ -+ if(stat("/usr/bin/ovs-vsctl", &q) != 0) -+ return -1; -+ -+ brname[0] = '\0'; -+ sprintf(cmd, "/usr/bin/ovs-vsctl iface-to-br %s", ifname); -+ f = popen(cmd, "r"); -+ if (!f) -+ return -1; -+ c = fgets(brname, IFNAMSIZ, f); -+ pclose(f); -+ if (c && strlen(brname)) { -+ /* Ignore newline */ -+ if ((c = strchr(brname, '\n'))) -+ *c = '\0'; -+ return 0; -+ } -+ return -1; -+} -+ -+int ovs_br_add_if(const char *brname, const char *ifname) -+{ -+ if (run_prog("/usr/bin/ovs-vsctl", "add-port", brname, ifname)) -+ return -1; -+ return 0; -+} -+ -+int ovs_br_del_if(const char *brname, const char *ifname) -+{ -+ if (run_prog("/usr/bin/ovs-vsctl", "del-port", brname, ifname)) -+ return -1; -+ return 0; -+} -+ -+#endif - - int linux_set_iface_flags(int sock, const char *ifname, int dev_up) - { -@@ -118,7 +181,6 @@ int linux_set_ifhwaddr(int sock, const char *ifname, const u8 *addr) - return 0; - } - -- - #ifndef SIOCBRADDBR - #define SIOCBRADDBR 0x89a0 - #endif -@@ -162,6 +224,11 @@ int linux_br_add_if(int sock, const char *brname, const char *ifname) - struct ifreq ifr; - int ifindex; - -+#ifdef CONFIG_OPENVSWITCH -+ if (!ovs_br_add_if(brname, ifname)) -+ return 0; -+#endif -+ - ifindex = if_nametoindex(ifname); - if (ifindex == 0) - return -1; -@@ -184,6 +251,11 @@ int linux_br_del_if(int sock, const char *brname, const char *ifname) - struct ifreq ifr; - int ifindex; - -+#ifdef CONFIG_OPENVSWITCH -+ if (!ovs_br_del_if(brname, ifname)) -+ return 0; -+#endif -+ - ifindex = if_nametoindex(ifname); - if (ifindex == 0) - return -1; -@@ -206,6 +278,11 @@ int linux_br_get(char *brname, const char *ifname) - char path[128], brlink[128], *pos; - ssize_t res; - -+#ifdef CONFIG_OPENVSWITCH -+ if (!ovs_br_get(brname, ifname)) -+ return 0; -+#endif -+ - os_snprintf(path, sizeof(path), "/sys/class/net/%s/brport/bridge", - ifname); - res = readlink(path, brlink, sizeof(brlink)); -@@ -219,3 +296,4 @@ int linux_br_get(char *brname, const char *ifname) - os_strlcpy(brname, pos, IFNAMSIZ); - return 0; - } -+ Copied: hostapd/repos/community-i686/openvswitch.patch (from rev 191334, hostapd/trunk/openvswitch.patch) =================================================================== --- community-i686/openvswitch.patch (rev 0) +++ community-i686/openvswitch.patch 2016-10-04 18:20:37 UTC (rev 191335) @@ -0,0 +1,153 @@ +diff --git a/src/drivers/drivers.mak b/src/drivers/drivers.mak +index 9434078..7d8786c 100644 +--- a/src/drivers/drivers.mak ++++ b/src/drivers/drivers.mak +@@ -145,6 +145,10 @@ DRV_WPA_OBJS += ../src/drivers/driver_wext.o + NEED_RFKILL=y + endif + ++ifdef CONFIG_OPENVSWITCH ++DRV_CFLAGS += -DCONFIG_OPENVSWITCH ++endif ++ + ifdef NEED_NETLINK + DRV_OBJS += ../src/drivers/netlink.o + endif +diff --git a/src/drivers/drivers.mk b/src/drivers/drivers.mk +index 8da4c53..4cee638 100644 +--- a/src/drivers/drivers.mk ++++ b/src/drivers/drivers.mk +@@ -132,6 +132,10 @@ DRV_WPA_OBJS += src/drivers/driver_wext.c + NEED_RFKILL=y + endif + ++ifdef CONFIG_OPENVSWITCH ++DRV_CFLAGS += -DCONFIG_OPENVSWITCH ++endif ++ + ifdef NEED_NETLINK + DRV_OBJS += src/drivers/netlink.c + endif +diff --git a/src/drivers/linux_ioctl.c b/src/drivers/linux_ioctl.c +index 837971d..f666e27 100644 +--- a/src/drivers/linux_ioctl.c ++++ b/src/drivers/linux_ioctl.c +@@ -14,6 +14,69 @@ + #include "utils/common.h" + #include "linux_ioctl.h" + ++#ifdef CONFIG_OPENVSWITCH ++#include <sys/wait.h> ++#include <sys/stat.h> ++ ++#define run_prog(p, ...) ({ \ ++ struct stat q; \ ++ int rc = -1, status; \ ++ if(stat(p, &q) == 0) \ ++ { \ ++ pid_t pid = fork(); \ ++ if (!pid) \ ++ exit(execl(p, p, ##__VA_ARGS__, NULL)); \ ++ if (pid < 0) { \ ++ rc = -1; \ ++ } else { \ ++ while ((rc = waitpid(pid, &status, 0)) == -1 && errno == EINTR); \ ++ rc = (rc == pid && WIFEXITED(status)) ? WEXITSTATUS(status) : -1; \ ++ } \ ++ } \ ++ rc; \ ++}) ++ ++int ovs_br_get(char *brname, const char *ifname) ++{ ++ FILE *f; ++ char cmd[64]; ++ char *c; ++ struct stat q; ++ ++ if(stat("/usr/bin/ovs-vsctl", &q) != 0) ++ return -1; ++ ++ brname[0] = '\0'; ++ sprintf(cmd, "/usr/bin/ovs-vsctl iface-to-br %s", ifname); ++ f = popen(cmd, "r"); ++ if (!f) ++ return -1; ++ c = fgets(brname, IFNAMSIZ, f); ++ pclose(f); ++ if (c && strlen(brname)) { ++ /* Ignore newline */ ++ if ((c = strchr(brname, '\n'))) ++ *c = '\0'; ++ return 0; ++ } ++ return -1; ++} ++ ++int ovs_br_add_if(const char *brname, const char *ifname) ++{ ++ if (run_prog("/usr/bin/ovs-vsctl", "add-port", brname, ifname)) ++ return -1; ++ return 0; ++} ++ ++int ovs_br_del_if(const char *brname, const char *ifname) ++{ ++ if (run_prog("/usr/bin/ovs-vsctl", "del-port", brname, ifname)) ++ return -1; ++ return 0; ++} ++ ++#endif + + int linux_set_iface_flags(int sock, const char *ifname, int dev_up) + { +@@ -118,7 +181,6 @@ int linux_set_ifhwaddr(int sock, const char *ifname, const u8 *addr) + return 0; + } + +- + #ifndef SIOCBRADDBR + #define SIOCBRADDBR 0x89a0 + #endif +@@ -162,6 +224,11 @@ int linux_br_add_if(int sock, const char *brname, const char *ifname) + struct ifreq ifr; + int ifindex; + ++#ifdef CONFIG_OPENVSWITCH ++ if (!ovs_br_add_if(brname, ifname)) ++ return 0; ++#endif ++ + ifindex = if_nametoindex(ifname); + if (ifindex == 0) + return -1; +@@ -184,6 +251,11 @@ int linux_br_del_if(int sock, const char *brname, const char *ifname) + struct ifreq ifr; + int ifindex; + ++#ifdef CONFIG_OPENVSWITCH ++ if (!ovs_br_del_if(brname, ifname)) ++ return 0; ++#endif ++ + ifindex = if_nametoindex(ifname); + if (ifindex == 0) + return -1; +@@ -206,6 +278,11 @@ int linux_br_get(char *brname, const char *ifname) + char path[128], brlink[128], *pos; + ssize_t res; + ++#ifdef CONFIG_OPENVSWITCH ++ if (!ovs_br_get(brname, ifname)) ++ return 0; ++#endif ++ + os_snprintf(path, sizeof(path), "/sys/class/net/%s/brport/bridge", + ifname); + res = readlink(path, brlink, sizeof(brlink)); +@@ -219,3 +296,4 @@ int linux_br_get(char *brname, const char *ifname) + os_strlcpy(brname, pos, IFNAMSIZ); + return 0; + } ++ Deleted: community-x86_64/PKGBUILD =================================================================== --- community-x86_64/PKGBUILD 2016-10-04 18:20:10 UTC (rev 191334) +++ community-x86_64/PKGBUILD 2016-10-04 18:20:37 UTC (rev 191335) @@ -1,64 +0,0 @@ -# $Id$ -# Maintainer: Sergej Pupykin <pupykin.s+a...@gmail.com> - -pkgname=hostapd -pkgver=2.6 -pkgrel=1 -pkgdesc="IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator" -arch=('i686' 'x86_64') -url="http://w1.fi/hostapd/" -license=('custom') -depends=('openssl' 'libnl') -install=hostapd.install -options=(emptydirs) -source=(http://w1.fi/releases/$pkgname-$pkgver.tar.gz - config - hostapd.service - hostapd-2.3-noscan.patch - openvswitch.patch) -md5sums=('eaa56dce9bd8f1d195eb62596eab34c7' - '43c0ec1d8b4d4e46f468bc161bb05c4b' - '380042b9cf4950e34ed34b3093ab9e7f' - 'eaf8e48a9a63b5902fddadff2b8933fa' - 'a0802a604ed957078da0e14863df74f0') - -prepare() { - cd $pkgname-$pkgver -# patch -p1 <$srcdir/hostapd-2.3-noscan.patch - patch -p1 <$srcdir/openvswitch.patch -} - -build() { - cd $pkgname-$pkgver/hostapd - cp ../../config .config - sed -i 's#/etc/hostapd#/etc/hostapd/hostapd#' hostapd.conf - export CFLAGS="$CFLAGS $(pkg-config --cflags libnl-3.0)" - make -} - -package() { - # Systemd unit - install -Dm644 hostapd.service "$pkgdir/usr/lib/systemd/system/hostapd.service" - - cd $pkgname-$pkgver - - # License - install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING" - - cd hostapd - - # Binaries - install -d "$pkgdir/usr/bin" - install -t "$pkgdir/usr/bin" hostapd hostapd_cli - - # Configuration - install -d "$pkgdir/etc/hostapd" - install -d "$pkgdir/usr/share/doc/hostapd" - install -m644 -t "$pkgdir/usr/share/doc/hostapd" \ - hostapd.{accept,conf,deny,eap_user,radius_clients,sim_db,vlan,wpa_psk} \ - wired.conf hlr_auc_gw.milenage_db - - # Man pages - install -Dm644 hostapd.8 "$pkgdir/usr/share/man/man8/hostapd.8" - install -Dm644 hostapd_cli.1 "$pkgdir/usr/share/man/man1/hostapd_cli.1" -} Copied: hostapd/repos/community-x86_64/PKGBUILD (from rev 191334, hostapd/trunk/PKGBUILD) =================================================================== --- community-x86_64/PKGBUILD (rev 0) +++ community-x86_64/PKGBUILD 2016-10-04 18:20:37 UTC (rev 191335) @@ -0,0 +1,64 @@ +# $Id$ +# Maintainer: Sergej Pupykin <pupykin.s+a...@gmail.com> + +pkgname=hostapd +pkgver=2.6 +pkgrel=2 +pkgdesc="IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator" +arch=('i686' 'x86_64') +url="http://w1.fi/hostapd/" +license=('custom') +depends=('openssl' 'libnl') +install=hostapd.install +options=(emptydirs) +source=(http://w1.fi/releases/$pkgname-$pkgver.tar.gz + config + hostapd.service + hostapd-2.3-noscan.patch + openvswitch.patch) +md5sums=('eaa56dce9bd8f1d195eb62596eab34c7' + '43c0ec1d8b4d4e46f468bc161bb05c4b' + '380042b9cf4950e34ed34b3093ab9e7f' + 'f3875fc2ac90d9b99501d690a0988857' + 'a0802a604ed957078da0e14863df74f0') + +prepare() { + cd $pkgname-$pkgver + patch -p1 <$srcdir/hostapd-2.3-noscan.patch + patch -p1 <$srcdir/openvswitch.patch +} + +build() { + cd $pkgname-$pkgver/hostapd + cp ../../config .config + sed -i 's#/etc/hostapd#/etc/hostapd/hostapd#' hostapd.conf + export CFLAGS="$CFLAGS $(pkg-config --cflags libnl-3.0)" + make +} + +package() { + # Systemd unit + install -Dm644 hostapd.service "$pkgdir/usr/lib/systemd/system/hostapd.service" + + cd $pkgname-$pkgver + + # License + install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING" + + cd hostapd + + # Binaries + install -d "$pkgdir/usr/bin" + install -t "$pkgdir/usr/bin" hostapd hostapd_cli + + # Configuration + install -d "$pkgdir/etc/hostapd" + install -d "$pkgdir/usr/share/doc/hostapd" + install -m644 -t "$pkgdir/usr/share/doc/hostapd" \ + hostapd.{accept,conf,deny,eap_user,radius_clients,sim_db,vlan,wpa_psk} \ + wired.conf hlr_auc_gw.milenage_db + + # Man pages + install -Dm644 hostapd.8 "$pkgdir/usr/share/man/man8/hostapd.8" + install -Dm644 hostapd_cli.1 "$pkgdir/usr/share/man/man1/hostapd_cli.1" +} Deleted: community-x86_64/config =================================================================== --- community-x86_64/config 2016-10-04 18:20:10 UTC (rev 191334) +++ community-x86_64/config 2016-10-04 18:20:37 UTC (rev 191335) @@ -1,98 +0,0 @@ -# Example hostapd build time configuration -# -# This file lists the configuration options that are used when building the -# hostapd binary. All lines starting with # are ignored. Configuration option -# lines must be commented out complete, if they are not to be included, i.e., -# just setting VARIABLE=n is not disabling that variable. -# -# This file is included in Makefile, so variables like CFLAGS and LIBS can also -# be modified from here. In most cass, these lines should use += in order not -# to override previous values of the variables. - -# Driver interface for Host AP driver -CONFIG_DRIVER_HOSTAP=y - -# Driver interface for wired authenticator -CONFIG_DRIVER_WIRED=y - -# Driver interface for Prism54 driver -CONFIG_DRIVER_PRISM54=y - -# IEEE 802.11F/IAPP -CONFIG_IAPP=y - -# WPA2/IEEE 802.11i RSN pre-authentication -CONFIG_RSN_PREAUTH=y - -# PeerKey handshake for Station to Station Link (IEEE 802.11e DLS) -CONFIG_PEERKEY=y - -# IEEE 802.11w (management frame protection) -# This version is an experimental implementation based on IEEE 802.11w/D1.0 -# draft and is subject to change since the standard has not yet been finalized. -# Driver support is also needed for IEEE 802.11w. -CONFIG_IEEE80211W=y - -# Integrated EAP server -CONFIG_EAP=y - -# EAP-MD5 for the integrated EAP server -CONFIG_EAP_MD5=y - -# EAP-TLS for the integrated EAP server -CONFIG_EAP_TLS=y - -# EAP-MSCHAPv2 for the integrated EAP server -CONFIG_EAP_MSCHAPV2=y - -# EAP-PEAP for the integrated EAP server -CONFIG_EAP_PEAP=y - -# EAP-GTC for the integrated EAP server -CONFIG_EAP_GTC=y - -# EAP-TTLS for the integrated EAP server -CONFIG_EAP_TTLS=y - -# EAP-SIM for the integrated EAP server -CONFIG_EAP_SIM=y - -# EAP-AKA for the integrated EAP server -CONFIG_EAP_AKA=y - -# EAP-PAX for the integrated EAP server -CONFIG_EAP_PAX=y - -# EAP-PSK for the integrated EAP server (this is _not_ needed for WPA-PSK) -CONFIG_EAP_PSK=y - -# EAP-SAKE for the integrated EAP server -CONFIG_EAP_SAKE=y - -# EAP-GPSK for the integrated EAP server -CONFIG_EAP_GPSK=y -# Include support for optional SHA256 cipher suite in EAP-GPSK -CONFIG_EAP_GPSK_SHA256=y - -# PKCS#12 (PFX) support (used to read private key and certificate file from -# a file that usually has extension .p12 or .pfx) -CONFIG_PKCS12=y - -# RADIUS authentication server. This provides access to the integrated EAP -# server from external hosts using RADIUS. -CONFIG_RADIUS_SERVER=y - -# Build IPv6 support for RADIUS operations -CONFIG_IPV6=y - -CONFIG_DRIVER_NL80211=y - -CONFIG_IEEE80211N=y - -CONFIG_LIBNL32=y - -CONFIG_ACS=y - -CONFIG_IEEE80211AC=y - -CONFIG_OPENVSWITCH=y Copied: hostapd/repos/community-x86_64/config (from rev 191334, hostapd/trunk/config) =================================================================== --- community-x86_64/config (rev 0) +++ community-x86_64/config 2016-10-04 18:20:37 UTC (rev 191335) @@ -0,0 +1,98 @@ +# Example hostapd build time configuration +# +# This file lists the configuration options that are used when building the +# hostapd binary. All lines starting with # are ignored. Configuration option +# lines must be commented out complete, if they are not to be included, i.e., +# just setting VARIABLE=n is not disabling that variable. +# +# This file is included in Makefile, so variables like CFLAGS and LIBS can also +# be modified from here. In most cass, these lines should use += in order not +# to override previous values of the variables. + +# Driver interface for Host AP driver +CONFIG_DRIVER_HOSTAP=y + +# Driver interface for wired authenticator +CONFIG_DRIVER_WIRED=y + +# Driver interface for Prism54 driver +CONFIG_DRIVER_PRISM54=y + +# IEEE 802.11F/IAPP +CONFIG_IAPP=y + +# WPA2/IEEE 802.11i RSN pre-authentication +CONFIG_RSN_PREAUTH=y + +# PeerKey handshake for Station to Station Link (IEEE 802.11e DLS) +CONFIG_PEERKEY=y + +# IEEE 802.11w (management frame protection) +# This version is an experimental implementation based on IEEE 802.11w/D1.0 +# draft and is subject to change since the standard has not yet been finalized. +# Driver support is also needed for IEEE 802.11w. +CONFIG_IEEE80211W=y + +# Integrated EAP server +CONFIG_EAP=y + +# EAP-MD5 for the integrated EAP server +CONFIG_EAP_MD5=y + +# EAP-TLS for the integrated EAP server +CONFIG_EAP_TLS=y + +# EAP-MSCHAPv2 for the integrated EAP server +CONFIG_EAP_MSCHAPV2=y + +# EAP-PEAP for the integrated EAP server +CONFIG_EAP_PEAP=y + +# EAP-GTC for the integrated EAP server +CONFIG_EAP_GTC=y + +# EAP-TTLS for the integrated EAP server +CONFIG_EAP_TTLS=y + +# EAP-SIM for the integrated EAP server +CONFIG_EAP_SIM=y + +# EAP-AKA for the integrated EAP server +CONFIG_EAP_AKA=y + +# EAP-PAX for the integrated EAP server +CONFIG_EAP_PAX=y + +# EAP-PSK for the integrated EAP server (this is _not_ needed for WPA-PSK) +CONFIG_EAP_PSK=y + +# EAP-SAKE for the integrated EAP server +CONFIG_EAP_SAKE=y + +# EAP-GPSK for the integrated EAP server +CONFIG_EAP_GPSK=y +# Include support for optional SHA256 cipher suite in EAP-GPSK +CONFIG_EAP_GPSK_SHA256=y + +# PKCS#12 (PFX) support (used to read private key and certificate file from +# a file that usually has extension .p12 or .pfx) +CONFIG_PKCS12=y + +# RADIUS authentication server. This provides access to the integrated EAP +# server from external hosts using RADIUS. +CONFIG_RADIUS_SERVER=y + +# Build IPv6 support for RADIUS operations +CONFIG_IPV6=y + +CONFIG_DRIVER_NL80211=y + +CONFIG_IEEE80211N=y + +CONFIG_LIBNL32=y + +CONFIG_ACS=y + +CONFIG_IEEE80211AC=y + +CONFIG_OPENVSWITCH=y Deleted: community-x86_64/hostapd-2.3-noscan.patch =================================================================== --- community-x86_64/hostapd-2.3-noscan.patch 2016-10-04 18:20:10 UTC (rev 191334) +++ community-x86_64/hostapd-2.3-noscan.patch 2016-10-04 18:20:37 UTC (rev 191335) @@ -1,54 +0,0 @@ ---- a/hostapd/config_file.c -+++ b/hostapd/config_file.c -@@ -2639,6 +2639,8 @@ static int hostapd_config_fill(struct ho - } - #endif /* CONFIG_IEEE80211W */ - #ifdef CONFIG_IEEE80211N -+ } else if (os_strcmp(buf, "noscan") == 0) { -+ conf->noscan = atoi(pos); - } else if (os_strcmp(buf, "ieee80211n") == 0) { - conf->ieee80211n = atoi(pos); - } else if (os_strcmp(buf, "ht_capab") == 0) { ---- a/src/ap/ap_config.h -+++ b/src/ap/ap_config.h -@@ -576,6 +576,7 @@ struct hostapd_config { - - int ht_op_mode_fixed; - u16 ht_capab; -+ int noscan; - int ieee80211n; - int secondary_channel; - int require_ht; ---- a/src/ap/hw_features.c -+++ b/src/ap/hw_features.c -@@ -690,7 +690,7 @@ static int ieee80211n_check_40mhz(struct - struct wpa_driver_scan_params params; - int ret; - -- if (!iface->conf->secondary_channel) -+ if (!iface->conf->secondary_channel || iface->conf->noscan) - return 0; /* HT40 not used */ - - hostapd_set_state(iface, HAPD_IFACE_HT_SCAN); ---- a/src/ap/ieee802_11_ht.c -+++ b/src/ap/ieee802_11_ht.c -@@ -220,6 +220,9 @@ void hostapd_2040_coex_action(struct hos - if (!(iface->conf->ht_capab & HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET)) - return; - -+ if (iface->conf->noscan) -+ return; -+ - if (len < IEEE80211_HDRLEN + 2 + sizeof(*bc_ie)) - return; - -@@ -317,6 +320,9 @@ void ht40_intolerant_add(struct hostapd_ - if (iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G) - return; - -+ if (iface->conf->noscan) -+ return; -+ - wpa_printf(MSG_INFO, "HT: Forty MHz Intolerant is set by STA " MACSTR - " in Association Request", MAC2STR(sta->addr)); - Copied: hostapd/repos/community-x86_64/hostapd-2.3-noscan.patch (from rev 191334, hostapd/trunk/hostapd-2.3-noscan.patch) =================================================================== --- community-x86_64/hostapd-2.3-noscan.patch (rev 0) +++ community-x86_64/hostapd-2.3-noscan.patch 2016-10-04 18:20:37 UTC (rev 191335) @@ -0,0 +1,58 @@ +diff -wbBur hostapd-2.6/hostapd/config_file.c hostapd-2.6.my/hostapd/config_file.c +--- hostapd-2.6/hostapd/config_file.c 2016-10-02 21:51:11.000000000 +0300 ++++ hostapd-2.6.my/hostapd/config_file.c 2016-10-04 21:14:04.986440035 +0300 +@@ -2863,6 +2863,8 @@ + } + #endif /* CONFIG_IEEE80211W */ + #ifdef CONFIG_IEEE80211N ++ } else if (os_strcmp(buf, "noscan") == 0) { ++ conf->noscan = atoi(pos); + } else if (os_strcmp(buf, "ieee80211n") == 0) { + conf->ieee80211n = atoi(pos); + } else if (os_strcmp(buf, "ht_capab") == 0) { +diff -wbBur hostapd-2.6/src/ap/ap_config.h hostapd-2.6.my/src/ap/ap_config.h +--- hostapd-2.6/src/ap/ap_config.h 2016-10-02 21:51:11.000000000 +0300 ++++ hostapd-2.6.my/src/ap/ap_config.h 2016-10-04 21:14:04.986440035 +0300 +@@ -664,6 +664,7 @@ + + int ht_op_mode_fixed; + u16 ht_capab; ++ int noscan; + int ieee80211n; + int secondary_channel; + int no_pri_sec_switch; +diff -wbBur hostapd-2.6/src/ap/hw_features.c hostapd-2.6.my/src/ap/hw_features.c +--- hostapd-2.6/src/ap/hw_features.c 2016-10-02 21:51:11.000000000 +0300 ++++ hostapd-2.6.my/src/ap/hw_features.c 2016-10-04 21:15:19.323105847 +0300 +@@ -226,7 +226,7 @@ + { + int pri_chan, sec_chan; + +- if (!iface->conf->secondary_channel) ++ if (!iface->conf->secondary_channel || iface->conf->noscan) + return 1; /* HT40 not used */ + + pri_chan = iface->conf->channel; +diff -wbBur hostapd-2.6/src/ap/ieee802_11_ht.c hostapd-2.6.my/src/ap/ieee802_11_ht.c +--- hostapd-2.6/src/ap/ieee802_11_ht.c 2016-10-02 21:51:11.000000000 +0300 ++++ hostapd-2.6.my/src/ap/ieee802_11_ht.c 2016-10-04 21:14:04.989773368 +0300 +@@ -244,6 +244,9 @@ + if (!(iface->conf->ht_capab & HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET)) + return; + ++ if (iface->conf->noscan) ++ return; ++ + if (len < IEEE80211_HDRLEN + 2 + sizeof(*bc_ie)) + return; + +@@ -368,6 +371,9 @@ + if (iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G) + return; + ++ if (iface->conf->noscan) ++ return; ++ + wpa_printf(MSG_INFO, "HT: Forty MHz Intolerant is set by STA " MACSTR + " in Association Request", MAC2STR(sta->addr)); + Deleted: community-x86_64/hostapd.install =================================================================== --- community-x86_64/hostapd.install 2016-10-04 18:20:10 UTC (rev 191334) +++ community-x86_64/hostapd.install 2016-10-04 18:20:37 UTC (rev 191335) @@ -1,3 +0,0 @@ -post_install() { - echo "> More info: https://wiki.archlinux.org/index.php/Software_Access_Point" -} Copied: hostapd/repos/community-x86_64/hostapd.install (from rev 191334, hostapd/trunk/hostapd.install) =================================================================== --- community-x86_64/hostapd.install (rev 0) +++ community-x86_64/hostapd.install 2016-10-04 18:20:37 UTC (rev 191335) @@ -0,0 +1,3 @@ +post_install() { + echo "> More info: https://wiki.archlinux.org/index.php/Software_Access_Point" +} Deleted: community-x86_64/hostapd.service =================================================================== --- community-x86_64/hostapd.service 2016-10-04 18:20:10 UTC (rev 191334) +++ community-x86_64/hostapd.service 2016-10-04 18:20:37 UTC (rev 191335) @@ -1,10 +0,0 @@ -[Unit] -Description=Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator -After=network.target - -[Service] -ExecStart=/usr/bin/hostapd /etc/hostapd/hostapd.conf -ExecReload=/bin/kill -HUP $MAINPID - -[Install] -WantedBy=multi-user.target Copied: hostapd/repos/community-x86_64/hostapd.service (from rev 191334, hostapd/trunk/hostapd.service) =================================================================== --- community-x86_64/hostapd.service (rev 0) +++ community-x86_64/hostapd.service 2016-10-04 18:20:37 UTC (rev 191335) @@ -0,0 +1,10 @@ +[Unit] +Description=Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator +After=network.target + +[Service] +ExecStart=/usr/bin/hostapd /etc/hostapd/hostapd.conf +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target Deleted: community-x86_64/openvswitch.patch =================================================================== --- community-x86_64/openvswitch.patch 2016-10-04 18:20:10 UTC (rev 191334) +++ community-x86_64/openvswitch.patch 2016-10-04 18:20:37 UTC (rev 191335) @@ -1,153 +0,0 @@ -diff --git a/src/drivers/drivers.mak b/src/drivers/drivers.mak -index 9434078..7d8786c 100644 ---- a/src/drivers/drivers.mak -+++ b/src/drivers/drivers.mak -@@ -145,6 +145,10 @@ DRV_WPA_OBJS += ../src/drivers/driver_wext.o - NEED_RFKILL=y - endif - -+ifdef CONFIG_OPENVSWITCH -+DRV_CFLAGS += -DCONFIG_OPENVSWITCH -+endif -+ - ifdef NEED_NETLINK - DRV_OBJS += ../src/drivers/netlink.o - endif -diff --git a/src/drivers/drivers.mk b/src/drivers/drivers.mk -index 8da4c53..4cee638 100644 ---- a/src/drivers/drivers.mk -+++ b/src/drivers/drivers.mk -@@ -132,6 +132,10 @@ DRV_WPA_OBJS += src/drivers/driver_wext.c - NEED_RFKILL=y - endif - -+ifdef CONFIG_OPENVSWITCH -+DRV_CFLAGS += -DCONFIG_OPENVSWITCH -+endif -+ - ifdef NEED_NETLINK - DRV_OBJS += src/drivers/netlink.c - endif -diff --git a/src/drivers/linux_ioctl.c b/src/drivers/linux_ioctl.c -index 837971d..f666e27 100644 ---- a/src/drivers/linux_ioctl.c -+++ b/src/drivers/linux_ioctl.c -@@ -14,6 +14,69 @@ - #include "utils/common.h" - #include "linux_ioctl.h" - -+#ifdef CONFIG_OPENVSWITCH -+#include <sys/wait.h> -+#include <sys/stat.h> -+ -+#define run_prog(p, ...) ({ \ -+ struct stat q; \ -+ int rc = -1, status; \ -+ if(stat(p, &q) == 0) \ -+ { \ -+ pid_t pid = fork(); \ -+ if (!pid) \ -+ exit(execl(p, p, ##__VA_ARGS__, NULL)); \ -+ if (pid < 0) { \ -+ rc = -1; \ -+ } else { \ -+ while ((rc = waitpid(pid, &status, 0)) == -1 && errno == EINTR); \ -+ rc = (rc == pid && WIFEXITED(status)) ? WEXITSTATUS(status) : -1; \ -+ } \ -+ } \ -+ rc; \ -+}) -+ -+int ovs_br_get(char *brname, const char *ifname) -+{ -+ FILE *f; -+ char cmd[64]; -+ char *c; -+ struct stat q; -+ -+ if(stat("/usr/bin/ovs-vsctl", &q) != 0) -+ return -1; -+ -+ brname[0] = '\0'; -+ sprintf(cmd, "/usr/bin/ovs-vsctl iface-to-br %s", ifname); -+ f = popen(cmd, "r"); -+ if (!f) -+ return -1; -+ c = fgets(brname, IFNAMSIZ, f); -+ pclose(f); -+ if (c && strlen(brname)) { -+ /* Ignore newline */ -+ if ((c = strchr(brname, '\n'))) -+ *c = '\0'; -+ return 0; -+ } -+ return -1; -+} -+ -+int ovs_br_add_if(const char *brname, const char *ifname) -+{ -+ if (run_prog("/usr/bin/ovs-vsctl", "add-port", brname, ifname)) -+ return -1; -+ return 0; -+} -+ -+int ovs_br_del_if(const char *brname, const char *ifname) -+{ -+ if (run_prog("/usr/bin/ovs-vsctl", "del-port", brname, ifname)) -+ return -1; -+ return 0; -+} -+ -+#endif - - int linux_set_iface_flags(int sock, const char *ifname, int dev_up) - { -@@ -118,7 +181,6 @@ int linux_set_ifhwaddr(int sock, const char *ifname, const u8 *addr) - return 0; - } - -- - #ifndef SIOCBRADDBR - #define SIOCBRADDBR 0x89a0 - #endif -@@ -162,6 +224,11 @@ int linux_br_add_if(int sock, const char *brname, const char *ifname) - struct ifreq ifr; - int ifindex; - -+#ifdef CONFIG_OPENVSWITCH -+ if (!ovs_br_add_if(brname, ifname)) -+ return 0; -+#endif -+ - ifindex = if_nametoindex(ifname); - if (ifindex == 0) - return -1; -@@ -184,6 +251,11 @@ int linux_br_del_if(int sock, const char *brname, const char *ifname) - struct ifreq ifr; - int ifindex; - -+#ifdef CONFIG_OPENVSWITCH -+ if (!ovs_br_del_if(brname, ifname)) -+ return 0; -+#endif -+ - ifindex = if_nametoindex(ifname); - if (ifindex == 0) - return -1; -@@ -206,6 +278,11 @@ int linux_br_get(char *brname, const char *ifname) - char path[128], brlink[128], *pos; - ssize_t res; - -+#ifdef CONFIG_OPENVSWITCH -+ if (!ovs_br_get(brname, ifname)) -+ return 0; -+#endif -+ - os_snprintf(path, sizeof(path), "/sys/class/net/%s/brport/bridge", - ifname); - res = readlink(path, brlink, sizeof(brlink)); -@@ -219,3 +296,4 @@ int linux_br_get(char *brname, const char *ifname) - os_strlcpy(brname, pos, IFNAMSIZ); - return 0; - } -+ Copied: hostapd/repos/community-x86_64/openvswitch.patch (from rev 191334, hostapd/trunk/openvswitch.patch) =================================================================== --- community-x86_64/openvswitch.patch (rev 0) +++ community-x86_64/openvswitch.patch 2016-10-04 18:20:37 UTC (rev 191335) @@ -0,0 +1,153 @@ +diff --git a/src/drivers/drivers.mak b/src/drivers/drivers.mak +index 9434078..7d8786c 100644 +--- a/src/drivers/drivers.mak ++++ b/src/drivers/drivers.mak +@@ -145,6 +145,10 @@ DRV_WPA_OBJS += ../src/drivers/driver_wext.o + NEED_RFKILL=y + endif + ++ifdef CONFIG_OPENVSWITCH ++DRV_CFLAGS += -DCONFIG_OPENVSWITCH ++endif ++ + ifdef NEED_NETLINK + DRV_OBJS += ../src/drivers/netlink.o + endif +diff --git a/src/drivers/drivers.mk b/src/drivers/drivers.mk +index 8da4c53..4cee638 100644 +--- a/src/drivers/drivers.mk ++++ b/src/drivers/drivers.mk +@@ -132,6 +132,10 @@ DRV_WPA_OBJS += src/drivers/driver_wext.c + NEED_RFKILL=y + endif + ++ifdef CONFIG_OPENVSWITCH ++DRV_CFLAGS += -DCONFIG_OPENVSWITCH ++endif ++ + ifdef NEED_NETLINK + DRV_OBJS += src/drivers/netlink.c + endif +diff --git a/src/drivers/linux_ioctl.c b/src/drivers/linux_ioctl.c +index 837971d..f666e27 100644 +--- a/src/drivers/linux_ioctl.c ++++ b/src/drivers/linux_ioctl.c +@@ -14,6 +14,69 @@ + #include "utils/common.h" + #include "linux_ioctl.h" + ++#ifdef CONFIG_OPENVSWITCH ++#include <sys/wait.h> ++#include <sys/stat.h> ++ ++#define run_prog(p, ...) ({ \ ++ struct stat q; \ ++ int rc = -1, status; \ ++ if(stat(p, &q) == 0) \ ++ { \ ++ pid_t pid = fork(); \ ++ if (!pid) \ ++ exit(execl(p, p, ##__VA_ARGS__, NULL)); \ ++ if (pid < 0) { \ ++ rc = -1; \ ++ } else { \ ++ while ((rc = waitpid(pid, &status, 0)) == -1 && errno == EINTR); \ ++ rc = (rc == pid && WIFEXITED(status)) ? WEXITSTATUS(status) : -1; \ ++ } \ ++ } \ ++ rc; \ ++}) ++ ++int ovs_br_get(char *brname, const char *ifname) ++{ ++ FILE *f; ++ char cmd[64]; ++ char *c; ++ struct stat q; ++ ++ if(stat("/usr/bin/ovs-vsctl", &q) != 0) ++ return -1; ++ ++ brname[0] = '\0'; ++ sprintf(cmd, "/usr/bin/ovs-vsctl iface-to-br %s", ifname); ++ f = popen(cmd, "r"); ++ if (!f) ++ return -1; ++ c = fgets(brname, IFNAMSIZ, f); ++ pclose(f); ++ if (c && strlen(brname)) { ++ /* Ignore newline */ ++ if ((c = strchr(brname, '\n'))) ++ *c = '\0'; ++ return 0; ++ } ++ return -1; ++} ++ ++int ovs_br_add_if(const char *brname, const char *ifname) ++{ ++ if (run_prog("/usr/bin/ovs-vsctl", "add-port", brname, ifname)) ++ return -1; ++ return 0; ++} ++ ++int ovs_br_del_if(const char *brname, const char *ifname) ++{ ++ if (run_prog("/usr/bin/ovs-vsctl", "del-port", brname, ifname)) ++ return -1; ++ return 0; ++} ++ ++#endif + + int linux_set_iface_flags(int sock, const char *ifname, int dev_up) + { +@@ -118,7 +181,6 @@ int linux_set_ifhwaddr(int sock, const char *ifname, const u8 *addr) + return 0; + } + +- + #ifndef SIOCBRADDBR + #define SIOCBRADDBR 0x89a0 + #endif +@@ -162,6 +224,11 @@ int linux_br_add_if(int sock, const char *brname, const char *ifname) + struct ifreq ifr; + int ifindex; + ++#ifdef CONFIG_OPENVSWITCH ++ if (!ovs_br_add_if(brname, ifname)) ++ return 0; ++#endif ++ + ifindex = if_nametoindex(ifname); + if (ifindex == 0) + return -1; +@@ -184,6 +251,11 @@ int linux_br_del_if(int sock, const char *brname, const char *ifname) + struct ifreq ifr; + int ifindex; + ++#ifdef CONFIG_OPENVSWITCH ++ if (!ovs_br_del_if(brname, ifname)) ++ return 0; ++#endif ++ + ifindex = if_nametoindex(ifname); + if (ifindex == 0) + return -1; +@@ -206,6 +278,11 @@ int linux_br_get(char *brname, const char *ifname) + char path[128], brlink[128], *pos; + ssize_t res; + ++#ifdef CONFIG_OPENVSWITCH ++ if (!ovs_br_get(brname, ifname)) ++ return 0; ++#endif ++ + os_snprintf(path, sizeof(path), "/sys/class/net/%s/brport/bridge", + ifname); + res = readlink(path, brlink, sizeof(brlink)); +@@ -219,3 +296,4 @@ int linux_br_get(char *brname, const char *ifname) + os_strlcpy(brname, pos, IFNAMSIZ); + return 0; + } ++