Commit Graph

2255 Commits

Author SHA1 Message Date
James Prestwood 894cde987d storage: util: remove unused APIs
Both util_timespec_compare and storage_network_get_mtime
are now unused.
2019-08-21 14:16:08 -05:00
James Prestwood 4f14e4bb42 hotspot: set connected_time on network_info 2019-08-21 14:16:08 -05:00
James Prestwood 6ff86abb41 knownnetworks: use l_path_get_mtime
Rather than using timespec directly, ELL has a convenient API
to get the elapsed microseconds as a uint64_t. This can then
be used with the other l_time_ APIs for comparison.

This patch removes timespec from network_info and updates
to use l_time_* API's for sorting.
2019-08-21 14:16:08 -05:00
Will Dietz 690c9c2045 manager: Fix build
Attached, but basically replace 2-argument call to l_genl_msg_new
with what seems rather likely was intended instead: l_genl_msg_new_sized.
2019-08-21 12:29:22 -05:00
Denis Kenzior 9f1875fd3d manager: Use split wiphy dumps 2019-08-20 18:04:27 -05:00
James Prestwood ed08bc35a3 network: update hotspots on knownnetwork changes 2019-08-19 17:47:16 -05:00
James Prestwood 610ef41578 network: remove all hotspot related getter/setters 2019-08-19 13:59:01 -05:00
James Prestwood 7313d3bad7 network: remove hotspot specific settings loading
The hotspot module now uses network_info ops 'open'
2019-08-19 13:58:27 -05:00
James Prestwood 8242b7e9f3 station: add network_info after ANQP
Once ANQP is complete we can try matching the NAI realm with any
known networks.
2019-08-19 13:58:18 -05:00
James Prestwood 8910da5836 network: find hotspot network_info when adding BSS
When adding a BSS to a network: if it is hs20_capable and no
'info' has been set we attempt to search for a matching
network_info for this network.
2019-08-19 13:51:08 -05:00
James Prestwood f4ef431e8d knownnetworks: add matching ops to network_info
These operations will allow the hotspot module to implement
matching HESSID, Roaming Consortium, and NAI realms. This offloads
the matching details into the hotspot module.
2019-08-19 13:46:01 -05:00
Denis Kenzior 0577662c5b hotspot: Simplify path generation 2019-08-19 13:43:56 -05:00
James Prestwood 912fae6b2d hotspot: convert to using network_info
The hotspot module will now keep its own network_info objects to
be registered with known networks.
2019-08-19 13:27:57 -05:00
James Prestwood cb149fe380 network: add getter/setter for network_info 2019-08-19 13:27:48 -05:00
Tim Kourt 894548dfd4 netconfig: Uninstall addresses on interface removal 2019-08-19 13:23:44 -05:00
Tim Kourt e3921193f9 netconfig: Move removal of DNSs out of IPv4 specific logic
This way resolve_remove can be called once per interface and
remove IPv4 and IPv6 addresses at once.

In addition, this allows to remove the IP addresses and DNS
servers within the same main loop cycle. This will allow iwd
to make an attempt to remove the DNS servers on shutdown of iwd.
2019-08-19 13:20:48 -05:00
James Prestwood c4771c4c5d station: introduce station_network_foreach
Iterates all networks for a given station object.
2019-08-19 12:40:18 -05:00
James Prestwood 630c487534 knownnetworks: add known_networks_{add,remove}
These two API's have been added to allow hotspot to add its
own networks to the known network list. This will allow any
added networks to behave exactly like they do now, including
all the dbus and watchlist functionality.
2019-08-19 12:21:00 -05:00
Denis Kenzior c91bbe42a0 network: Make sure to update seen_count 2019-08-16 11:08:05 -05:00
James Prestwood 68c819053b knownnetworks: add hotspot flag to network_info
Hotspot will start adding its own known networks and other modules
need a way of differentiating between the two network types.
2019-08-16 11:04:07 -05:00
James Prestwood 28f484ddb8 network: knownnetworks: introduce network_info_ops
The known network APIs all revolved around the ssid/security matching
to do any operations on the provisioning file. In the near future
hotspot provisioning files (managed by hotspot.c) will be incorporated
into the known network list. Since these hotspot files do not use the
ssid as the file name hotspot.c will need other ways of matching.

This patch adds network_info_ops to the network object. This ops
structure will hold function pointers which operate on network_info
rather than ssid/security. This will allow hotspot and known networks
to both register their own operation routines.

For now open, touch, sync, remove, free, and get_path were added.

