Skip to content
Browse files

Fix a bug where a blank DNS can be saved in pc-netmanager.

  • Loading branch information...
1 parent d9f825f commit f75599e0bb25b5e75a774c80426984dcd8f2f924 @beanpole135 beanpole135 committed
Showing with 7 additions and 5 deletions.
  1. +7 −5 src-qt4/pc-netmanager/src/NetworkManager/networkman.cpp
View
12 src-qt4/pc-netmanager/src/NetworkManager/networkman.cpp
@@ -843,15 +843,17 @@ void NetworkMan::slotCheckGlobalText()
}
}
}
-
- if ( lineDNS1->text() != "..." && ! pcbsd::Utils::validateIPV4(lineDNS1->text() ) && groupDNS->isChecked()) {
+
+ if(groupDNS->isChecked()){
+ if( lineDNS1->text() == "..." && lineDNS2->text() == "..." ){ return; }
+ if ( lineDNS1->text() != "..." && ! pcbsd::Utils::validateIPV4(lineDNS1->text() ) ) {
textGlobalError->setText(tr("Invalid DNS specified"));
return;
- }
-
- if ( lineDNS2->text() != "..." && ! pcbsd::Utils::validateIPV4(lineDNS2->text() ) && groupDNS->isChecked()) {
+ }
+ if ( lineDNS2->text() != "..." && ! pcbsd::Utils::validateIPV4(lineDNS2->text() ) ) {
textGlobalError->setText(tr("Invalid DNS specified"));
return;
+ }
}

0 comments on commit f75599e

Please sign in to comment.
Something went wrong with that request. Please try again.