mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
Add network connection: Show current IP address when editing a connection
- Added some generic network helper functions to global network helper class to get some information from a device by it's name. This is used when editing a connection (no ip was shown before). - ToDo: This is only a workaround because we want to get the information from the connection but not from the device which belongs to the connection. If multiple connections are setup on the same device, this workaround will not work anymore.
This commit is contained in:
parent
c3e5753b52
commit
f49def2d39
@ -204,11 +204,8 @@ def edit(request, uuid):
|
||||
settings_ipv4 = connection.get_setting_ip4_config()
|
||||
form_data['ipv4_method'] = settings_ipv4.get_method()
|
||||
|
||||
if settings_ipv4.get_num_addresses():
|
||||
# XXX: Plinth crashes here. Possibly because a double free bug
|
||||
# address = settings_ipv4.get_address(0)
|
||||
# form_data['ipv4_address'] = address.get_address()
|
||||
pass
|
||||
name = connection.get_interface_name()
|
||||
form_data['ipv4_address'] = network.get_ip_from_device(name)
|
||||
|
||||
if settings_connection.get_connection_type() == '802-11-wireless':
|
||||
settings_wireless = connection.get_setting_wireless()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user