Browse Source

New upstream version 1.6

upstream/latest upstream/1.6
Andreas Henriksson 3 years ago
parent
commit
5f28eb1b3b
  1. 10
      ChangeLog
  2. 18
      Makefile.am
  3. 221
      Makefile.in
  4. 6
      build-aux/libtool.m4
  5. 10
      build-aux/ltmain.sh
  6. 29
      client/agent-manager.c
  7. 3
      client/agent-manager.h
  8. 17
      client/dbus-proxy.c
  9. 8
      client/iwctl.1
  10. 28
      configure
  11. 4
      configure.ac
  12. 27
      ell/genl-private.h
  13. 105
      ell/genl.c
  14. 5
      ell/genl.h
  15. 3
      ell/path.c
  16. 4
      ell/ringbuf.c
  17. 4
      ell/ringbuf.h
  18. 207
      ell/rtnl.c
  19. 63
      ell/rtnl.h
  20. 2
      ell/time.c
  21. 18
      ell/tls.c
  22. 317
      monitor/nlmon.c
  23. 29
      src/ap.c
  24. 10
      src/eap-gtc.c
  25. 1
      src/eap-mschapv2.h
  26. 1
      src/eap-pwd.c
  27. 12
      src/eap-tls-common.c
  28. 13
      src/eap.c
  29. 938
      src/frame-xchg.c
  30. 19
      src/frame-xchg.h
  31. 12
      src/handshake.c
  32. 18
      src/ie.c
  33. 3
      src/ie.h
  34. 8
      src/iwd.config.5
  35. 8
      src/iwd.config.rst
  36. 7
      src/iwd.h
  37. 23
      src/iwd.network.5
  38. 15
      src/iwd.network.rst
  39. 3
      src/manager.c
  40. 31
      src/netconfig.c
  41. 289
      src/netdev.c
  42. 17
      src/network.c
  43. 29
      src/p2putil.c
  44. 67
      src/p2putil.h
  45. 1
      src/sae.h
  46. 42
      src/station.c
  47. 5
      src/util.c
  48. 1
      src/util.h
  49. 5
      src/watchlist.c
  50. 22
      src/watchlist.h
  51. 82
      src/wiphy.c
  52. 2
      src/wiphy.h
  53. 4
      src/wsc.c
  54. 93
      src/wscutil.c
  55. 3
      src/wscutil.h
  56. 302
      tools/probe-req.c
  57. 32
      tools/test-runner.c

10
ChangeLog

@ -1,3 +1,13 @@
ver 1.6:
Fix issue with handling missing AP stop events.
Fix issue with handling out-of-order disconnect events.
Fix issue with handling missing auth/assoc support.
Fix issue with handling omitted EAP-TLS-CACert.
Fix issue with handling OWE PTK derivation.
Add support for internal frame exchange API.
Add support for MAC randomization and override.
Add support for per-network MAC addresses.
ver 1.5:
Fix issue with handling missing NEW_WIPHY events.
Fix issue with interface creation and NEW_WIPHY events.

18
Makefile.am

@ -39,6 +39,7 @@ ell_headers = ell/util.h \
ell/netlink.h \
ell/genl.h \
ell/dbus.h \
ell/rtnl.h \
ell/dbus-service.h \
ell/dbus-client.h \
ell/hwdb.h \
@ -82,8 +83,8 @@ ell_sources = ell/private.h \
ell/checksum.c \
ell/netlink-private.h \
ell/netlink.c \
ell/genl-private.h \
ell/genl.c \
ell/rtnl.c \
ell/dbus-private.h \
ell/dbus.c \
ell/dbus-message.c \
@ -217,7 +218,6 @@ src_iwd_SOURCES = src/main.c linux/nl80211.h src/iwd.h src/missing.h \
src/manager.c \
src/erp.h src/erp.c \
src/fils.h src/fils.c \
src/rtnlutil.h src/rtnlutil.c \
src/auth-proto.h \
src/anqp.h src/anqp.c \
src/anqputil.h src/anqputil.c \
@ -338,6 +338,15 @@ man_MANS += wired/ead.8
endif
endif
noinst_PROGRAMS += tools/probe-req
tools_probe_req_SOURCES = tools/probe-req.c src/mpdu.h src/mpdu.c \
src/ie.h src/ie.c \
src/nl80211util.h src/nl80211util.c \
src/util.h src/util.c \
src/common.h src/common.c
tools_probe_req_LDADD = $(ell_ldadd)
if HWSIM
bin_PROGRAMS += tools/hwsim
@ -630,8 +639,9 @@ SED_PROCESS = $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
< $< > $@
if RUN_RST2MAN
RST2MAN_PROCESS = $(AM_V_GEN)$(RST2MAN) --strict --no-raw --no-generator \
--no-datestamp $< $@
RST2MAN_PROCESS = $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
$(RST2MAN) --strict --no-raw \
--no-generator --no-datestamp $< $@
else
RST2MAN_PROCESS = $(AM_V_GEN)test -f $@ || \
{ echo "Generated manual page $@ does not exist"; false; }

221
Makefile.in

