From df3ba9532d9d1f8b889dcb6869e96af9dcdc1177 Mon Sep 17 00:00:00 2001 From: Kyle Ambroff Date: Mon, 27 Feb 2017 14:47:37 -0800 Subject: [PATCH] Don't query DNS when statically configuring an interface Fixes #12399 The Network preferences app was querying DNS to find a hostname associated with the IP address, netmask and gateway when statically configuring an interface. This is obviously unecessary and leads to unexpected blocking when DNS is not available. Adding B_NO_ADDRESS_RESOLUTION flag to disable the reverse lookup. Signed-off-by: Adrien Destugues --- src/preferences/network/InterfaceAddressView.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/preferences/network/InterfaceAddressView.cpp b/src/preferences/network/InterfaceAddressView.cpp index 520dd5834f..e40ebd0d24 100644 --- a/src/preferences/network/InterfaceAddressView.cpp +++ b/src/preferences/network/InterfaceAddressView.cpp @@ -344,5 +344,6 @@ InterfaceAddressView::_SetAddress(BNetworkAddress& address, const char* text) if (string.IsEmpty()) return; - address.SetTo(string.String()); + address.SetTo(string.String(), static_cast(0), + B_NO_ADDRESS_RESOLUTION); }