From Daniel Connelly <danc2@xxxxxxx>:
Daniel Connelly has uploaded this change for review. (
https://review.haiku-os.org/767
Change subject: Network: fixing unconfigurable network once network has been
configured
......................................................................
Network: fixing unconfigurable network once network has been configured
This patch may fix the following bugs:
<======>
https://dev.haiku-os.org/ticket/6423
https://dev.haiku-os.org/ticket/14626
<======>
Explanation
<======>
In BringUpInterfaces, line 772 creates an error which only adds a missing
interface if one does not already exist (i.e., !_testInterface()). This can
lead to a missing WiFi interface if an Ethernet connection has been configured
and set in the /boot/system/settings/network/interfaces before the WiFi has had
a chance to be added to /dev/net. To properly configure a missing device, such
as a WiFi connection, and allow the user to choose amongst configured
interfaces (i.e., add it to the list of devices in /dev/net and e.g., see WiFi
as an option), removing the 'if' statement on line 772 is necessary.
<======>
Two edge cases may arise:
<======>
1. A user may disable an interface -- don't add device
Solution: The code currently handles this. _ConfigureInterfacesFromSettings,
called at line 746, checks for interfaces in fSettings to see if they are
disabled (706-711). If so, they are disabled and not set as a missingDevice if
the interface is disabled (709). The next interface is checked…etc.
2. Devices must not be added twice (i.e., Checking for An Existing configured
Network)
Solution: The code currently checks for this. On lines 716-720, a device that
is found in fSettings (missingDevice), is set to the interface which is later
added to the /dev/net within that (unnecessary?) if statement (772). The
missingDevice will only be set and added to /dev/net if an entry does not exist
in the settings already (716) (hence the identifier missingDevice).
---
M src/servers/net/NetServer.cpp
1 file changed, 3 insertions(+), 5 deletions(-)
git pull ssh://git.haiku-os.org/haiku refs/changes/67/767/1
--
To view, visit https://review.haiku-os.org/767
To unsubscribe, or for help writing mail filters, visit
https://review.haiku-os.org/settings
Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc303371b88f18c30141a651a7d97a3c860e864f
Gerrit-Change-Number: 767
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Connelly <danc2@xxxxxxx>