@ -92,7 +92,8 @@ build_triplet = @build@
host_triplet = @host@
bin_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3)
libexec_PROGRAMS = $(am__EXEEXT_4) $(am__EXEEXT_5)
noinst_PROGRAMS = $(am__EXEEXT_6) $(am__EXEEXT_9)
noinst_PROGRAMS = tools/probe-req$(EXEEXT) $(am__EXEEXT_6) \
$(am__EXEEXT_9)
@DAEMON_TRUE@am__append_1 = src/iwd
@DAEMON_TRUE@@SIM_HARDCODED_TRUE@am__append_2 = sim_hardcoded
@DAEMON_TRUE@@SIM_HARDCODED_TRUE@am__append_3 = plugins/sim_hardcoded.c
@ -172,7 +173,7 @@ am__ell_libell_internal_la_SOURCES_DIST = ell/util.h ell/test.h \
ell/strv.h ell/utf8.h ell/queue.h ell/hashmap.h ell/string.h \
ell/settings.h ell/main.h ell/idle.h ell/signal.h \
ell/timeout.h ell/io.h ell/ringbuf.h ell/log.h ell/plugin.h \
ell/checksum.h ell/netlink.h ell/genl.h ell/dbus.h \
ell/checksum.h ell/netlink.h ell/genl.h ell/dbus.h ell/rtnl.h \
ell/dbus-service.h ell/dbus-client.h ell/hwdb.h ell/cipher.h \
ell/random.h ell/uintset.h ell/base64.h ell/pem.h ell/tls.h \
ell/uuid.h ell/key.h ell/pkcs5.h ell/file.h ell/dir.h \
@ -181,20 +182,19 @@ am__ell_libell_internal_la_SOURCES_DIST = ell/util.h ell/test.h \
ell/test.c ell/strv.c ell/utf8.c ell/queue.c ell/hashmap.c \
ell/string.c ell/settings.c ell/main.c ell/idle.c ell/signal.c \
ell/timeout.c ell/io.c ell/ringbuf.c ell/log.c ell/plugin.c \
ell/checksum.c ell/netlink-private.h ell/netlink.c \
ell/genl-private.h ell/genl.c ell/dbus-private.h ell/dbus.c \
ell/dbus-message.c ell/dbus-util.c ell/dbus-service.c \
ell/dbus-client.c ell/dbus-name-cache.c ell/dbus-filter.c \
ell/gvariant-private.h ell/gvariant-util.c \
ell/siphash-private.h ell/siphash.c ell/hwdb.c ell/cipher.c \
ell/random.c ell/uintset.c ell/base64.c ell/asn1-private.h \
ell/pem.c ell/pem-private.h ell/tls-private.h ell/tls.c \
ell/tls-record.c ell/tls-suites.c ell/tls-extensions.c \
ell/uuid.c ell/key.c ell/pkcs5-private.h ell/pkcs5.c \
ell/file.c ell/dir.c ell/net.c ell/dhcp-private.h ell/dhcp.c \
ell/dhcp-transport.c ell/dhcp-lease.c ell/cert-private.h \
ell/cert.c ell/ecc-external.c ell/ecc-private.h ell/ecc.c \
ell/ecdh.c ell/time.c ell/path.c
ell/checksum.c ell/netlink-private.h ell/netlink.c ell/genl.c \
ell/rtnl.c ell/dbus-private.h ell/dbus.c ell/dbus-message.c \
ell/dbus-util.c ell/dbus-service.c ell/dbus-client.c \
ell/dbus-name-cache.c ell/dbus-filter.c ell/gvariant-private.h \
ell/gvariant-util.c ell/siphash-private.h ell/siphash.c \
ell/hwdb.c ell/cipher.c ell/random.c ell/uintset.c \
ell/base64.c ell/asn1-private.h ell/pem.c ell/pem-private.h \
ell/tls-private.h ell/tls.c ell/tls-record.c ell/tls-suites.c \
ell/tls-extensions.c ell/uuid.c ell/key.c ell/pkcs5-private.h \
ell/pkcs5.c ell/file.c ell/dir.c ell/net.c ell/dhcp-private.h \
ell/dhcp.c ell/dhcp-transport.c ell/dhcp-lease.c \
ell/cert-private.h ell/cert.c ell/ecc-external.c \
ell/ecc-private.h ell/ecc.c ell/ecdh.c ell/time.c ell/path.c
am__objects_1 =
am__dirstamp = $(am__leading_dot)dirstamp
@EXTERNAL_ELL_FALSE@am__objects_2 = ell/util.lo ell/test.lo \
@ -204,13 +204,14 @@ am__dirstamp = $(am__leading_dot)dirstamp
@EXTERNAL_ELL_FALSE@ ell/signal.lo ell/timeout.lo ell/io.lo \
@EXTERNAL_ELL_FALSE@ ell/ringbuf.lo ell/log.lo ell/plugin.lo \
@EXTERNAL_ELL_FALSE@ ell/checksum.lo ell/netlink.lo ell/genl.lo \
@EXTERNAL_ELL_FALSE@ ell/dbus.lo ell/dbus-message.lo \
@EXTERNAL_ELL_FALSE@ ell/dbus-util.lo ell/dbus-service.lo \
@EXTERNAL_ELL_FALSE@ ell/dbus-client.lo ell/dbus-name-cache.lo \
@EXTERNAL_ELL_FALSE@ ell/dbus-filter.lo ell/gvariant-util.lo \
@EXTERNAL_ELL_FALSE@ ell/siphash.lo ell/hwdb.lo ell/cipher.lo \
@EXTERNAL_ELL_FALSE@ ell/random.lo ell/uintset.lo ell/base64.lo \
@EXTERNAL_ELL_FALSE@ ell/pem.lo ell/tls.lo ell/tls-record.lo \
@EXTERNAL_ELL_FALSE@ ell/rtnl.lo ell/dbus.lo \
@EXTERNAL_ELL_FALSE@ ell/dbus-message.lo ell/dbus-util.lo \
@EXTERNAL_ELL_FALSE@ ell/dbus-service.lo ell/dbus-client.lo \
@EXTERNAL_ELL_FALSE@ ell/dbus-name-cache.lo ell/dbus-filter.lo \
@EXTERNAL_ELL_FALSE@ ell/gvariant-util.lo ell/siphash.lo \
@EXTERNAL_ELL_FALSE@ ell/hwdb.lo ell/cipher.lo ell/random.lo \
@EXTERNAL_ELL_FALSE@ ell/uintset.lo ell/base64.lo ell/pem.lo \
@EXTERNAL_ELL_FALSE@ ell/tls.lo ell/tls-record.lo \
@EXTERNAL_ELL_FALSE@ ell/tls-suites.lo ell/tls-extensions.lo \
@EXTERNAL_ELL_FALSE@ ell/uuid.lo ell/key.lo ell/pkcs5.lo \
@EXTERNAL_ELL_FALSE@ ell/file.lo ell/dir.lo ell/net.lo \
@ -282,20 +283,20 @@ am__src_iwd_SOURCES_DIST = src/main.c linux/nl80211.h src/iwd.h \
src/nl80211util.h src/nl80211util.c src/nl80211cmd.h \
src/nl80211cmd.c src/owe.h src/owe.c src/blacklist.h \
src/blacklist.c src/manager.c src/erp.h src/erp.c src/fils.h \
src/fils.c src/rtnlutil.h src/rtnlutil.c src/auth-proto.h \
src/anqp.h src/anqp.c src/anqputil.h src/anqputil.c \
src/netconfig.h src/netconfig.c src/resolve.h src/resolve.c \
src/hotspot.c src/p2putil.h src/p2putil.c src/module.h \
src/module.c src/rrm.c src/frame-xchg.h src/frame-xchg.c \
src/eap.c src/eap.h src/eap-private.h src/eap-wsc.c \
src/eap-wsc.h src/eap-md5.c src/eap-tls.c src/eap-ttls.c \
src/eap-mschapv2.c src/eap-mschapv2.h src/eap-sim.c \
src/eap-aka.c src/eap-peap.c src/eap-gtc.c src/eap-pwd.c \
src/util.h src/util.c src/crypto.h src/crypto.c src/wscutil.h \
src/wscutil.c src/simutil.h src/simutil.c src/simauth.h \
src/simauth.c src/watchlist.h src/watchlist.c \
src/eap-tls-common.h src/eap-tls-common.c src/mschaputil.h \
src/mschaputil.c plugins/sim_hardcoded.c plugins/ofono.c
src/fils.c src/auth-proto.h src/anqp.h src/anqp.c \
src/anqputil.h src/anqputil.c src/netconfig.h src/netconfig.c \
src/resolve.h src/resolve.c src/hotspot.c src/p2putil.h \
src/p2putil.c src/module.h src/module.c src/rrm.c \
src/frame-xchg.h src/frame-xchg.c src/eap.c src/eap.h \
src/eap-private.h src/eap-wsc.c src/eap-wsc.h src/eap-md5.c \
src/eap-tls.c src/eap-ttls.c src/eap-mschapv2.c \
src/eap-mschapv2.h src/eap-sim.c src/eap-aka.c src/eap-peap.c \
src/eap-gtc.c src/eap-pwd.c src/util.h src/util.c src/crypto.h \
src/crypto.c src/wscutil.h src/wscutil.c src/simutil.h \
src/simutil.c src/simauth.h src/simauth.c src/watchlist.h \
src/watchlist.c src/eap-tls-common.h src/eap-tls-common.c \
src/mschaputil.h src/mschaputil.c plugins/sim_hardcoded.c \
plugins/ofono.c
am__objects_3 = src/eap.$(OBJEXT) src/eap-wsc.$(OBJEXT) \
src/eap-md5.$(OBJEXT) src/eap-tls.$(OBJEXT) \
src/eap-ttls.$(OBJEXT) src/eap-mschapv2.$(OBJEXT) \
@ -325,12 +326,12 @@ am__objects_6 = $(am__objects_4) $(am__objects_5)
@DAEMON_TRUE@ src/nl80211cmd.$(OBJEXT) src/owe.$(OBJEXT) \
@DAEMON_TRUE@ src/blacklist.$(OBJEXT) src/manager.$(OBJEXT) \
@DAEMON_TRUE@ src/erp.$(OBJEXT) src/fils.$(OBJEXT) \
@DAEMON_TRUE@ src/rtnlutil.$(OBJEXT) src/anqp.$(OBJEXT) \
@DAEMON_TRUE@ src/anqputil.$(OBJEXT) src/netconfig.$(OBJEXT) \
@DAEMON_TRUE@ src/resolve.$(OBJEXT) src/hotspot.$(OBJEXT) \
@DAEMON_TRUE@ src/p2putil.$(OBJEXT) src/module.$(OBJEXT) \
@DAEMON_TRUE@ src/rrm.$(OBJEXT) src/frame-xchg.$(OBJEXT) \
@DAEMON_TRUE@ $(am__objects_3) $(am__objects_6)
@DAEMON_TRUE@ src/anqp.$(OBJEXT) src/anqputil.$(OBJEXT) \
@DAEMON_TRUE@ src/netconfig.$(OBJEXT) src/resolve.$(OBJEXT) \
@DAEMON_TRUE@ src/hotspot.$(OBJEXT) src/p2putil.$(OBJEXT) \
@DAEMON_TRUE@ src/module.$(OBJEXT) src/rrm.$(OBJEXT) \
@DAEMON_TRUE@ src/frame-xchg.$(OBJEXT) $(am__objects_3) \
@DAEMON_TRUE@ $(am__objects_6)
src_iwd_OBJECTS = $(am_src_iwd_OBJECTS)
am__tools_hwsim_SOURCES_DIST = tools/hwsim.c src/mpdu.h src/util.h \
src/util.c src/storage.h src/storage.c src/common.h \
@ -340,6 +341,11 @@ am__tools_hwsim_SOURCES_DIST = tools/hwsim.c src/mpdu.h src/util.h \
@HWSIM_TRUE@ src/common.$(OBJEXT)
tools_hwsim_OBJECTS = $(am_tools_hwsim_OBJECTS)
@HWSIM_TRUE@tools_hwsim_DEPENDENCIES = $(am__DEPENDENCIES_1)
am_tools_probe_req_OBJECTS = tools/probe-req.$(OBJEXT) \
src/mpdu.$(OBJEXT) src/ie.$(OBJEXT) src/nl80211util.$(OBJEXT) \
src/util.$(OBJEXT) src/common.$(OBJEXT)
tools_probe_req_OBJECTS = $(am_tools_probe_req_OBJECTS)
tools_probe_req_DEPENDENCIES = $(am__DEPENDENCIES_1)
am__tools_test_runner_SOURCES_DIST = tools/test-runner.c
@TOOLS_TRUE@am_tools_test_runner_OBJECTS = \
@TOOLS_TRUE@ tools/test-runner.$(OBJEXT)
@ -507,51 +513,52 @@ am__depfiles_remade = client/$(DEPDIR)/ad-hoc.Po \
ell/$(DEPDIR)/path.Plo ell/$(DEPDIR)/pem.Plo \
ell/$(DEPDIR)/pkcs5.Plo ell/$(DEPDIR)/plugin.Plo \
ell/$(DEPDIR)/queue.Plo ell/$(DEPDIR)/random.Plo \
ell/$(DEPDIR)/ringbuf.Plo ell/$(DEPDIR)/settings.Plo \
ell/$(DEPDIR)/signal.Plo ell/$(DEPDIR)/siphash.Plo \
ell/$(DEPDIR)/string.Plo ell/$(DEPDIR)/strv.Plo \
ell/$(DEPDIR)/test.Plo ell/$(DEPDIR)/time.Plo \
ell/$(DEPDIR)/timeout.Plo ell/$(DEPDIR)/tls-extensions.Plo \
ell/$(DEPDIR)/tls-record.Plo ell/$(DEPDIR)/tls-suites.Plo \
ell/$(DEPDIR)/tls.Plo ell/$(DEPDIR)/uintset.Plo \
ell/$(DEPDIR)/utf8.Plo ell/$(DEPDIR)/util.Plo \
ell/$(DEPDIR)/uuid.Plo monitor/$(DEPDIR)/display.Po \
monitor/$(DEPDIR)/main.Po monitor/$(DEPDIR)/nlmon.Po \
monitor/$(DEPDIR)/pcap.Po plugins/$(DEPDIR)/ofono.Po \
plugins/$(DEPDIR)/sim_hardcoded.Po src/$(DEPDIR)/adhoc.Po \
src/$(DEPDIR)/agent.Po src/$(DEPDIR)/anqp.Po \
src/$(DEPDIR)/anqputil.Po src/$(DEPDIR)/ap.Po \
src/$(DEPDIR)/backtrace.Po src/$(DEPDIR)/blacklist.Po \
src/$(DEPDIR)/common.Po src/$(DEPDIR)/crypto.Po \
src/$(DEPDIR)/dbus.Po src/$(DEPDIR)/device.Po \
src/$(DEPDIR)/eap-aka.Po src/$(DEPDIR)/eap-gtc.Po \
src/$(DEPDIR)/eap-md5.Po src/$(DEPDIR)/eap-mschapv2.Po \
src/$(DEPDIR)/eap-peap.Po src/$(DEPDIR)/eap-pwd.Po \
src/$(DEPDIR)/eap-sim.Po src/$(DEPDIR)/eap-tls-common.Po \
src/$(DEPDIR)/eap-tls.Po src/$(DEPDIR)/eap-ttls.Po \
src/$(DEPDIR)/eap-wsc.Po src/$(DEPDIR)/eap.Po \
src/$(DEPDIR)/eapol.Po src/$(DEPDIR)/eapolutil.Po \
src/$(DEPDIR)/erp.Po src/$(DEPDIR)/fils.Po \
src/$(DEPDIR)/frame-xchg.Po src/$(DEPDIR)/ft.Po \
src/$(DEPDIR)/handshake.Po src/$(DEPDIR)/hotspot.Po \
src/$(DEPDIR)/ie.Po src/$(DEPDIR)/knownnetworks.Po \
src/$(DEPDIR)/main.Po src/$(DEPDIR)/manager.Po \
src/$(DEPDIR)/module.Po src/$(DEPDIR)/mpdu.Po \
src/$(DEPDIR)/mschaputil.Po src/$(DEPDIR)/netconfig.Po \
src/$(DEPDIR)/netdev.Po src/$(DEPDIR)/network.Po \
src/$(DEPDIR)/nl80211cmd.Po src/$(DEPDIR)/nl80211util.Po \
src/$(DEPDIR)/owe.Po src/$(DEPDIR)/p2putil.Po \
src/$(DEPDIR)/plugin.Po src/$(DEPDIR)/resolve.Po \
src/$(DEPDIR)/rfkill.Po src/$(DEPDIR)/rrm.Po \
src/$(DEPDIR)/rtnlutil.Po src/$(DEPDIR)/sae.Po \
ell/$(DEPDIR)/ringbuf.Plo ell/$(DEPDIR)/rtnl.Plo \
ell/$(DEPDIR)/settings.Plo ell/$(DEPDIR)/signal.Plo \
ell/$(DEPDIR)/siphash.Plo ell/$(DEPDIR)/string.Plo \
ell/$(DEPDIR)/strv.Plo ell/$(DEPDIR)/test.Plo \
ell/$(DEPDIR)/time.Plo ell/$(DEPDIR)/timeout.Plo \
ell/$(DEPDIR)/tls-extensions.Plo ell/$(DEPDIR)/tls-record.Plo \
ell/$(DEPDIR)/tls-suites.Plo ell/$(DEPDIR)/tls.Plo \
ell/$(DEPDIR)/uintset.Plo ell/$(DEPDIR)/utf8.Plo \
ell/$(DEPDIR)/util.Plo ell/$(DEPDIR)/uuid.Plo \
monitor/$(DEPDIR)/display.Po monitor/$(DEPDIR)/main.Po \
monitor/$(DEPDIR)/nlmon.Po monitor/$(DEPDIR)/pcap.Po \
plugins/$(DEPDIR)/ofono.Po plugins/$(DEPDIR)/sim_hardcoded.Po \
src/$(DEPDIR)/adhoc.Po src/$(DEPDIR)/agent.Po \
src/$(DEPDIR)/anqp.Po src/$(DEPDIR)/anqputil.Po \
src/$(DEPDIR)/ap.Po src/$(DEPDIR)/backtrace.Po \
src/$(DEPDIR)/blacklist.Po src/$(DEPDIR)/common.Po \
src/$(DEPDIR)/crypto.Po src/$(DEPDIR)/dbus.Po \
src/$(DEPDIR)/device.Po src/$(DEPDIR)/eap-aka.Po \
src/$(DEPDIR)/eap-gtc.Po src/$(DEPDIR)/eap-md5.Po \
src/$(DEPDIR)/eap-mschapv2.Po src/$(DEPDIR)/eap-peap.Po \
src/$(DEPDIR)/eap-pwd.Po src/$(DEPDIR)/eap-sim.Po \
src/$(DEPDIR)/eap-tls-common.Po src/$(DEPDIR)/eap-tls.Po \
src/$(DEPDIR)/eap-ttls.Po src/$(DEPDIR)/eap-wsc.Po \
src/$(DEPDIR)/eap.Po src/$(DEPDIR)/eapol.Po \
src/$(DEPDIR)/eapolutil.Po src/$(DEPDIR)/erp.Po \
src/$(DEPDIR)/fils.Po src/$(DEPDIR)/frame-xchg.Po \
src/$(DEPDIR)/ft.Po src/$(DEPDIR)/handshake.Po \
src/$(DEPDIR)/hotspot.Po src/$(DEPDIR)/ie.Po \
src/$(DEPDIR)/knownnetworks.Po src/$(DEPDIR)/main.Po \
src/$(DEPDIR)/manager.Po src/$(DEPDIR)/module.Po \
src/$(DEPDIR)/mpdu.Po src/$(DEPDIR)/mschaputil.Po \
src/$(DEPDIR)/netconfig.Po src/$(DEPDIR)/netdev.Po \
src/$(DEPDIR)/network.Po src/$(DEPDIR)/nl80211cmd.Po \
src/$(DEPDIR)/nl80211util.Po src/$(DEPDIR)/owe.Po \
src/$(DEPDIR)/p2putil.Po src/$(DEPDIR)/plugin.Po \
src/$(DEPDIR)/resolve.Po src/$(DEPDIR)/rfkill.Po \
src/$(DEPDIR)/rrm.Po src/$(DEPDIR)/sae.Po \
src/$(DEPDIR)/scan.Po src/$(DEPDIR)/simauth.Po \
src/$(DEPDIR)/simutil.Po src/$(DEPDIR)/station.Po \
src/$(DEPDIR)/storage.Po src/$(DEPDIR)/util.Po \
src/$(DEPDIR)/watchlist.Po src/$(DEPDIR)/wiphy.Po \
src/$(DEPDIR)/wsc.Po src/$(DEPDIR)/wscutil.Po \
tools/$(DEPDIR)/hwsim.Po tools/$(DEPDIR)/test-runner.Po \
unit/$(DEPDIR)/test-arc4.Po unit/$(DEPDIR)/test-client.Po \
unit/$(DEPDIR)/test-cmac-aes.Po unit/$(DEPDIR)/test-crypto.Po \
tools/$(DEPDIR)/hwsim.Po tools/$(DEPDIR)/probe-req.Po \
tools/$(DEPDIR)/test-runner.Po unit/$(DEPDIR)/test-arc4.Po \
unit/$(DEPDIR)/test-client.Po unit/$(DEPDIR)/test-cmac-aes.Po \
unit/$(DEPDIR)/test-crypto.Po \
unit/$(DEPDIR)/test-eap-mschapv2.Po \
unit/$(DEPDIR)/test-eap-sim.Po unit/$(DEPDIR)/test-eapol.Po \
unit/$(DEPDIR)/test-hmac-md5.Po \
@ -585,12 +592,12 @@ am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(ell_libell_internal_la_SOURCES) $(client_iwctl_SOURCES) \
$(monitor_iwmon_SOURCES) $(src_iwd_SOURCES) \
$(tools_hwsim_SOURCES) $(tools_test_runner_SOURCES) \
$(unit_test_arc4_SOURCES) $(unit_test_client_SOURCES) \
$(unit_test_cmac_aes_SOURCES) $(unit_test_crypto_SOURCES) \
$(unit_test_eap_mschapv2_SOURCES) $(unit_test_eap_sim_SOURCES) \
$(unit_test_eapol_SOURCES) $(unit_test_hmac_md5_SOURCES) \
$(unit_test_hmac_sha1_SOURCES) \
$(tools_hwsim_SOURCES) $(tools_probe_req_SOURCES) \
$(tools_test_runner_SOURCES) $(unit_test_arc4_SOURCES) \
$(unit_test_client_SOURCES) $(unit_test_cmac_aes_SOURCES) \
$(unit_test_crypto_SOURCES) $(unit_test_eap_mschapv2_SOURCES) \
$(unit_test_eap_sim_SOURCES) $(unit_test_eapol_SOURCES) \
$(unit_test_hmac_md5_SOURCES) $(unit_test_hmac_sha1_SOURCES) \
$(unit_test_hmac_sha256_SOURCES) $(unit_test_ie_SOURCES) \
$(unit_test_kdf_sha256_SOURCES) $(unit_test_mpdu_SOURCES) \
$(unit_test_p2p_SOURCES) $(unit_test_prf_sha1_SOURCES) \
@ -600,7 +607,7 @@ SOURCES = $(ell_libell_internal_la_SOURCES) $(client_iwctl_SOURCES) \
DIST_SOURCES = $(am__ell_libell_internal_la_SOURCES_DIST) \
$(am__client_iwctl_SOURCES_DIST) \
$(am__monitor_iwmon_SOURCES_DIST) $(am__src_iwd_SOURCES_DIST) \
$(am__tools_hwsim_SOURCES_DIST) \
$(am__tools_hwsim_SOURCES_DIST) $(tools_probe_req_SOURCES) \
$(am__tools_test_runner_SOURCES_DIST) \
$(unit_test_arc4_SOURCES) $(am__unit_test_client_SOURCES_DIST) \
$(unit_test_cmac_aes_SOURCES) $(unit_test_crypto_SOURCES) \
@ -1045,6 +1052,7 @@ builtin_sources = $(am__append_3) $(am__append_5)
@EXTERNAL_ELL_FALSE@ ell/netlink.h \
@EXTERNAL_ELL_FALSE@ ell/genl.h \
@EXTERNAL_ELL_FALSE@ ell/dbus.h \
@EXTERNAL_ELL_FALSE@ ell/rtnl.h \
@EXTERNAL_ELL_FALSE@ ell/dbus-service.h \
@EXTERNAL_ELL_FALSE@ ell/dbus-client.h \
@EXTERNAL_ELL_FALSE@ ell/hwdb.h \
@ -1088,8 +1096,8 @@ builtin_sources = $(am__append_3) $(am__append_5)
@EXTERNAL_ELL_FALSE@ ell/checksum.c \
@EXTERNAL_ELL_FALSE@ ell/netlink-private.h \
@EXTERNAL_ELL_FALSE@ ell/netlink.c \
@EXTERNAL_ELL_FALSE@ ell/genl-private.h \
@EXTERNAL_ELL_FALSE@ ell/genl.c \
@EXTERNAL_ELL_FALSE@ ell/rtnl.c \
@EXTERNAL_ELL_FALSE@ ell/dbus-private.h \
@EXTERNAL_ELL_FALSE@ ell/dbus.c \
@EXTERNAL_ELL_FALSE@ ell/dbus-message.c \
@ -1206,7 +1214,6 @@ eap_sources = src/eap.c src/eap.h src/eap-private.h \
@DAEMON_TRUE@ src/manager.c \
@DAEMON_TRUE@ src/erp.h src/erp.c \
@DAEMON_TRUE@ src/fils.h src/fils.c \
@DAEMON_TRUE@ src/rtnlutil.h src/rtnlutil.c \
@DAEMON_TRUE@ src/auth-proto.h \
@DAEMON_TRUE@ src/anqp.h src/anqp.c \
@DAEMON_TRUE@ src/anqputil.h src/anqputil.c \
@ -1265,6 +1272,13 @@ eap_sources = src/eap.c src/eap.h src/eap-private.h \
@WIRED_TRUE@wired_ead_LDADD = $(ell_ldadd)
@WIRED_TRUE@wired_ead_DEPENDENCIES = $(ell_dependencies) \
@WIRED_TRUE@ $(am__append_18)
tools_probe_req_SOURCES = tools/probe-req.c src/mpdu.h src/mpdu.c \
src/ie.h src/ie.c \
src/nl80211util.h src/nl80211util.c \
src/util.h src/util.c \
src/common.h src/common.c
tools_probe_req_LDADD = $(ell_ldadd)
@HWSIM_TRUE@tools_hwsim_SOURCES = tools/hwsim.c src/mpdu.h \
@HWSIM_TRUE@ src/util.h src/util.c \
@HWSIM_TRUE@ src/storage.h src/storage.c \
@ -1438,8 +1452,9 @@ SED_PROCESS = $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
@RUN_RST2MAN_FALSE@RST2MAN_PROCESS = $(AM_V_GEN)test -f $@ || \
@RUN_RST2MAN_FALSE@ { echo "Generated manual page $@ does not exist"; false; }
@RUN_RST2MAN_TRUE@RST2MAN_PROCESS = $(AM_V_GEN)$(RST2MAN) --strict --no-raw --no-generator \
@RUN_RST2MAN_TRUE@ --no-datestamp $< $@
@RUN_RST2MAN_TRUE@RST2MAN_PROCESS = $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
@RUN_RST2MAN_TRUE@ $(RST2MAN) --strict --no-raw \
@RUN_RST2MAN_TRUE@ --no-generator --no-datestamp $< $@
all: $(BUILT_SOURCES) config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
@ -1637,6 +1652,7 @@ ell/plugin.lo: ell/$(am__dirstamp) ell/$(DEPDIR)/$(am__dirstamp)
ell/checksum.lo: ell/$(am__dirstamp) ell/$(DEPDIR)/$(am__dirstamp)
ell/netlink.lo: ell/$(am__dirstamp) ell/$(DEPDIR)/$(am__dirstamp)
ell/genl.lo: ell/$(am__dirstamp) ell/$(DEPDIR)/$(am__dirstamp)
ell/rtnl.lo: ell/$(am__dirstamp) ell/$(DEPDIR)/$(am__dirstamp)
ell/dbus.lo: ell/$(am__dirstamp) ell/$(DEPDIR)/$(am__dirstamp)
ell/dbus-message.lo: ell/$(am__dirstamp) ell/$(DEPDIR)/$(am__dirstamp)
ell/dbus-util.lo: ell/$(am__dirstamp) ell/$(DEPDIR)/$(am__dirstamp)
@ -1801,8 +1817,6 @@ src/manager.$(OBJEXT): src/$(am__dirstamp) \
src/$(DEPDIR)/$(am__dirstamp)
src/erp.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
src/fils.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
src/rtnlutil.$(OBJEXT): src/$(am__dirstamp) \
src/$(DEPDIR)/$(am__dirstamp)
src/anqp.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
src/netconfig.$(OBJEXT): src/$(am__dirstamp) \
src/$(DEPDIR)/$(am__dirstamp)
@ -1870,6 +1884,12 @@ tools/hwsim.$(OBJEXT): tools/$(am__dirstamp) \
tools/hwsim$(EXEEXT): $(tools_hwsim_OBJECTS) $(tools_hwsim_DEPENDENCIES) $(EXTRA_tools_hwsim_DEPENDENCIES) tools/$(am__dirstamp)
@rm -f tools/hwsim$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tools_hwsim_OBJECTS) $(tools_hwsim_LDADD) $(LIBS)
tools/probe-req.$(OBJEXT): tools/$(am__dirstamp) \
tools/$(DEPDIR)/$(am__dirstamp)
tools/probe-req$(EXEEXT): $(tools_probe_req_OBJECTS) $(tools_probe_req_DEPENDENCIES) $(EXTRA_tools_probe_req_DEPENDENCIES) tools/$(am__dirstamp)
@rm -f tools/probe-req$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tools_probe_req_OBJECTS) $(tools_probe_req_LDADD) $(LIBS)
tools/test-runner.$(OBJEXT): tools/$(am__dirstamp) \
tools/$(DEPDIR)/$(am__dirstamp)
@ -2082,6 +2102,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@ell/$(DEPDIR)/queue.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ell/$(DEPDIR)/random.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ell/$(DEPDIR)/ringbuf.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ell/$(DEPDIR)/rtnl.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ell/$(DEPDIR)/settings.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ell/$(DEPDIR)/signal.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@ell/$(DEPDIR)/siphash.Plo@am__quote@ # am--include-marker
@ -2153,7 +2174,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/resolve.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/rfkill.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/rrm.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/rtnlutil.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sae.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/scan.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/simauth.Po@am__quote@ # am--include-marker
@ -2166,6 +2186,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/wsc.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/wscutil.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/hwsim.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/probe-req.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/test-runner.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/test-arc4.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/test-client.Po@am__quote@ # am--include-marker
@ -3150,6 +3171,7 @@ distclean: distclean-am
-rm -f ell/$(DEPDIR)/queue.Plo
-rm -f ell/$(DEPDIR)/random.Plo
-rm -f ell/$(DEPDIR)/ringbuf.Plo
-rm -f ell/$(DEPDIR)/rtnl.Plo
-rm -f ell/$(DEPDIR)/settings.Plo
-rm -f ell/$(DEPDIR)/signal.Plo
-rm -f ell/$(DEPDIR)/siphash.Plo
@ -3221,7 +3243,6 @@ distclean: distclean-am
-rm -f src/$(DEPDIR)/resolve.Po
-rm -f src/$(DEPDIR)/rfkill.Po
-rm -f src/$(DEPDIR)/rrm.Po
-rm -f src/$(DEPDIR)/rtnlutil.Po
-rm -f src/$(DEPDIR)/sae.Po
-rm -f src/$(DEPDIR)/scan.Po
-rm -f src/$(DEPDIR)/simauth.Po
@ -3234,6 +3255,7 @@ distclean: distclean-am
-rm -f src/$(DEPDIR)/wsc.Po
-rm -f src/$(DEPDIR)/wscutil.Po
-rm -f tools/$(DEPDIR)/hwsim.Po
-rm -f tools/$(DEPDIR)/probe-req.Po
-rm -f tools/$(DEPDIR)/test-runner.Po
-rm -f unit/$(DEPDIR)/test-arc4.Po
-rm -f unit/$(DEPDIR)/test-client.Po
@ -3360,6 +3382,7 @@ maintainer-clean: maintainer-clean-am
-rm -f ell/$(DEPDIR)/queue.Plo
-rm -f ell/$(DEPDIR)/random.Plo
-rm -f ell/$(DEPDIR)/ringbuf.Plo
-rm -f ell/$(DEPDIR)/rtnl.Plo
-rm -f ell/$(DEPDIR)/settings.Plo
-rm -f ell/$(DEPDIR)/signal.Plo
-rm -f ell/$(DEPDIR)/siphash.Plo
@ -3431,7 +3454,6 @@ maintainer-clean: maintainer-clean-am
-rm -f src/$(DEPDIR)/resolve.Po
-rm -f src/$(DEPDIR)/rfkill.Po
-rm -f src/$(DEPDIR)/rrm.Po
-rm -f src/$(DEPDIR)/rtnlutil.Po
-rm -f src/$(DEPDIR)/sae.Po
-rm -f src/$(DEPDIR)/scan.Po
-rm -f src/$(DEPDIR)/simauth.Po
@ -3444,6 +3466,7 @@ maintainer-clean: maintainer-clean-am
-rm -f src/$(DEPDIR)/wsc.Po
-rm -f src/$(DEPDIR)/wscutil.Po
-rm -f tools/$(DEPDIR)/hwsim.Po
-rm -f tools/$(DEPDIR)/probe-req.Po
-rm -f tools/$(DEPDIR)/test-runner.Po
-rm -f unit/$(DEPDIR)/test-arc4.Po
-rm -f unit/$(DEPDIR)/test-client.Po