Wrappers were added for accessing these operations outside of
knownnetworks.c.
2019-08-16 11:03:06 -05:00
James Prestwood 5caf8796cd knownnetworks: move network_info into knownnetworks 2019-08-16 10:58:25 -05:00
Tim Kourt 1921990acd network: Refactor debug statement
This way the outcome of the decision whether to ask for the
passphrase or not can be seen.
2019-08-16 10:57:22 -05:00
Denis Kenzior ed8a4ab931 treewide: Make global variables static 2019-08-15 15:06:59 -05:00
Denis Kenzior 9d177a63b7 nl80211cmd: Add additional commands 2019-08-15 15:06:59 -05:00
Marcel Holtmann 42cd872994 eap: Make global variable static 2019-08-15 19:39:27 +02:00
Marcel Holtmann f41d85112e eapol: Make global variables static 2019-08-15 19:32:37 +02:00
Marcel Holtmann 884dcbab92 eapol: Remove unused global variable 2019-08-15 19:31:54 +02:00
James Prestwood 04b786ed2c knownnetworks: fix style issue, use tabs 2019-08-12 13:35:38 -05:00
Denis Kenzior 2c30a2f7ff network: Rely on known_networks added event 2019-08-09 15:45:05 -05:00
Denis Kenzior 0e77bf1c39 network: Rely on known_networks removed event
Instead of having known_networks call network_info_forget_known, instead
rely on the newly introduced KNOWN_NETWORKS_EVENT_REMOVED
2019-08-09 15:45:02 -05:00
Denis Kenzior 4fc8bea0a2 network: Add a skeleton known networks watch 2019-08-09 14:56:49 -05:00
James Prestwood e3e641dff9 knownnetworks: add watch API's
Modules can watch for known network addition and removal.
2019-08-09 14:56:49 -05:00
Denis Kenzior 227bcce40b network: Move known_frequency queue management
Isolate the known_frequency queue management to a function and place
that function in knownnetworks.c where it now belongs.  Since we no
longer have network_info objects for unknown networks, only frequencies
for known networks are tracked
2019-08-09 14:56:49 -05:00
Denis Kenzior 67eeb0386d network: Move network_info_match to knownnetworks.c 2019-08-09 14:56:49 -05:00
Denis Kenzior 0d7f591d4f network: Move network_info_free to knownnetworks.c 2019-08-09 14:56:49 -05:00
Denis Kenzior 37f71fe4e4 network: Remove the networks queue
networks queue was intended to share basic network information between
multiple adapters running simultaneously.  The network_info object was
also serving double duty to carry known network information.  This made
things overly complicated and really didn't result in much savings.
This setup also made managing hotspot networks challenging as we would
have ended up with multiple network_info objects for each known hotspot
network.

So get rid of the networks queue and the is_known bit from the
network_info structure.
2019-08-09 14:56:49 -05:00
Denis Kenzior 037ba92894 network: Store the security type in the network object 2019-08-09 14:56:49 -05:00
Denis Kenzior f800279814 network: Store SSID in the network object
And use network_get_ssid whenever possible to make future
transformations easier.
2019-08-09 14:56:46 -05:00
Denis Kenzior 72a8f2888a network: Move network offset calculation
network_find_rank_index was used to find the offset of the selected
network_info among known networks so as to compute a modifier based on
the rankmod table.  Instead of using known_networks_foreach for this,
moove it to knownnetworks.c where it can be coded and optimized
separately.

For now provide a simple for loop implementation.
2019-08-09 01:11:49 -05:00
Denis Kenzior 2d65a0030e module: Introduce a basic module dependency framework 2019-08-07 16:33:19 -05:00
Denis Kenzior cf58657b37 resolve: Add a missing l_free 2019-08-07 11:13:10 -05:00
Denis Kenzior 37987757e1 resolve: rename RESOLVCONF_PATH
Since it is no longer a define, switch to using lower-case letters
2019-08-07 11:09:50 -05:00
Denis Kenzior f6bb911d2c resolve: Search more places for resolvconf exe
Some distros put resolvconf in /usr/sbin instead of /sbin.  Do not try
to hard-code the path and instead search for it in more places.
2019-08-07 10:57:11 -05:00
Denis Kenzior e7f16775ac main: Don't try to queue if name request fails
This in fact allows multiple instances of iwd to run.
2019-08-04 04:49:24 -05:00
Denis Kenzior 30315cba0d station: Add some additional roaming debugs 2019-08-04 04:49:24 -05:00
Denis Kenzior 188e6d1237 netdev: Tweak debugging for SET_CQM 2019-08-04 04:49:24 -05:00
Marcel Holtmann deee526b98 manager: Make default_if_driver_list static 2019-08-04 00:35:14 +02:00
Marcel Holtmann 16c489490c build: Fix issue with incorrect ReadWritePaths in unit files 2019-08-03 09:52:28 +02:00
Marcel Holtmann 30821979f6 netconfig: Use different includes that also work on older systems 2019-08-02 20:33:43 +02:00