Tim Young
06eb896558
The problem is seen in the first puzzle if you ping pc0, and then edit the 0.0.0.0 gateway. It auto-fills in the last-used pc0 IP address, and canceling saves that change instead of leaving the gateway at 0.0.0.0. lastIP nicely saves some typing (although it has also confused my student quite a bit I think), but since it updates WhatToEdit, that becomes the "saved" value even during a cancel. Instead, save the original value as a copy, and set back to the original value when cancellng. Perhaps it would be worth creating a reparse( NB_IPAddress) function, but this was easy to just hack together. Tested by pinging pc0, then editing the gateway and cancellng, editing the IP address and canceling. Next: don't add a canceled route