diff --git a/supervisor/api/network.py b/supervisor/api/network.py index 345c5b09a..65553f358 100644 --- a/supervisor/api/network.py +++ b/supervisor/api/network.py @@ -234,7 +234,7 @@ class APINetwork(CoreSysAttributes): ipv4_config = None if ATTR_IPV4 in body: ipv4_config = IpConfig( - body[ATTR_IPV4].get(ATTR_METHOD, InterfaceMethod.DHCP), + body[ATTR_IPV4].get(ATTR_METHOD, InterfaceMethod.AUTO), body[ATTR_IPV4].get(ATTR_ADDRESS, []), body[ATTR_IPV4].get(ATTR_GATEWAY, None), body[ATTR_IPV4].get(ATTR_NAMESERVERS, []), @@ -243,7 +243,7 @@ class APINetwork(CoreSysAttributes): ipv6_config = None if ATTR_IPV6 in body: ipv6_config = IpConfig( - body[ATTR_IPV6].get(ATTR_METHOD, InterfaceMethod.DHCP), + body[ATTR_IPV6].get(ATTR_METHOD, InterfaceMethod.AUTO), body[ATTR_IPV6].get(ATTR_ADDRESS, []), body[ATTR_IPV6].get(ATTR_GATEWAY, None), body[ATTR_IPV6].get(ATTR_NAMESERVERS, []), diff --git a/supervisor/dbus/payloads/interface_update.tmpl b/supervisor/dbus/payloads/interface_update.tmpl index 539de2ea0..7b1758503 100644 --- a/supervisor/dbus/payloads/interface_update.tmpl +++ b/supervisor/dbus/payloads/interface_update.tmpl @@ -13,7 +13,7 @@ , 'ipv4': { -{% if interface.ipv4.method == "dhcp" %} +{% if interface.ipv4.method == "auto" %} 'method': <'auto'> {% elif interface.ipv4.method == "disable" %} 'method': <'disabled'> @@ -36,7 +36,7 @@ , 'ipv6': { -{% if interface.ipv6.method == "dhcp" %} +{% if interface.ipv6.method == "auto" %} 'method': <'auto'> {% elif interface.ipv6.method == "disable" %} 'method': <'disabled'> diff --git a/supervisor/host/const.py b/supervisor/host/const.py index 81eda44fb..d8762c380 100644 --- a/supervisor/host/const.py +++ b/supervisor/host/const.py @@ -7,7 +7,7 @@ class InterfaceMethod(str, Enum): DISABLED = "disabled" STATIC = "static" - DHCP = "dhcp" + AUTO = "auto" class InterfaceType(str, Enum): diff --git a/supervisor/host/network.py b/supervisor/host/network.py index a0313e5c2..c19ba608a 100644 --- a/supervisor/host/network.py +++ b/supervisor/host/network.py @@ -264,7 +264,7 @@ class Interface: def _map_nm_method(method: str) -> InterfaceMethod: """Map IP interface method.""" mapping = { - NMInterfaceMethod.AUTO: InterfaceMethod.DHCP, + NMInterfaceMethod.AUTO: InterfaceMethod.AUTO, NMInterfaceMethod.DISABLED: InterfaceMethod.DISABLED, NMInterfaceMethod.MANUAL: InterfaceMethod.STATIC, }