From: Hoehle, Joerg-C. <Joe...@t-...> - 2006-02-21 18:55:44
|
Don Cohen wrote: >I'm doing this in linux. I can't reproduce this using a fresh MS-VC6 build from CVS (with 1 single typo to fix, not yet in CVS) -- but it's not Linux. > (SOCKET:SOCKET-SERVER 2223) > #<SOCKET-SERVER 127.0.0.1:2223> [8]> (SOCKET:SOCKET-SERVER 2223) #<SOCKET-SERVER 0.0.0.0:2223> > (SOCKET:SOCKET-SERVER 2224 :interface "0.0.0.0") [13]> (SOCKET:SOCKET-SERVER 2224 :interface "0.0.0.0") #<SOCKET-SERVER 0.0.0.0:2224> > (SOCKET:SOCKET-SERVER 2225 :interface "10.0.0.10") > #<SOCKET-SERVER 127.0.0.1:2225> [15]> (SOCKET:SOCKET-SERVER 2224 :interface "10.x.y.z") #<SOCKET-SERVER 10.x.y.z:2224> > (SOCKET:SOCKET-SERVER 2226 :interface "foo") > #<SOCKET-SERVER 127.0.0.1:2226> [16]> (SOCKET:SOCKET-SERVER 2226 :interface "foo") [after a small delay ~ 1 second:] #<SOCKET-SERVER 0.0.0.0:2226> Is that to be expected?? > (lisp-implementation-version) > "2.38 (2006-01-24) (built 3347122501) (memory 3349203607)" [17]> (lisp-implementation-version) "2.38 (2006-01-24) (built 3349519042) (memory 3349533052)" I'll see how this works out on Linux asap. Regards, Jorg Hohle. |
From: Hoehle, Joerg-C. <Joe...@t-...> - 2006-02-22 15:32:10
|
David N Murray wrote: >I'm trying this on WinXP, using a binary install: Then it's likely not CVS, and the patch I mentioned *is* relevant to this issue. Don Cohen writes: >It now occurs to me that the patch you mentioned might indeed fix >the problem. I'm sure it does, for most of what you see. I got (from CVS): >> > #<SOCKET-SERVER 0.0.0.0:2223> 0.0.0.0 means "all local interfaces" Both you and Don obtain 127.0.0.1 from the unpatched 2.38. >#<IO INPUT-BUFFERED SOCKET-STREAM CHARACTER 127.0.0.1:2223> >[10]> (setq s1 (socket-connect 2223 "192.168.1.3")) >*** - Winsock error 10061 (ECONNREFUSED): Connection refused Normal behaviour for a server (erroneously) bound to 127.0.0.1 Summary: 2.38 has a bug there, but the patch is in CVS since January. Don Cohen wonders: > > > (SOCKET:SOCKET-SERVER 2226 :interface "foo") > > > #<SOCKET-SERVER 127.0.0.1:2226> >Again, why does this make sense? >If the argument is invalid shouldn't you get an error? Indeed, that's another bug. I have a fix for that (not yet in CVS). CLISP will raise an error (EINVAL IIRC) when I'll merge my code. Regards, Jorg Hohle. |
From: <don...@is...> - 2006-02-21 19:19:10
|
Hoehle, Joerg-Cyril writes: > Don Cohen wrote: > > >I'm doing this in linux. > I can't reproduce this using a fresh MS-VC6 build from CVS > (with 1 single typo to fix, not yet in CVS) -- but it's not Linux. It now occurs to me that the patch you mentioned might indeed fix the problem. I may have misinterpreted your reply as meaning that the patch affected the default. The fact that supplying the value I wanted still didn't work suggested to me that changing the default was not enough. > > (SOCKET:SOCKET-SERVER 2223) > > #<SOCKET-SERVER 127.0.0.1:2223> > [8]> (SOCKET:SOCKET-SERVER 2223) > #<SOCKET-SERVER 0.0.0.0:2223> > > > (SOCKET:SOCKET-SERVER 2224 :interface "0.0.0.0") > [13]> (SOCKET:SOCKET-SERVER 2224 :interface "0.0.0.0") > #<SOCKET-SERVER 0.0.0.0:2224> > > > (SOCKET:SOCKET-SERVER 2225 :interface "10.0.0.10") > > #<SOCKET-SERVER 127.0.0.1:2225> Why is this the right result? Is the argument invalid? (If so, why?) Even if it is, it seems to me that an error would be more appropriate. > [15]> (SOCKET:SOCKET-SERVER 2224 :interface "10.x.y.z") > #<SOCKET-SERVER 10.x.y.z:2224> What does that mean? In general what does this interface argument mean? I'd have expected something that specifies a set of addresses. My best interpretation was that 0.0.0.0 was a special case meaning any and that anything else specified a singleton set. > > (SOCKET:SOCKET-SERVER 2226 :interface "foo") > > #<SOCKET-SERVER 127.0.0.1:2226> > [16]> (SOCKET:SOCKET-SERVER 2226 :interface "foo") > [after a small delay ~ 1 second:] > #<SOCKET-SERVER 0.0.0.0:2226> > Is that to be expected?? Again, why does this make sense? If the argument is invalid shouldn't you get an error? > > (lisp-implementation-version) > > "2.38 (2006-01-24) (built 3347122501) (memory 3349203607)" > [17]> (lisp-implementation-version) > "2.38 (2006-01-24) (built 3349519042) (memory 3349533052)" > > I'll see how this works out on Linux asap. > > Regards, > Jorg Hohle. |
From: David N M. <dm...@js...> - 2006-02-21 20:54:11
|
On Feb 21, Don Cohen scribed: > Hoehle, Joerg-Cyril writes: > > Don Cohen wrote: > > > > >I'm doing this in linux. > > I can't reproduce this using a fresh MS-VC6 build from CVS > > (with 1 single typo to fix, not yet in CVS) -- but it's not Linux. > It now occurs to me that the patch you mentioned might indeed fix > the problem. I may have misinterpreted your reply as meaning that > the patch affected the default. The fact that supplying the value > I wanted still didn't work suggested to me that changing the default > was not enough. > I'm trying this on WinXP, using a binary install: [24]> (lisp-implementation-version) "2.38 (2006-01-24) (built on stnt067 [192.168.0.1])" > > > (SOCKET:SOCKET-SERVER 2223) > > > #<SOCKET-SERVER 127.0.0.1:2223> > > [8]> (SOCKET:SOCKET-SERVER 2223) > > #<SOCKET-SERVER 0.0.0.0:2223> > > [7]> (setq l1 (socket-server 2223)) #<SOCKET-SERVER 127.0.0.1:2223> [8]> (setq s1 (socket-connect 2223 "127.0.0.1")) #<IO INPUT-BUFFERED SOCKET-STREAM CHARACTER 127.0.0.1:2223> [9]> (close s1) T [10]> (setq s1 (socket-connect 2223 "192.168.1.3")) *** - Winsock error 10061 (ECONNREFUSED): Connection refused The following restarts are available: ABORT :R1 ABORT Break 1 [11]> :q 192.168.1.3 is the only address of the only network card on this machine. Looking at the implementation notes, I don't believe this is the correct behavior. The impl notes say "Default is (for backward compatibility) to bind to all local interfaces...", but clearly it's not doing this anymore. > > > (SOCKET:SOCKET-SERVER 2224 :interface "0.0.0.0") > > [13]> (SOCKET:SOCKET-SERVER 2224 :interface "0.0.0.0") > > #<SOCKET-SERVER 0.0.0.0:2224> > > [14]> (socket-server-close l1) NIL [15]> (setq l1 (socket-server 2223 :interface "0.0.0.0")) #<SOCKET-SERVER 127.0.0.1:2223> [16]> (setq s1 (socket-connect 2223 "192.168.1.3")) #<IO INPUT-BUFFERED SOCKET-STREAM CHARACTER 192.168.1.3:2223> [17]> (close s1) T [18]> (socket-server-close l1) NIL > > > (SOCKET:SOCKET-SERVER 2225 :interface "10.0.0.10") > > > #<SOCKET-SERVER 127.0.0.1:2225> > Why is this the right result? Is the argument invalid? (If so, why?) > Even if it is, it seems to me that an error would be more appropriate. > [19]> (setq l1 (socket-server 2223 :interface "192.168.1.3")) #<SOCKET-SERVER 127.0.0.1:2223> [20]> (setq s1 (socket-connect 2223 "192.168.1.3")) #<IO INPUT-BUFFERED SOCKET-STREAM CHARACTER 192.168.1.3:2223> [21]> (close s1) T [22]> (setq s1 (socket-connect 2223 "127.0.0.1")) *** - Winsock error 10061 (ECONNREFUSED): Connection refused The following restarts are available: ABORT :R1 ABORT Break 1 [23]> :q I think the issue may be that the socket indicated it's bound to 127.0.0.1 when in fact, that's not the case. Dave |