Skip to content

Commit

Permalink
Merge tag '2.6'
Browse files Browse the repository at this point in the history
Release 2.6
  • Loading branch information
illiliti committed Jun 25, 2023
2 parents 608bfa8 + 6ae9b4d commit 96c61bb
Show file tree
Hide file tree
Showing 15 changed files with 298 additions and 40 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
*.o
*.lo
*.la
*.gcno
*.gcda
.libs
.deps
.dirstamp
Expand Down Expand Up @@ -73,3 +75,5 @@ unit/*.trs
test-suite.log
src/builtin.h
autotests/*/__pycache__
iwd-coverage.info
gcov
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
ver 2.6:
Add support for setting driver specific quirks.
Add support for disabling power saving mode.

ver 2.5:
Fix issue with HT40+/- checks when creating chandef.
Fix issue with handling support for FT-8021X-SHA384.
Expand Down
15 changes: 14 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -756,12 +756,25 @@ if WIRED
endif
endif

clean-local:
gcov-clean:
if GCOV
-$(LCOV) --quiet --directory $(builddir) -z
-rm -rf "$(builddir)/iwd-coverage.info" "$(builddir)/gcov"
-find . -name "*.gcda" -o -name "*.gcov" -o -name "*.gcno" -delete
endif

clean-local: gcov-clean
-rm -f unit/cert-*.pem unit/cert-*.csr unit/cert-*.srl unit/*-settings.8021x

maintainer-clean-local:
-rm -rf build-aux ell

gcov-report:
if GCOV
$(LCOV) --quiet --directory $(builddir) --capture --output-file "iwd-coverage.info"
LANG=C $(GENHTML) --quiet --prefix $(builddir) --output-directory "$(builddir)/gcov" --title "iwd Code Coverage" --legend "$(builddir)/iwd-coverage.info"
endif

src/builtin.h: src/genbuiltin config.status
$(AM_V_at)$(MKDIR_P) $(@D)
$(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@
24 changes: 22 additions & 2 deletions acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,30 @@ AC_DEFUN([AC_PROG_CC_UBSAN], [
])
])

AC_DEFUN([AC_PROG_CC_GCOV], [
AC_CACHE_CHECK([whether ${CC-cc} accepts -fprofile-arcs], ac_cv_prog_cc_profile_arcs, [
echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -fprofile-arcs -c conftest.c 2>&1`"; then
ac_cv_prog_cc_profile_arcs=yes
else
ac_cv_prog_cc_profile_arcs=no
fi
rm -rf conftest*
])
AC_CACHE_CHECK([whether ${CC-cc} accepts -ftest_coverage], ac_cv_prog_cc_test_coverage, [
echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -ftest-coverage -c conftest.c 2>&1`"; then
ac_cv_prog_cc_test_coverage=yes
else
ac_cv_prog_cc_test_coverage=no
fi
rm -rf conftest*
])
])

AC_DEFUN([COMPILER_FLAGS], [
if (test "${CFLAGS}" = ""); then
CFLAGS="-Wall -O2 -fsigned-char -fno-exceptions"
CFLAGS+=" -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
CFLAGS="-Wall -fsigned-char -fno-exceptions"
fi
if (test "$USE_MAINTAINER_MODE" = "yes"); then
CFLAGS+=" -Werror -Wextra"
Expand Down
4 changes: 4 additions & 0 deletions autotests/testFILS/fils_256_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ def test_connection_success(self):
testutil.test_iface_operstate()
testutil.test_ifaces_connected(device.name, hapd.ifname)

#
# TODO: If this is failing its likely due to an older hostapd version
# not containing commit 7ee814201b72
#
hapd.rekey(device.address)

device.disconnect()
Expand Down
4 changes: 4 additions & 0 deletions autotests/testFILS/fils_384_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ def test_connection_success(self):
testutil.test_iface_operstate()
testutil.test_ifaces_connected(device.name, hapd.ifname)

#
# TODO: If this is failing its likely due to an older hostapd version
# not containing commit 7ee814201b72
#
hapd.rekey(device.address)

device.disconnect()
Expand Down
2 changes: 1 addition & 1 deletion autotests/testNetconfig/connection_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def parse_lease_file(path, family):
elif quote or ch not in ' \t\r\n;{}#':
token += ch
if ch == '#':
break
continue
elif ch == '{':
stack.append([])
elif ch == '}':
Expand Down
32 changes: 30 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AC_PREREQ([2.69])
AC_INIT([iwd],[2.5])
AC_INIT([iwd],[2.6])

AC_CONFIG_HEADERS(config.h)
AC_CONFIG_AUX_DIR(build-aux)
Expand All @@ -25,6 +25,7 @@ AC_PROG_CC_PIE
AC_PROG_CC_ASAN
AC_PROG_CC_LSAN
AC_PROG_CC_UBSAN
AC_PROG_CC_GCOV
AC_PROG_INSTALL
AC_PROG_MKDIR_P
AC_PROG_LN_S
Expand All @@ -37,10 +38,15 @@ LT_INIT([disable-static])
AC_ARG_ENABLE(optimization, AS_HELP_STRING([--disable-optimization],
[disable code optimization through compiler]), [
if (test "${enableval}" = "no"); then
CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -O0"
CFLAGS="$CFLAGS -O0"
fi
])

if (test "${enable_optimization}" != "no"); then
CFLAGS="$CFLAGS -O2"
CFLAGS+=" -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
fi

AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug],
[enable compiling with debugging information]), [
if (test "${enableval}" = "yes" &&
Expand All @@ -49,6 +55,28 @@ AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug],
fi
])

AC_ARG_ENABLE(gcov, AS_HELP_STRING([--enable-gcov],
[enable compiling with code coverage information]), [
if (test "${enableval}" = "yes" &&
test "${ac_cv_prog_cc_profile_arcs}" = "yes" &&
test "${ac_cv_prog_cc_test_coverage}" = "yes"); then
CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
fi
])

if (test "${enable_gcov}" = "yes"); then
AC_CHECK_PROGS(LCOV, [lcov], "no")
AC_CHECK_PROGS(GENHTML, [genhtml], "no")
if (test "${LCOV}" == "no"); then
AC_MSG_ERROR([lcov is required])
fi
if (test "${GENHTML}" == "no"); then
AC_MSG_ERROR([genhtml is required])
fi
fi

AM_CONDITIONAL(GCOV, test "${enable_gcov}" != "no")

AC_ARG_ENABLE(pie, AS_HELP_STRING([--enable-pie],
[enable position independent executables flag]), [
if (test "${enableval}" = "yes" &&
Expand Down
28 changes: 28 additions & 0 deletions doc/code-coverage-testing.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Code Coverage Testing
=====================

To enable code coverage testing, the following steps should be performed.

1. Configure iwd with --enable-gcov --disable-optimization --enable-debug:
cd iwd
./bootstrap-configure --enable-gcov --disable-optimization
make

2. To check unit test coverage, run unit tests:
make check

3. If you want to perform manual testing and see code coverage of the manual
tests, simply run iwd:
src/iwd -d

3. Optionally run test runner. If you only care about a certain test and how
it affects code coveage, you can pass the autotest to run to test runner
using the '--autotests' command line argument, like so:
tools/test-runner --autotests=testWPA2 --kernel=tools/linux

4. Obtain the results:
make gcov-report
Open 'gcov/index.html'

5. Remove gcov output:
make gcov-clean
10 changes: 5 additions & 5 deletions doc/main.conf
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@
# the system resolving service. The currently supported services are:
# - systemd-resolved ["systemd"]
# - openresolv / resolvconf ["resolvconf"]
# - none
#
# If not set, the value "systemd" is used by default. Uncomment the value
# below if you are using openresolv:
#
#NameResolvingService=resolvconf
#
# iwd's support for IPv6 is still experimental and is disabled by default.
# If you want to try it anyway, uncomment the setting below. Note that
# configuration via SLAAC is currently not supported (DHCPv6 only).
#
#EnableIPv6=true
# iwd's support for IPv6 should be stable enough and is now enabled by default.
# If you experience any problems and want to force IPv6 to be disabled,
# uncomment the setting below:
#EnableIPv6=false
13 changes: 10 additions & 3 deletions src/ft.c
Original file line number Diff line number Diff line change
Expand Up @@ -1000,14 +1000,21 @@ void __ft_rx_authenticate(uint32_t ifindex, const uint8_t *frame,

if (!ft_parse_authentication_resp_frame(frame, frame_len,
info->spa, info->aa, info->aa, 2,
&status, &ies, &ies_len))
&status, &ies, &ies_len)) {
l_debug("Could not parse auth response");
return;
}

if (status != 0)
if (status != 0) {
l_debug("BSS "MAC" rejected FT auth with status=%u",
MAC_STR(info->aa), status);
goto cancel;
}

if (!ft_parse_ies(info, hs, ies, ies_len))
if (!ft_parse_ies(info, hs, ies, ies_len)) {
l_debug("Could not parse auth response IEs");
goto cancel;
}

info->parsed = true;

Expand Down
30 changes: 30 additions & 0 deletions src/iwd.config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,36 @@ The group ``[IPv4]`` contains settings related to IPv4 network configuration.
will limit the number of access points that can be running
simultaneously on different interfaces.

DriverQuirks
------------

The group ``[DriverQuirks]`` contains special flags associated with drivers that
are buggy or just don't behave similar enough to the majority of other drivers.

.. list-table::
:header-rows: 0
:stub-columns: 0
:widths: 20 80
:align: left

* - DefaultInterface
- Values: comma-separated list of drivers or glob matches

If a driver in use matches one in this list IWD will not attempt to
remove and re-create the default interface.

* - ForcePae
- Values: comma-separated list of drivers or glob matches

If a driver in use matches one in this list ControlPortOverNL80211 will
not be used, and PAE will be used instead. Some drivers do not properly
support ControlPortOverNL80211 even though they advertise support for it.

* - PowerSaveDisable
- Values: comma-separated list of drivers or glob matches

If a driver in user matches one in this list power save will be disabled.

SEE ALSO
========

Expand Down
Loading

0 comments on commit 96c61bb

Please sign in to comment.