don't add a canceled, empty route

This was especially bad when lastIP filled in default values,
       so this patch pretty much depends on the patch that cancels
       the auto-filled lastIP.

       This didn't cause a problem - it just cluttered up the routing
       table with duplicate, undeletable routes.
This commit is contained in:
Tim Young 2019-02-23 12:08:01 -06:00
parent 2ae5781bea
commit ddebafeec9

View File

@ -755,7 +755,10 @@ namespace EduNetworkBuilder
{
NB_IPAddress newip = new NB_IPAddress(NB.ZeroIPString, NB.ZeroIPString, NB.ZeroIPString);
newip.Edit(myNetDevice, this, NB.Translate("LBW_AddRouteCreate"));
myNetDevice.AddRoute(newip);
if (!newip.Equals(new NB_IPAddress(NB.ZeroIPString, NB.ZeroIPString, NB.ZeroIPString)))
{
myNetDevice.AddRoute(newip);
}
UpdateForm();
}