rcornwell / sims

Burroughs B5500, ICL1900, SEL32, IBM 360/370, IBM 7000 and DEC PDP10 KA10/KI10/KL10/KS10, PDP6 simulators for SimH
http://sky-visions.com
95 stars 20 forks source link

IMP device DHCP changes while executing #301

Open afberendsen opened 1 year ago

afberendsen commented 1 year ago

Hi there

I found a logical bug with the IMP device.

If DHCP is disabled for the IMP device, and one tries to ATTACH a network device, it would fail if IP and GW are not defined.

However, after the IMP device is ATTACHed, one can disable the DHCP option (SET IMP NODHCP) and it will work.

Maybe the right approach would be to not allow the DHCP option to be changed if the IMP device is already attached?

KA-10 simulator V4.0-0 Current        git commit id: ede38413
sim> set imp enable
sim> show imp
IMP     MAC=00:00:02:31:83:47, MPX=0, IP=0.0.0.0/0
        GW=0.0.0.0, HOST=0.0.0.0, DHCP Server IP=0.0.0.0, State:OFF, Waited 0 seconds
        not attached, DHCP, MIT
sim> attach imp eth12
%SIM-INFO: Eth: opened OS device \Device\NPF_{EDF7020B-3C8F-4980-866D-2CF83E8CF66F} - Intel-2.5Gb
sim> set imp nodhcp
sim> show imp
IMP     MAC=00:00:02:31:83:47, MPX=0, IP=0.0.0.0/0
        GW=0.0.0.0, HOST=0.0.0.0, DHCP disabled
sim> detach imp
%SIM-INFO: Eth: closed \Device\NPF_{EDF7020B-3C8F-4980-866D-2CF83E8CF66F}
sim> attach imp
Too few arguments
sim>