There was an error in Host Editor MAC string handling, all the zeroes
got removed thus causing the MAC to be incorrect.
tr("HW address of target, e.g. 00:01:02:AA:BB:CC. "
"Hint, in Linux/Unix: \"ifconfig\","
"in Windows \"ipconfig /all\""));
tr("HW address of target, e.g. 00:01:02:AA:BB:CC. "
"Hint, in Linux/Unix: \"ifconfig\","
"in Windows \"ipconfig /all\""));
- mac->setInputMask("HH:HH:HH:HH:HH:HH;0");
+ mac->setInputMask("HH:HH:HH:HH:HH:HH;_");
mac_row->addWidget(mac_lbl);
mac_row->addWidget(mac);
vlayout->addLayout(mac_row);
mac_row->addWidget(mac_lbl);
mac_row->addWidget(mac);
vlayout->addLayout(mac_row);
- new_host->mac= this->mac->text();
- if (new_host->mac.isEmpty())
+
+ new_host->mac = this->mac->text();
+ if (new_host->mac.length() != MAX_MAC_STR_LEN)
- msgBox.setText("You must set mac!");
+ msgBox.setText("You must set mac to full 12 digits!\n" \
+ "E.g. 00:11:22:33:44:55:66");
+#define MAC_COLON_CNT 5
+#define MAX_MAC_STR_LEN (MAX_MAC_LEN + MAC_COLON_CNT)