PDP-10 / supdup

Community maintained SUPDUP client for Unix
Other
16 stars 8 forks source link

Allow connections to the "local subnet" 376. #30

Closed larsbrinkhoff closed 1 year ago

larsbrinkhoff commented 1 year ago

I tried to set up a local Chaos network much like described in http://chaosnet.net/local, but supdup wouldn't connect to my ITS host. Checking the supdup code, I see get_chaos_host will not allow an octal address with the subnet part being 376. This pull request changes that, and now the connection succeeds. I'm not sure what the intent was in not allowing subnet 376, so I hope this can be explained and hashed out.

larsbrinkhoff commented 1 year ago

Agreed.

bictorv commented 1 year ago

But even with the fix, the code is wrong, since net 0xff is an OK subnet. The code should just check that both host and subnet bytes are non-zero, so skip the "middle" part of the test (which you edited) altogether. (Note: haddrs[0] is u_short and is parsed with %ho, so can't be > 0xffff).

larsbrinkhoff commented 1 year ago

Ok, I will fix the fix.