6
build-aux/libtool.m4

@ -1041,8 +1041,8 @@ int forced_loaded() { return 2;}
_LT_EOF
echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
$AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
$AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
$RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
cat > conftest.c << _LT_EOF
@ -1492,7 +1492,7 @@ need_locks=$enable_libtool_lock
m4_defun([_LT_PROG_AR],
[AC_CHECK_TOOLS(AR, [ar], false)
: ${AR=ar}
: ${AR_FLAGS=cru}
: ${AR_FLAGS=cr}
_LT_DECL([], [AR], [1], [The archiver])
_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])

10
build-aux/ltmain.sh

@ -31,7 +31,7 @@
PROGRAM=libtool
PACKAGE=libtool
VERSION="2.4.6 Debian-2.4.6-11"
VERSION="2.4.6 Debian-2.4.6-12"
package_revision=2.4.6
@ -387,7 +387,7 @@ EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
# putting '$debug_cmd' at the start of all your functions, you can get
# bash to show function call trace with:
#
# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
# debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
debug_cmd=${debug_cmd-":"}
exit_cmd=:
@ -2141,7 +2141,7 @@ include the following information:
compiler: $LTCC
compiler flags: $LTCFLAGS
linker: $LD (gnu? $with_gnu_ld)
version: $progname $scriptversion Debian-2.4.6-11
version: $progname $scriptversion Debian-2.4.6-12
automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
@ -7368,10 +7368,12 @@ func_mode_link ()
# -stdlib=* select c++ std lib with clang
# -fsanitize=* Clang/GCC memory and address sanitizer
# -fuse-ld=* Linker select flags for GCC
# -static-* direct GCC to link specific libraries statically
# -fcilkplus Cilk Plus language extension features for C/C++
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
-specs=*|-fsanitize=*|-fuse-ld=*)
-specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus)
func_quote_for_eval "$arg"
arg=$func_quote_for_eval_result
func_append compile_command " $arg"

