diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-04-27 09:16:30 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-04-27 09:16:30 +0000 |
commit | 5a391f0218b5833dfdfdc704785dd192b82c3793 (patch) | |
tree | 61a251509350958906b7911d172f3b78b18e925f | |
parent | ace25de7a447f68a66d8d568d755d59f694ad4fb (diff) | |
download | aports-5a391f0218b5833dfdfdc704785dd192b82c3793.tar.bz2 aports-5a391f0218b5833dfdfdc704785dd192b82c3793.tar.xz |
main/hostapd: upgrade to 2.4
-rw-r--r-- | main/hostapd/APKBUILD | 85 | ||||
-rw-r--r-- | main/hostapd/musl-fix-types.patch | 46 |
2 files changed, 51 insertions, 80 deletions
diff --git a/main/hostapd/APKBUILD b/main/hostapd/APKBUILD index 5efd0ee296..3e3c541798 100644 --- a/main/hostapd/APKBUILD +++ b/main/hostapd/APKBUILD @@ -1,13 +1,13 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=hostapd -pkgver=2.3 +pkgver=2.4 pkgrel=0 pkgdesc="daemon for wireless software access points" url="http://hostap.epitest.fi/hostapd/" arch="all" license="custom" depends= -makedepends="openssl-dev libnl-dev" +makedepends="openssl-dev libnl3-dev" install= subpackages="$pkgname-doc" patches="CVE-2012-4445.patch musl-fix-types.patch" @@ -33,65 +33,27 @@ prepare() { hostapd.conf # toolchain setup - echo "CC = ${CC:-gcc}" > $conf - - # EAP authentication methods - echo "CONFIG_EAP=y" >> $conf - echo "CONFIG_EAP_MD5=y" >> $conf - - # SSL authentication methods - echo "CONFIG_EAP_TLS=y" >> $conf - echo "CONFIG_EAP_TTLS=y" >> $conf - echo "CONFIG_EAP_MSCHAPV2=y" >> $conf - echo "CONFIG_EAP_PEAP=y" >> $conf - - # Enable Wi-Fi Protected Setup - echo "CONFIG_WPS=y" >> $conf - echo "CONFIG_WPS_UPNP=y" >> $conf - - echo "CONFIG_EAP_GTC=y" >> $conf - echo "CONFIG_EAP_SIM=y" >> $conf - echo "CONFIG_EAP_AKA=y" >> $conf - echo "CONFIG_EAP_PAX=y" >> $conf - echo "CONFIG_EAP_PSK=y" >> $conf - echo "CONFIG_EAP_SAKE=y" >> $conf - echo "CONFIG_EAP_GPSK=y" >> $conf - echo "CONFIG_EAP_GPSK_SHA256=y" >> $conf - - # drivers - echo "CONFIG_DRIVER_HOSTAP=y" >> $conf - echo "CONFIG_DRIVER_WIRED=y" >> $conf - echo "CONFIG_DRIVER_PRISM54=y" >> $conf - - # Add include path for madwifi-driver headers -# echo "CFLAGS += -I/usr/include/madwifi" >> $conf -# echo "CONFIG_DRIVER_MADWIFI=y" >> $conf - - # enable nl80211 driver" - echo "CONFIG_DRIVER_NL80211=y" >> $conf - echo "CFLAGS += -I/usr/include/netlink" >> $conf - echo "LIBS += -L/usr/lib" >> $conf - - # misc - echo "CONFIG_PKCS12=y" >> $conf - echo "CONFIG_RADIUS_SERVER=y" >> $conf - echo "CONFIG_IAPP=y" >> $conf - echo "CONFIG_IEEE80211R=y" >> $conf - echo "CONFIG_IEEE80211W=y" >> $conf - echo "CONFIG_IEEE80211N=y" >> $conf - echo "CONFIG_PEERKEY=y" >> $conf - echo "CONFIG_RSN_PREAUTH=y" >> $conf - - # IPv6 support - echo "CONFIG_IPV6=y" >> $conf + sed \ + -e '/^#CONFIG_DRIVER_NL80211=y/s/^#//' \ + -e '/^#CONFIG_RADIUS_SERVER=y/s/^#//' \ + -e '/^#CONFIG_DRIVER_WIRED=y/s/^#//' \ + -e '/^#CONFIG_DRIVER_NONE=y/s/^#//' \ + -e '/^#CONFIG_IEEE80211N=y/s/^#//' \ + -e '/^#CONFIG_IEEE80211R=y/s/^#//' \ + -e '/^#CONFIG_IEEE80211AC=y/s/^#//' \ + -e '/^#CONFIG_FULL_DYNAMIC_VLAN=y/s/^#//' \ + -e '/^#CONFIG_LIBNL32=y/s/^#//' \ + defconfig >> .config + echo "CC ?= ${CC:-gcc}" >> .config + echo "CFLAGS += -I/usr/include/libnl3" >> .config + echo "LIBS += -L/usr/lib" >> .config } build() { cd "$_builddir" make || return 1 - + msg "nt_password_hash" make nt_password_hash || return 1 - make hlr_auc_gw || return 1 } package() { @@ -105,7 +67,6 @@ package() { && install -Dm755 hostapd_cli "$pkgdir"/usr/bin/hostapd_cli \ && install -Dm755 nt_password_hash \ "$pkgdir"/usr/bin/nt_password_hash \ - && install -Dm755 hlr_auc_gw "$pkgdir"/usr/bin/hlr_auc_gw \ && install -Dm755 "$srcdir"/hostapd.initd \ "$pkgdir"/etc/init.d/hostapd \ && install -Dm644 "$srcdir"/hostapd.confd \ @@ -117,18 +78,18 @@ package() { || return 1 } -md5sums="40b89c61036add0c2dd1fc10767d3b5f hostapd-2.3.tar.gz +md5sums="04578f3f2c3eb1bec1adf30473813912 hostapd-2.4.tar.gz 0d01d4641e0c33f79c1f4372613655bf CVE-2012-4445.patch -1ed73d28faae5d004bd8e34891df6eea musl-fix-types.patch +7568486221987c93041b4877eced7317 musl-fix-types.patch de734b22c3ad1e85309b5634d29c6225 hostapd.initd c91382209042defa04e79d0ae841a29e hostapd.confd" -sha256sums="c94c2b76876fad4c80a1063a06f958a2189ba5003475016fa7658a1ca49bb4df hostapd-2.3.tar.gz +sha256sums="6fe0eb6bd1c9cbd24952ece8586b6f7bd14ab358edfda99794e79b9b9dbd657f hostapd-2.4.tar.gz 06dc7df2159fb0604191f66d35164caa5927963eebe77b5f2c389bd7590e2a49 CVE-2012-4445.patch -35ec232335ccd8329d267bd75b972936e11cc4b487e47a1b73b390bb7551389e musl-fix-types.patch +f296013d432740478f24de7214d07ff897e6e38cbfd01a73a3158014f94fd771 musl-fix-types.patch 4bb2e7bfe8149353bb17ae74c3e6cf3c833af0b00303f7eb1eb4efe9867458e6 hostapd.initd 6c14e88b14bb9a93d2dca69239d829f435e93180e621319aeed0f3987290dfba hostapd.confd" -sha512sums="e54a3117a86393fc6374c3284f1ec52530d09c33e24f9ff943fd6f277f6140b666f0e5e4ac3a972916ed5c1fe2c7d88b59a416bb5fc451608dae1b33dd3cdffb hostapd-2.3.tar.gz +sha512sums="37e648fe9cce92923ab1d1e23a4267e274c988785d7be5610f1affca425ffa86b438de81e37446926a0f9158d6b67ee83e6396c3f81d571545c973dddbf1ffe3 hostapd-2.4.tar.gz 619acce84516dead1e03e5da71657ea4c4b6f3ca8271574409773aeb316cbddc88095b50320804f457f001f4f3fe83053e660c008d8409f59bb4d3bfe058b601 CVE-2012-4445.patch -9386de2aec75d5aa1da72c37a4fd0607d1666e9d3f0233a33a66a3ca4408cbb4efca1172a5b9b5d78dc88cf7ffab3366f38578a46f07d8aacc56c66b4a8e2cde musl-fix-types.patch +6ccdca29bc3a6b87d6e3f581c4f4725f0684bb88f39d46f875e9bdb0c41ee5b8be3b7908084c6631bffddece82cb2f2222e159d842944b6f2b7b639ef2de609c musl-fix-types.patch d840249b8f537875948e192665b980884bfc977681e577b27e3c5ae4c9724b0c2123cfee72eebbd0d5a33bf0979d7837fc48f8053e66dd06854cca1e8689b798 hostapd.initd 0882263bbd7c0b05bf51f51d66e11a23a0b8ca7da2a3b8a30166d2c5f044c0c134e6bccb1d02c9e81819ca8fb0c0fb55c7121a08fe7233ccaa73ff8ab9a238fe hostapd.confd" diff --git a/main/hostapd/musl-fix-types.patch b/main/hostapd/musl-fix-types.patch index 51625aeea9..988e2c9fb5 100644 --- a/main/hostapd/musl-fix-types.patch +++ b/main/hostapd/musl-fix-types.patch @@ -1,19 +1,29 @@ ---- hostapd-2.0.orig/src/drivers/linux_wext.h -+++ hostapd-2.0/src/drivers/linux_wext.h -@@ -21,11 +21,11 @@ +--- ./src/ap/vlan_init.c.orig ++++ ./src/ap/vlan_init.c +@@ -130,7 +130,7 @@ + args[1] = if_index; - #include <sys/types.h> - #include <net/if.h> --typedef __uint32_t __u32; --typedef __int32_t __s32; --typedef __uint16_t __u16; --typedef __int16_t __s16; --typedef __uint8_t __u8; -+typedef uint32_t __u32; -+typedef int32_t __s32; -+typedef uint16_t __u16; -+typedef int16_t __s16; -+typedef uint8_t __u8; - #ifndef __user - #define __user - #endif /* __user */ + os_strlcpy(ifr.ifr_name, br_name, sizeof(ifr.ifr_name)); +- ifr.ifr_data = (__caddr_t) args; ++ ifr.ifr_data = (void *) args; + + if (ioctl(fd, SIOCDEVPRIVATE, &ifr) < 0 && errno != EINVAL) { + /* No error if interface already removed. */ +@@ -181,7 +181,7 @@ + args[1] = if_index; + + os_strlcpy(ifr.ifr_name, br_name, sizeof(ifr.ifr_name)); +- ifr.ifr_data = (__caddr_t) args; ++ ifr.ifr_data = (void *) args; + + if (ioctl(fd, SIOCDEVPRIVATE, &ifr) < 0) { + if (errno == EBUSY) { +@@ -309,7 +309,7 @@ + + os_memset(ifindices, 0, sizeof(ifindices)); + os_strlcpy(ifr.ifr_name, br_name, sizeof(ifr.ifr_name)); +- ifr.ifr_data = (__caddr_t) arg; ++ ifr.ifr_data = (void *) arg; + + if (ioctl(fd, SIOCDEVPRIVATE, &ifr) < 0) { + wpa_printf(MSG_ERROR, "VLAN: %s: BRCTL_GET_PORT_LIST " |