diff --git a/config b/config index d9e2e3f..707b936 100644 --- a/config +++ b/config @@ -265,7 +265,7 @@ CONFIG_BACKEND=file #CONFIG_ELOOP_POLL=y # Should we use epoll instead of select? Select is used by default. -#CONFIG_ELOOP_EPOLL=y +CONFIG_ELOOP_EPOLL=y # Select layer 2 packet implementation # linux = Linux packet socket (default) @@ -433,7 +433,7 @@ CONFIG_DEBUG_FILE=y # disabled. This will save some in binary size and CPU use. However, this # should only be considered for builds that are known to be used on devices # that meet the requirements described above. -#CONFIG_NO_RANDOM_POOL=y +CONFIG_NO_RANDOM_POOL=y # IEEE 802.11n (High Throughput) support (mainly for AP mode) CONFIG_IEEE80211N=y diff --git a/wpa_supplicant-2.4.tar.gz b/wpa_supplicant-2.4.tar.gz deleted file mode 100644 index d78c9c2..0000000 --- a/wpa_supplicant-2.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:058dc832c096139a059e6df814080f50251a8d313c21b13364c54a1e70109122 -size 2525648 diff --git a/wpa_supplicant-2.5.tar.gz b/wpa_supplicant-2.5.tar.gz new file mode 100644 index 0000000..34c4078 --- /dev/null +++ b/wpa_supplicant-2.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cce55bae483b364eae55c35ba567c279be442ed8bab5b80a3c7fb0d057b9b316 +size 2607336 diff --git a/wpa_supplicant-getrandom.patch b/wpa_supplicant-getrandom.patch new file mode 100644 index 0000000..6364b2e --- /dev/null +++ b/wpa_supplicant-getrandom.patch @@ -0,0 +1,44 @@ +--- wpa_supplicant-2.4.orig/src/utils/os_unix.c ++++ wpa_supplicant-2.4/src/utils/os_unix.c +@@ -6,11 +6,15 @@ + * See README for more details. + */ + ++#ifndef _GNU_SOURCE ++#define _GNU_SOURCE ++#endif + #include "includes.h" + + #include + #include +- ++#include ++#include + #ifdef ANDROID + #include + #include +@@ -223,6 +227,10 @@ void os_daemonize_terminate(const char * + + int os_get_random(unsigned char *buf, size_t len) + { ++#ifdef SYS_getrandom ++ int gr = TEMP_FAILURE_RETRY(syscall(SYS_getrandom, buf, len, 0)); ++ return (gr != -1 && gr == len) ? 0 : -1; ++#else + FILE *f; + size_t rc; + +@@ -232,10 +240,13 @@ int os_get_random(unsigned char *buf, si + return -1; + } + ++ setbuf(f, NULL); ++ + rc = fread(buf, 1, len, f); + fclose(f); + + return rc != len ? -1 : 0; ++#endif + } + + diff --git a/wpa_supplicant.changes b/wpa_supplicant.changes index ae84efc..6bc18dd 100644 --- a/wpa_supplicant.changes +++ b/wpa_supplicant.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Thu Feb 18 15:36:23 UTC 2016 - crrodriguez@opensuse.org + +- Previous update did not include version 2.5 tarball + or changed the version number in spec, only the changelog + and removed patches. +- config: set CONFIG_NO_RANDOM_POOL=y, we have a reliable· + random number generator by using /dev/urandom, no need to + keep an internal random number pool which draws entropy from + /dev/random. +- config: prefer using epoll(7) instead of select(2) + by setting CONFIG_ELOOP_EPOLL=y +- wpa_supplicant-getrandom.patch: Prefer to use the getrandom(2) + system call to collect entropy. if it is not present disable + buffering when reading /dev/urandom, otherwise each os_get_random() + call will request BUFSIZ of entropy instead of the few needed bytes. + ------------------------------------------------------------------- Wed Feb 17 13:47:43 UTC 2016 - lnussel@suse.de diff --git a/wpa_supplicant.spec b/wpa_supplicant.spec index 813a585..0105cbc 100644 --- a/wpa_supplicant.spec +++ b/wpa_supplicant.spec @@ -20,7 +20,7 @@ %define _rundir %{_localstatedir}/run %endif Name: wpa_supplicant -Version: 2.4 +Version: 2.5 Release: 0 Summary: WPA supplicant implementation License: BSD-3-Clause and GPL-2.0+ @@ -40,6 +40,7 @@ Patch1: wpa_supplicant-flush-debug-output.patch # is not portable Patch2: wpa_supplicant-sigusr1-changes-debuglevel.patch Patch3: wpa_supplicant-alloc_size.patch +Patch4: wpa_supplicant-getrandom.patch BuildRequires: dbus-1-devel BuildRequires: libnl3-devel BuildRequires: libqt4 @@ -76,7 +77,7 @@ cp %{SOURCE1} wpa_supplicant/.config %patch1 %patch2 -p1 %patch3 -p1 - +%patch4 -p1 %build cd wpa_supplicant CFLAGS="%{optflags}" make V=1 %{?_smp_mflags}