29
client/agent-manager.c

@ -2,7 +2,7 @@
*
* Wireless daemon for Linux
*
* Copyright (C) 2017-2019 Intel Corporation. All rights reserved.
* Copyright (C) 2017-2020 Intel Corporation. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -30,6 +30,7 @@
#include "client/agent.h"
#include "client/dbus-proxy.h"
#include "client/agent-manager.h"
#include "client/command.h"
#define IWD_AGENT_MANAGER_PATH "/net/connman/iwd"
@ -39,18 +40,16 @@ static void check_errors_method_callback(struct l_dbus_message *message,
dbus_message_has_error(message);
}
bool agent_manager_register_agent(void)
static bool agent_manager_register_agent(const char *path)
{
const char *path;
const struct proxy_interface *proxy =
proxy_interface_find(IWD_AGENT_MANAGER_INTERFACE,
IWD_AGENT_MANAGER_PATH);
const struct proxy_interface *proxy;
if (!proxy)
if (!path)
return false;
path = proxy_interface_get_data(proxy);
if (!path)
proxy = proxy_interface_find(IWD_AGENT_MANAGER_INTERFACE,
IWD_AGENT_MANAGER_PATH);
if (!proxy)
return false;
proxy_interface_method_call(proxy, "RegisterAgent", "o",
@ -81,10 +80,17 @@ bool agent_manager_unregister_agent(void)
static void *agent_manager_create(void)
{
char *path = l_strdup_printf("/agent/%i", getpid());
char *path;
if (command_needs_no_agent())
return NULL;
path = l_strdup_printf("/agent/%i", getpid());
agent_init(path);
agent_manager_register_agent(path);
return path;
}
@ -92,6 +98,9 @@ static void agent_manager_destroy(void *data)
{
char *path = data;
if (!path)
return;
agent_exit(path);
l_free(path);

3
client/agent-manager.h

@ -2,7 +2,7 @@
*
* Wireless daemon for Linux
*
* Copyright (C) 2017-2019 Intel Corporation. All rights reserved.
* Copyright (C) 2017-2020 Intel Corporation. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,5 +20,4 @@
*
*/
bool agent_manager_register_agent(void);
bool agent_manager_unregister_agent(void);

17
client/dbus-proxy.c

@ -2,7 +2,7 @@
*
* Wireless daemon for Linux
*
* Copyright (C) 2017-2019 Intel Corporation. All rights reserved.
* Copyright (C) 2017-2020 Intel Corporation. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -572,10 +572,10 @@ static void proxy_interface_create(const char *path,
proxy->path = l_strdup(path);
proxy->type = interface_type;
l_queue_push_tail(proxy_interfaces, proxy);
if (interface_type->ops && interface_type->ops->create)
proxy->data = interface_type->ops->create();
l_queue_push_tail(proxy_interfaces, proxy);
}
}
@ -745,14 +745,6 @@ static void get_managed_objects_callback(struct l_dbus_message *message,
while (l_dbus_message_iter_next_entry(&objects, &path, &object))
proxy_interfaces_update_properties(path, &object);
if (!command_needs_no_agent()) {
if (!agent_manager_register_agent()) {
display_error("Failed to register Agent.\n");
goto error;
}
}
if (command_is_interactive_mode())
display_enable_cmd_prompt();
else
@ -878,8 +870,7 @@ bool dbus_proxy_exit(void)
{
struct interface_type_desc *desc;
if (!command_needs_no_agent())
agent_manager_unregister_agent();
agent_manager_unregister_agent();
for (desc = __start___interface; desc < __stop___interface; desc++) {
if (!desc->exit)

8
client/iwctl.1

@ -59,7 +59,7 @@ Show help message and exit.
.SS Interactive mode
.sp
To start an interactive mode and list all available commands do:
.. code\-block:
\&.. code\-block:
.INDENT 0.0
.INDENT 3.5
.sp
@ -73,7 +73,7 @@ $ iwctl
.UNINDENT
.sp
To connect to a network:
.. code\-block:
\&.. code\-block:
.INDENT 0.0
.INDENT 3.5
.sp
@ -90,7 +90,7 @@ To connect to a network:
.SS Command line mode
.sp
To list all available commands in command line mode and exit do:
.. code\-block:
\&.. code\-block:
.INDENT 0.0
.INDENT 3.5
.sp
@ -103,7 +103,7 @@ $ iwctl \-\-help
.UNINDENT
.sp
To connect to a network:
.. code\-block:
\&.. code\-block:
.INDENT 0.0
.INDENT 3.5
.sp

28
configure

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for iwd 1.5.
# Generated by GNU Autoconf 2.69 for iwd 1.6.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@ -587,8 +587,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='iwd'
PACKAGE_TARNAME='iwd'
PACKAGE_VERSION='1.5'
PACKAGE_STRING='iwd 1.5'
PACKAGE_VERSION='1.6'
PACKAGE_STRING='iwd 1.6'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@ -1393,7 +1393,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures iwd 1.5 to adapt to many kinds of systems.
\`configure' configures iwd 1.6 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1464,7 +1464,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of iwd 1.5:";;
short | recursive ) echo "Configuration of iwd 1.6:";;
esac
cat <<\_ACEOF
@ -1612,7 +1612,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
iwd configure 1.5
iwd configure 1.6
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@ -1977,7 +1977,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by iwd $as_me 1.5, which was
It was created by iwd $as_me 1.6, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@ -2845,7 +2845,7 @@ fi
# Define the identity of the package.
PACKAGE='iwd'
VERSION='1.5'
VERSION='1.6'
cat >>confdefs.h <<_ACEOF
@ -6230,7 +6230,7 @@ esac
fi
: ${AR=ar}
: ${AR_FLAGS=cru}
: ${AR_FLAGS=cr}
@ -7951,8 +7951,8 @@ int forced_loaded() { return 2;}
_LT_EOF
echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
echo "$AR cru libconftest.a conftest.o" >&5
$AR cru libconftest.a conftest.o 2>&5
echo "$AR cr libconftest.a conftest.o" >&5
$AR cr libconftest.a conftest.o 2>&5
echo "$RANLIB libconftest.a" >&5
$RANLIB libconftest.a 2>&5
cat > conftest.c << _LT_EOF
@ -13266,7 +13266,7 @@ if (test "${enable_external_ell}" = "yes"); then
test "${enable_monitor}" != "no" ||
test "${enable_wired}" = "yes" ||
test "${enable_hwsim}" = "yes"); then
ell_min_version="0.28"
ell_min_version="0.29"
else
ell_min_version="0.5"
fi
@ -14013,7 +14013,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by iwd $as_me 1.5, which was
This file was extended by iwd $as_me 1.6, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -14079,7 +14079,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
iwd config.status 1.5
iwd config.status 1.6
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

4
configure.ac

@ -1,5 +1,5 @@
AC_PREREQ(2.60)
AC_INIT(iwd, 1.5)
AC_INIT(iwd, 1.6)
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_AUX_DIR(build-aux)
@ -259,7 +259,7 @@ if (test "${enable_external_ell}" = "yes"); then
test "${enable_monitor}" != "no" ||
test "${enable_wired}" = "yes" ||
test "${enable_hwsim}" = "yes"); then
ell_min_version="0.28"
ell_min_version="0.29"
else
ell_min_version="0.5"
fi

27
ell/genl-private.h

@ -1,27 +0,0 @@
/*
*
* Embedded Linux library
*
* Copyright (C) 2011-2015 Intel Corporation. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
struct l_genl_msg *_genl_msg_create(const struct nlmsghdr *nlmsg);
const void *_genl_msg_as_bytes(struct l_genl_msg *msg, uint16_t type,
uint16_t flags, uint32_t seq,
uint32_t pid,
size_t *out_size);

105
ell/genl.c

@ -34,7 +34,6 @@
#include "io.h"
#include "netlink-private.h"
#include "genl.h"
#include "genl-private.h"
#include "private.h"
#define MAX_NESTING_LEVEL 4
@ -767,7 +766,7 @@ static bool msg_grow(struct l_genl_msg *msg, uint32_t needed)
return true;
}
struct l_genl_msg *_genl_msg_create(const struct nlmsghdr *nlmsg)
static struct l_genl_msg *msg_create(const struct nlmsghdr *nlmsg)
{
struct l_genl_msg *msg;
@ -796,6 +795,32 @@ done:
return l_genl_msg_ref(msg);
}
static const void *msg_as_bytes(struct l_genl_msg *msg, uint16_t type,
uint16_t flags, uint32_t seq, uint32_t pid,
size_t *out_size)
{
struct nlmsghdr *nlmsg;
struct genlmsghdr *genlmsg;
nlmsg = msg->data;
nlmsg->nlmsg_len = msg->len;
nlmsg->nlmsg_type = type;
nlmsg->nlmsg_flags = flags;
nlmsg->nlmsg_seq = seq;
nlmsg->nlmsg_pid = pid;
genlmsg = msg->data + NLMSG_HDRLEN;
genlmsg->cmd = msg->cmd;
genlmsg->version = msg->version;
if (out_size)
*out_size = msg->len;
return msg->data;
}
static void write_watch_destroy(void *user_data)
{
struct l_genl *genl = user_data;
@ -807,8 +832,8 @@ static bool can_write_data(struct l_io *io, void *user_data)
{
struct l_genl *genl = user_data;
struct genl_request *request;
struct nlmsghdr *nlmsg;
struct genlmsghdr *genlmsg;
const void *data;
size_t size;
ssize_t bytes_written;
request = l_queue_pop_head(genl->request_queue);
@ -816,22 +841,10 @@ static bool can_write_data(struct l_io *io, void *user_data)
return false;
request->seq = get_next_id(&genl->next_seq);
data = msg_as_bytes(request->msg, request->type, request->flags,
request->seq, genl->pid, &size);
nlmsg = request->msg->data;
nlmsg->nlmsg_len = request->msg->len;
nlmsg->nlmsg_type = request->type;
nlmsg->nlmsg_flags = request->flags;
nlmsg->nlmsg_seq = request->seq;
nlmsg->nlmsg_pid = genl->pid;
genlmsg = request->msg->data + NLMSG_HDRLEN;
genlmsg->cmd = request->msg->cmd;
genlmsg->version = request->msg->version;
bytes_written = send(genl->fd, request->msg->data,
request->msg->len, 0);
bytes_written = send(genl->fd, data, size, 0);
if (bytes_written < 0) {
l_queue_push_head(genl->request_queue, request);
return false;
@ -912,7 +925,7 @@ static void process_unicast(struct l_genl *genl, const struct nlmsghdr *nlmsg)
nlmsg->nlmsg_type == NLMSG_OVERRUN)
return;
msg = _genl_msg_create(nlmsg);
msg = msg_create(nlmsg);
if (!nlmsg->nlmsg_seq) {
if (msg)
dispatch_unicast_watches(genl, nlmsg->nlmsg_type, msg);
@ -947,7 +960,7 @@ static void process_multicast(struct l_genl *genl, uint32_t group,
const struct nlmsghdr *nlmsg)
{
const struct l_queue_entry *entry;
struct l_genl_msg *msg = _genl_msg_create(nlmsg);
struct l_genl_msg *msg = msg_create(nlmsg);
if (!msg)
return;
@ -1492,41 +1505,36 @@ LIB_EXPORT bool l_genl_request_family(struct l_genl *genl, const char *name,
return false;
}
const void *_genl_msg_as_bytes(struct l_genl_msg *msg, uint16_t type,
uint16_t flags, uint32_t seq,
uint32_t pid,
size_t *out_size)
LIB_EXPORT struct l_genl_msg *l_genl_msg_new(uint8_t cmd)
{
struct nlmsghdr *nlmsg;
struct genlmsghdr *genlmsg;
nlmsg = msg->data;
nlmsg->nlmsg_len = msg->len;
nlmsg->nlmsg_type = type;
nlmsg->nlmsg_flags = flags;
nlmsg->nlmsg_seq = seq;
nlmsg->nlmsg_pid = pid;
return l_genl_msg_new_sized(cmd, 0);
}
genlmsg = msg->data + NLMSG_HDRLEN;
LIB_EXPORT struct l_genl_msg *l_genl_msg_new_sized(uint8_t cmd, uint32_t size)
{
return msg_alloc(cmd, 0x00, size);
}
genlmsg->cmd = msg->cmd;
genlmsg->version = msg->version;
LIB_EXPORT struct l_genl_msg *l_genl_msg_new_from_data(const void *data,
size_t size)
{
const struct nlmsghdr *nlmsg = (const void *) data;
if (out_size)
*out_size = msg->len;
if (size < sizeof(struct nlmsghdr))
return NULL;
return msg->data;
}
if (size < nlmsg->nlmsg_len)
return NULL;
LIB_EXPORT struct l_genl_msg *l_genl_msg_new(uint8_t cmd)
{
return l_genl_msg_new_sized(cmd, 0);
return msg_create(nlmsg);
}
LIB_EXPORT struct l_genl_msg *l_genl_msg_new_sized(uint8_t cmd, uint32_t size)
LIB_EXPORT const void *l_genl_msg_to_data(struct l_genl_msg *msg, uint16_t type,
uint16_t flags, uint32_t seq,
uint32_t pid,
size_t *out_size)
{
return msg_alloc(cmd, 0x00, size);
return msg_as_bytes(msg, type, flags, seq, pid, out_size);
}
LIB_EXPORT struct l_genl_msg *l_genl_msg_ref(struct l_genl_msg *msg)
@ -1800,7 +1808,7 @@ LIB_EXPORT struct l_genl_family *l_genl_family_new(struct l_genl *genl,
if (!entry)
return NULL;
family = family_alloc(genl, info->id);
family = family_alloc(l_genl_ref(genl), info->id);
return family;
}
@ -2059,4 +2067,5 @@ LIB_EXPORT void l_genl_family_free(struct l_genl_family *family)
}
l_free(family);
l_genl_unref(genl);
}

5
ell/genl.h

@ -85,6 +85,11 @@ struct l_genl_attr {
struct l_genl_msg* l_genl_msg_new(uint8_t cmd);
struct l_genl_msg *l_genl_msg_new_sized(uint8_t cmd, uint32_t size);
struct l_genl_msg *l_genl_msg_new_from_data(const void *data, size_t size);
const void *l_genl_msg_to_data(struct l_genl_msg *msg, uint16_t type,
uint16_t flags, uint32_t seq, uint32_t pid,
size_t *out_size);
struct l_genl_msg *l_genl_msg_ref(struct l_genl_msg *msg);
void l_genl_msg_unref(struct l_genl_msg *msg);

3
ell/path.c

@ -162,7 +162,8 @@ LIB_EXPORT uint64_t l_path_get_mtime(const char *path)
if (ret < 0)
return L_TIME_INVALID;
return sb.st_mtim.tv_sec * 1000000 + sb.st_mtim.tv_nsec / 1000;
return (uint64_t) sb.st_mtim.tv_sec * 1000000 +
sb.st_mtim.tv_nsec / 1000;
}
/**

4
ell/ringbuf.c

@ -413,8 +413,8 @@ LIB_EXPORT ssize_t l_ringbuf_read(struct l_ringbuf *ringbuf, int fd)
*
* Returns: Number of appended bytes or -1 if the append failed.
**/
ssize_t l_ringbuf_append(struct l_ringbuf *ringbuf, const void *data,
size_t len)
LIB_EXPORT ssize_t l_ringbuf_append(struct l_ringbuf *ringbuf,
const void *data, size_t len)
{
size_t avail;
size_t offset;

4
ell/ringbuf.h

@ -58,8 +58,8 @@ int l_ringbuf_vprintf(struct l_ringbuf *ringbuf, const char *format,
va_list ap);
ssize_t l_ringbuf_read(struct l_ringbuf *ringbuf, int fd);
ssize_t l_ringbuf_append(struct l_ringbuf *ringbuf, const void *data,
size_t len);
ssize_t l_ringbuf_append(struct l_ringbuf *ringbuf,
const void *data, size_t len);
#ifdef __cplusplus
}

207
src/rtnlutil.c → ell/rtnl.c

@ -1,6 +1,6 @@
/*
*
* Wireless daemon for Linux
* Embedded Linux library
*
* Copyright (C) 2019 Intel Corporation. All rights reserved.
*
@ -24,14 +24,15 @@
#include <config.h>
#endif
#include <sys/socket.h>
#define _GNU_SOURCE
#include <linux/if.h>
#include <linux/rtnetlink.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <ell/ell.h>
#include "src/rtnlutil.h"
#include "util.h"
#include "netlink.h"
#include "log.h"
#include "rtnl.h"
static size_t rta_add_u8(void *rta_buf, unsigned short type, uint8_t value)
{
@ -67,7 +68,71 @@ static size_t rta_add_data(void *rta_buf, unsigned short type, void *data,
return RTA_SPACE(data_len);
}
uint32_t rtnl_set_linkmode_and_operstate(struct l_netlink *rtnl, int ifindex,
static void l_rtnl_route_extract(const struct rtmsg *rtmsg, uint32_t len,
int family, uint32_t *table, uint32_t *ifindex,
uint32_t *priority, uint8_t *pref,
char **dst, char **gateway, char **src)
{
struct rtattr *attr;
char buf[INET6_ADDRSTRLEN];
/* Not extracted at the moment: RTA_CACHEINFO for IPv6 */
for (attr = RTM_RTA(rtmsg); RTA_OK(attr, len);
attr = RTA_NEXT(attr, len)) {
switch (attr->rta_type) {
case RTA_DST:
if (!dst)
break;
inet_ntop(family, RTA_DATA(attr), buf, sizeof(buf));
*dst = l_strdup(buf);
break;
case RTA_GATEWAY:
if (!gateway)
break;
inet_ntop(family, RTA_DATA(attr), buf, sizeof(buf));
*gateway = l_strdup(buf);
break;
case RTA_PREFSRC:
if (!src)
break;
inet_ntop(family, RTA_DATA(attr), buf, sizeof(buf));
*src = l_strdup(buf);