summaryrefslogtreecommitdiff
path: root/service-t/src/com/android/server/ethernet/EthernetConfigStore.java
Commit message (Collapse)AuthorAgeFilesLines
* Move ipconfig file inside apex data directoryPatrick Rohr2022-05-201-16/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to support rollbacks, the ethernet ipconfig file needs to be written to the data apex's data directory. We still need to support reading from the legacy location to be backwards compatible. If the apex file path already exists, then read the IP configuration from there directly, otherwise, check if the legacy file path exists, if yes, read the legacy IP configuration and copy it to the new apex file path. Support for default IpConfiguration is also being removed in this CL. The default IpConfiguration (configuration entry for interface "0") was a way to transition from supporting a single interface to supporting multiple interfaces and was introduced in P. Every device that has used such a configuration and has connected to an ethernet network since upgrading to P+ has already removed the "0" config and has assigned it to the first interface (probably "eth0"). There has never been an API to set this, but if someone wanted to install a default IpConfiguration, they could just configure "eth0" instead. Bug: 224919694 Test: atest EthernetConfigStoreTest --iterations Test: manually test - adb push <fake ipconfig.txt> /data/misc/ethernet/ - adb reboot - read the IP config from legacy path and the same config file is created in the apex file path - adb reboot - read the IP config from the apex file path directly Change-Id: Ifb82a5d7fa13d17ea8fd3a42a19cd020cb95e26a (cherry picked from commit 47641d75d991a26e8616a239b717021810dee798) Merged-In: Ifb82a5d7fa13d17ea8fd3a42a19cd020cb95e26a
* Fix overriding ip configurtion with default onePavel Maltsev2018-05-141-1/+4
| | | | | | | | | | | EthernetConfigStore should return 'null' for default interface if the default interface hasn't been configured otherwise it would be hard to distinguish not-configured vs configured with default values. Bug: 79415136 Test: verified w/o .xml overlay Ethernet continues to work Test: verified that ip config from overlay is not getting overriden Change-Id: I4eb914923f3664b12b6af0ae05f45b60c5312b02
* Enable multiple active Ethernet interfacesPavel Maltsev2018-01-251-20/+43
| | | | | | | | | | - reworked EthernetNetworkFactory to support multiple active Ethernet interfaces - allow vendors to specify network capabilities + ip config through XML config overlay Test: manual using hikey960 + multiple usb->eth adapters Change-Id: Ie39bcb0d2a3f960f497222159c7bd5797accaa68
* Stop using LinkProperties for static configuration.Lorenzo Colitti2014-08-191-2/+1
| | | | | | | | | Also make static IP configuration more robust (e.g., tear down our NetworkAgent when we switch between static and DHCP). Bug: 16114392 Bug: 16893413 Change-Id: Ib33f35c004e30b6067bb20235ffa43c247d174df
* Initial EthernetService implementation.Lorenzo Colitti2014-05-211-0/+63
Bug: 14981801 Bug: 14993642 Change-Id: If392ef7063e096854ef830f4fe3b038439a1d307