39 lines
2.7 KiB
Plaintext
39 lines
2.7 KiB
Plaintext
- global dnsmasq service needs to be stopped, in order to avoid overwriting resolv.conf with configuration of local loopback interface (nameserver 127.0.0.1)
|
|
- global dhcpcd service needs to be stopped
|
|
- gloabel hostapd service needs to be stopped
|
|
- global wpa_supplicant service needs to be stopped
|
|
|
|
|
|
ToDo:
|
|
1) robust networking vs USB gadget reconfiguration / WiFi reconfiguration / Bluetooth reconfiguration
|
|
1.1) Every time the USB gadget changes, possible existing network interfaces (usbeth) are rebuild
|
|
- this should lead to automatic reconfiguration of the network interface (restore settings)
|
|
- this again means, the configuration state has to be cached and a basic network configuration for the
|
|
`usbeth` interface has to at every time (service startup configuration)
|
|
- the cached network settings and the deployed network settings (effective settings) have to be kept in sync
|
|
like done with the USB gadget state. This is, because the sate (cached settings) is user modifiable which
|
|
doesn't necessarily mean it is deployable (wrong settings, like an interface IP which is already in use).
|
|
- reconfiguration of the network interface should include killing old DHCP servers/clients and deleting
|
|
cached DHCP leases
|
|
- !!! THIS PROBLEM IS MOSTLY DEDICATED TO USB ETHERNET !! partially WiFi/BNEP interfaces are affected, too.
|
|
This involves a new problem: If every network interface is handled with a cached state, an initial state has
|
|
to be defined for every interface available. But, the intention of the network reconfiguration part of the
|
|
CLI tool (`NET` commands) is to configure interfaces, even if they aren't known before runtime. Not knowing all
|
|
interfaces before runtime, again means, ther couldn't exist a default configuration.
|
|
--> Solution: A default configuration is only defined (and deployed on service start) for known interfaces (wlan0, usbeth).
|
|
The cached state for other interfaces is created, as soon as the settings are changed the first time and updated later on.
|
|
|
|
A second problem is, that the state couldn't fully reflect the deployed configuration:
|
|
Example: An interface, let's say `wlan0` is configured in DHCP client mode. If an external DHCP server hands
|
|
out a lease to this interface, an IP address is assigned to the interface BUT NOT REFLECTED BACK TO THE CACHED STATE
|
|
(although, there's a field in the settings struct which represents an IPv4 address for the interface)
|
|
|
|
1.2) With WiFi it is the similar, every time the WiFi stack changes from Access Point to Station mode
|
|
or back, the network should be reconfigured (but would work without).
|
|
|
|
2) Cleanly kill all wpa_supplicant processes (for now dead processes)
|
|
|
|
3) IPv6 support
|
|
|
|
4) Store device path to hid devices in internal state of service and create an RPC struct to communicate !ALL! active
|
|
device paths. |