[arch-commits] Commit in hostapd/repos/community-x86_64 (10 files)
Sergej Pupykin
spupykin at archlinux.org
Fri Aug 9 16:12:05 UTC 2019
Date: Friday, August 9, 2019 @ 16:12:04
Author: spupykin
Revision: 498537
archrelease: copy trunk to community-x86_64
Added:
hostapd/repos/community-x86_64/PKGBUILD
(from rev 498536, hostapd/trunk/PKGBUILD)
hostapd/repos/community-x86_64/config
(from rev 498536, hostapd/trunk/config)
hostapd/repos/community-x86_64/hostapd-noscan.patch
(from rev 498536, hostapd/trunk/hostapd-noscan.patch)
hostapd/repos/community-x86_64/hostapd.service
(from rev 498536, hostapd/trunk/hostapd.service)
hostapd/repos/community-x86_64/openvswitch.patch
(from rev 498536, hostapd/trunk/openvswitch.patch)
Deleted:
hostapd/repos/community-x86_64/PKGBUILD
hostapd/repos/community-x86_64/config
hostapd/repos/community-x86_64/hostapd-noscan.patch
hostapd/repos/community-x86_64/hostapd.service
hostapd/repos/community-x86_64/openvswitch.patch
----------------------+
PKGBUILD | 140 ++++++++++++-------------
config | 215 +++++++++++++++++++-------------------
hostapd-noscan.patch | 152 +++++++++++++--------------
hostapd.service | 20 +--
openvswitch.patch | 274 ++++++++++++++++++++++++-------------------------
5 files changed, 402 insertions(+), 399 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2019-08-09 16:11:52 UTC (rev 498536)
+++ PKGBUILD 2019-08-09 16:12:04 UTC (rev 498537)
@@ -1,70 +0,0 @@
-# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
-
-pkgname=hostapd
-pkgver=2.8
-pkgrel=1
-pkgdesc="IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator"
-arch=('x86_64')
-url="https://w1.fi/hostapd/"
-license=(GPL)
-depends=('openssl' 'libnl')
-options=(emptydirs)
-validpgpkeys=('EC4AA0A991A5F2464582D52D2B6EF432EFC895FA') # Jouni Malinen
-source=(https://w1.fi/releases/$pkgname-$pkgver.tar.gz{,.asc}
- config
- hostapd.service
- hostapd-noscan.patch
- openvswitch.patch)
-sha256sums=('929f522be6eeec38c53147e7bc084df028f65f148a3f7e4fa6c4c3f955cee4b0'
- 'SKIP'
- 'a39e011bf0c3f2d21db8816a7e608a99b9d598c7b559d58d026f10e4359d428d'
- '989bc6855f44c0b360e3d4cd4a146c35b7c12f8a0ced627b4b033f58edcade8e'
- '5ad1aadcd7682e517cab6afb474df6b9abad1a08dbe2bb40571a1b91c33f6f09'
- '64c06b5f6f58923446fd9351c596c759dec130997677f8b9f013c8ce360fbd98')
-
-prepare() {
- cd $pkgname-$pkgver
- local i; for i in "${source[@]}"; do
- case $i in
- *.patch)
- msg2 "Applying patch $i"
- patch -p1 -i "$srcdir/$i"
- ;;
- esac
- done
-}
-
-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 498536, hostapd/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2019-08-09 16:12:04 UTC (rev 498537)
@@ -0,0 +1,70 @@
+# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+
+pkgname=hostapd
+pkgver=2.9
+pkgrel=1
+pkgdesc="IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator"
+arch=('x86_64')
+url="https://w1.fi/hostapd/"
+license=(GPL)
+depends=('openssl' 'libnl')
+options=(emptydirs)
+validpgpkeys=('EC4AA0A991A5F2464582D52D2B6EF432EFC895FA') # Jouni Malinen
+source=(https://w1.fi/releases/$pkgname-$pkgver.tar.gz{,.asc}
+ config
+ hostapd.service
+ hostapd-noscan.patch
+ openvswitch.patch)
+sha256sums=('881d7d6a90b2428479288d64233151448f8990ab4958e0ecaca7eeb3c9db2bd7'
+ 'SKIP'
+ '15c116def37d99d02bc46c05d031c12ee00064bbb4b4c8df0e43eb227ff6aafc'
+ '989bc6855f44c0b360e3d4cd4a146c35b7c12f8a0ced627b4b033f58edcade8e'
+ '5ad1aadcd7682e517cab6afb474df6b9abad1a08dbe2bb40571a1b91c33f6f09'
+ '64c06b5f6f58923446fd9351c596c759dec130997677f8b9f013c8ce360fbd98')
+
+prepare() {
+ cd $pkgname-$pkgver
+ local i; for i in "${source[@]}"; do
+ case $i in
+ *.patch)
+ msg2 "Applying patch $i"
+ patch -p1 -i "$srcdir/$i"
+ ;;
+ esac
+ done
+}
+
+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: config
===================================================================
--- config 2019-08-09 16:11:52 UTC (rev 498536)
+++ config 2019-08-09 16:12:04 UTC (rev 498537)
@@ -1,106 +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
-
-CONFIG_IEEE80211R=y
-
-CONFIG_WPS=y
-
-CONFIG_WPS2=y
-
-CONFIG_WPS_UPNP=y
Copied: hostapd/repos/community-x86_64/config (from rev 498536, hostapd/trunk/config)
===================================================================
--- config (rev 0)
+++ config 2019-08-09 16:12:04 UTC (rev 498537)
@@ -0,0 +1,109 @@
+# 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
+
+CONFIG_IEEE80211R=y
+
+CONFIG_WPS=y
+
+CONFIG_WPS2=y
+
+CONFIG_WPS_UPNP=y
+
+CONFIG_MESH=y
+CONFIG_SAE=y
Deleted: hostapd-noscan.patch
===================================================================
--- hostapd-noscan.patch 2019-08-09 16:11:52 UTC (rev 498536)
+++ hostapd-noscan.patch 2019-08-09 16:12:04 UTC (rev 498537)
@@ -1,76 +0,0 @@
-diff -wbBur hostapd-2.8/hostapd/config_file.c hostapd-2.8.q/hostapd/config_file.c
---- hostapd-2.8/hostapd/config_file.c 2019-04-21 10:10:22.000000000 +0300
-+++ hostapd-2.8.q/hostapd/config_file.c 2019-04-25 14:59:57.594749041 +0300
-@@ -2858,6 +2858,8 @@
- bss->wpa_gmk_rekey = atoi(pos);
- } else if (os_strcmp(buf, "wpa_ptk_rekey") == 0) {
- bss->wpa_ptk_rekey = atoi(pos);
-+ } else if (os_strcmp(buf, "noscan") == 0) {
-+ conf->noscan = atoi(pos);
- } else if (os_strcmp(buf, "wpa_group_update_count") == 0) {
- char *endp;
- unsigned long val = strtoul(pos, &endp, 0);
-@@ -3390,6 +3392,8 @@
- bss->ieee80211w = 1;
- #endif /* CONFIG_OCV */
- #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.8/src/ap/ap_config.h hostapd-2.8.q/src/ap/ap_config.h
---- hostapd-2.8/src/ap/ap_config.h 2019-04-21 10:10:22.000000000 +0300
-+++ hostapd-2.8.q/src/ap/ap_config.h 2019-04-25 15:01:32.981414600 +0300
-@@ -801,6 +801,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.8/src/ap/hw_features.c hostapd-2.8.q/src/ap/hw_features.c
---- hostapd-2.8/src/ap/hw_features.c 2019-04-21 10:10:22.000000000 +0300
-+++ hostapd-2.8.q/src/ap/hw_features.c 2019-04-25 14:58:10.278083605 +0300
-@@ -477,7 +477,7 @@
- int ret;
-
- /* Check that HT40 is used and PRI / SEC switch is allowed */
-- if (!iface->conf->secondary_channel || iface->conf->no_pri_sec_switch)
-+ if (!iface->conf->secondary_channel || iface->conf->no_pri_sec_switch || iface->conf->noscan)
- return 0;
-
- hostapd_set_state(iface, HAPD_IFACE_HT_SCAN);
-@@ -730,7 +730,7 @@
- if (!hostapd_is_usable_chan(iface, iface->conf->channel, 1))
- return 0;
-
-- if (!iface->conf->secondary_channel)
-+ if (!iface->conf->secondary_channel || iface->conf->noscan)
- return 1;
-
- if (!iface->conf->ht40_plus_minus_allowed)
-diff -wbBur hostapd-2.8/src/ap/ieee802_11_ht.c hostapd-2.8.q/src/ap/ieee802_11_ht.c
---- hostapd-2.8/src/ap/ieee802_11_ht.c 2019-04-21 10:10:22.000000000 +0300
-+++ hostapd-2.8.q/src/ap/ieee802_11_ht.c 2019-04-25 14:58:10.278083605 +0300
-@@ -252,6 +252,9 @@
- return;
- }
-
-+ if (iface->conf->noscan)
-+ return;
-+
- if (len < IEEE80211_HDRLEN + 2 + sizeof(*bc_ie)) {
- wpa_printf(MSG_DEBUG,
- "Ignore too short 20/40 BSS Coexistence Management frame");
-@@ -412,6 +415,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));
-
Copied: hostapd/repos/community-x86_64/hostapd-noscan.patch (from rev 498536, hostapd/trunk/hostapd-noscan.patch)
===================================================================
--- hostapd-noscan.patch (rev 0)
+++ hostapd-noscan.patch 2019-08-09 16:12:04 UTC (rev 498537)
@@ -0,0 +1,76 @@
+diff -wbBur hostapd-2.8/hostapd/config_file.c hostapd-2.8.q/hostapd/config_file.c
+--- hostapd-2.8/hostapd/config_file.c 2019-04-21 10:10:22.000000000 +0300
++++ hostapd-2.8.q/hostapd/config_file.c 2019-04-25 14:59:57.594749041 +0300
+@@ -2858,6 +2858,8 @@
+ bss->wpa_gmk_rekey = atoi(pos);
+ } else if (os_strcmp(buf, "wpa_ptk_rekey") == 0) {
+ bss->wpa_ptk_rekey = atoi(pos);
++ } else if (os_strcmp(buf, "noscan") == 0) {
++ conf->noscan = atoi(pos);
+ } else if (os_strcmp(buf, "wpa_group_update_count") == 0) {
+ char *endp;
+ unsigned long val = strtoul(pos, &endp, 0);
+@@ -3390,6 +3392,8 @@
+ bss->ieee80211w = 1;
+ #endif /* CONFIG_OCV */
+ #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.8/src/ap/ap_config.h hostapd-2.8.q/src/ap/ap_config.h
+--- hostapd-2.8/src/ap/ap_config.h 2019-04-21 10:10:22.000000000 +0300
++++ hostapd-2.8.q/src/ap/ap_config.h 2019-04-25 15:01:32.981414600 +0300
+@@ -801,6 +801,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.8/src/ap/hw_features.c hostapd-2.8.q/src/ap/hw_features.c
+--- hostapd-2.8/src/ap/hw_features.c 2019-04-21 10:10:22.000000000 +0300
++++ hostapd-2.8.q/src/ap/hw_features.c 2019-04-25 14:58:10.278083605 +0300
+@@ -477,7 +477,7 @@
+ int ret;
+
+ /* Check that HT40 is used and PRI / SEC switch is allowed */
+- if (!iface->conf->secondary_channel || iface->conf->no_pri_sec_switch)
++ if (!iface->conf->secondary_channel || iface->conf->no_pri_sec_switch || iface->conf->noscan)
+ return 0;
+
+ hostapd_set_state(iface, HAPD_IFACE_HT_SCAN);
+@@ -730,7 +730,7 @@
+ if (!hostapd_is_usable_chan(iface, iface->conf->channel, 1))
+ return 0;
+
+- if (!iface->conf->secondary_channel)
++ if (!iface->conf->secondary_channel || iface->conf->noscan)
+ return 1;
+
+ if (!iface->conf->ht40_plus_minus_allowed)
+diff -wbBur hostapd-2.8/src/ap/ieee802_11_ht.c hostapd-2.8.q/src/ap/ieee802_11_ht.c
+--- hostapd-2.8/src/ap/ieee802_11_ht.c 2019-04-21 10:10:22.000000000 +0300
++++ hostapd-2.8.q/src/ap/ieee802_11_ht.c 2019-04-25 14:58:10.278083605 +0300
+@@ -252,6 +252,9 @@
+ return;
+ }
+
++ if (iface->conf->noscan)
++ return;
++
+ if (len < IEEE80211_HDRLEN + 2 + sizeof(*bc_ie)) {
+ wpa_printf(MSG_DEBUG,
+ "Ignore too short 20/40 BSS Coexistence Management frame");
+@@ -412,6 +415,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: hostapd.service
===================================================================
--- hostapd.service 2019-08-09 16:11:52 UTC (rev 498536)
+++ hostapd.service 2019-08-09 16:12:04 UTC (rev 498537)
@@ -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 498536, hostapd/trunk/hostapd.service)
===================================================================
--- hostapd.service (rev 0)
+++ hostapd.service 2019-08-09 16:12:04 UTC (rev 498537)
@@ -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: openvswitch.patch
===================================================================
--- openvswitch.patch 2019-08-09 16:11:52 UTC (rev 498536)
+++ openvswitch.patch 2019-08-09 16:12:04 UTC (rev 498537)
@@ -1,137 +0,0 @@
-diff -wbBur hostapd-2.8.q/src/drivers/drivers.mak hostapd-2.8/src/drivers/drivers.mak
---- hostapd-2.8.q/src/drivers/drivers.mak 2019-04-21 10:10:22.000000000 +0300
-+++ hostapd-2.8/src/drivers/drivers.mak 2019-04-25 15:05:36.981411804 +0300
-@@ -136,6 +136,10 @@
- NEED_RFKILL=y
- endif
-
-+ifdef CONFIG_OPENVSWITCH
-+DRV_CFLAGS += -DCONFIG_OPENVSWITCH
-+endif
-+
- ifdef NEED_NETLINK
- DRV_OBJS += ../src/drivers/netlink.o
- endif
-diff -wbBur hostapd-2.8.q/src/drivers/drivers.mk hostapd-2.8/src/drivers/drivers.mk
---- hostapd-2.8.q/src/drivers/drivers.mk 2019-04-21 10:10:22.000000000 +0300
-+++ hostapd-2.8/src/drivers/drivers.mk 2019-04-25 15:05:36.981411804 +0300
-@@ -128,6 +128,10 @@
- NEED_RFKILL=y
- endif
-
-+ifdef CONFIG_OPENVSWITCH
-+DRV_CFLAGS += -DCONFIG_OPENVSWITCH
-+endif
-+
- ifdef NEED_NETLINK
- DRV_OBJS += src/drivers/netlink.c
- endif
-diff -wbBur hostapd-2.8.q/src/drivers/linux_ioctl.c hostapd-2.8/src/drivers/linux_ioctl.c
---- hostapd-2.8.q/src/drivers/linux_ioctl.c 2019-04-21 10:10:22.000000000 +0300
-+++ hostapd-2.8/src/drivers/linux_ioctl.c 2019-04-25 15:05:36.981411804 +0300
-@@ -15,6 +15,69 @@
- #include "common/linux_bridge.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)
- {
-@@ -152,6 +215,11 @@
- 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;
-@@ -177,6 +245,11 @@
- 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;
-@@ -199,6 +272,11 @@
- 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));
Copied: hostapd/repos/community-x86_64/openvswitch.patch (from rev 498536, hostapd/trunk/openvswitch.patch)
===================================================================
--- openvswitch.patch (rev 0)
+++ openvswitch.patch 2019-08-09 16:12:04 UTC (rev 498537)
@@ -0,0 +1,137 @@
+diff -wbBur hostapd-2.8.q/src/drivers/drivers.mak hostapd-2.8/src/drivers/drivers.mak
+--- hostapd-2.8.q/src/drivers/drivers.mak 2019-04-21 10:10:22.000000000 +0300
++++ hostapd-2.8/src/drivers/drivers.mak 2019-04-25 15:05:36.981411804 +0300
+@@ -136,6 +136,10 @@
+ NEED_RFKILL=y
+ endif
+
++ifdef CONFIG_OPENVSWITCH
++DRV_CFLAGS += -DCONFIG_OPENVSWITCH
++endif
++
+ ifdef NEED_NETLINK
+ DRV_OBJS += ../src/drivers/netlink.o
+ endif
+diff -wbBur hostapd-2.8.q/src/drivers/drivers.mk hostapd-2.8/src/drivers/drivers.mk
+--- hostapd-2.8.q/src/drivers/drivers.mk 2019-04-21 10:10:22.000000000 +0300
++++ hostapd-2.8/src/drivers/drivers.mk 2019-04-25 15:05:36.981411804 +0300
+@@ -128,6 +128,10 @@
+ NEED_RFKILL=y
+ endif
+
++ifdef CONFIG_OPENVSWITCH
++DRV_CFLAGS += -DCONFIG_OPENVSWITCH
++endif
++
+ ifdef NEED_NETLINK
+ DRV_OBJS += src/drivers/netlink.c
+ endif
+diff -wbBur hostapd-2.8.q/src/drivers/linux_ioctl.c hostapd-2.8/src/drivers/linux_ioctl.c
+--- hostapd-2.8.q/src/drivers/linux_ioctl.c 2019-04-21 10:10:22.000000000 +0300
++++ hostapd-2.8/src/drivers/linux_ioctl.c 2019-04-25 15:05:36.981411804 +0300
+@@ -15,6 +15,69 @@
+ #include "common/linux_bridge.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)
+ {
+@@ -152,6 +215,11 @@
+ 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;
+@@ -177,6 +245,11 @@
+ 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;
+@@ -199,6 +272,11 @@
+ 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));
More information about the arch-commits
mailing list