From ddebafeec9b6ac871ed7f65c33a74182179a7054 Mon Sep 17 00:00:00 2001 From: Tim Young Date: Sat, 23 Feb 2019 12:08:01 -0600 Subject: [PATCH] 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. --- EduNetworkBuilder/ListBoxWindow.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/EduNetworkBuilder/ListBoxWindow.cs b/EduNetworkBuilder/ListBoxWindow.cs index c1a48e1..6f8bd78 100644 --- a/EduNetworkBuilder/ListBoxWindow.cs +++ b/EduNetworkBuilder/ListBoxWindow.cs @@ -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(); }