URL:
  <http://gna.org/bugs/?21583>

                 Summary: Client can connect to manually started server rather
than its own spawned one
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Sun Feb  2 14:56:08 2014
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: S2_4 r24327
         Discussion Lock: Any
        Operating System: Microsoft Windows
         Planned Release: 

    _______________________________________________________

Details:

Observed while verifying fix for bug #21547 with cproc's S2_4 r24327 Windows
test build
<http://download.gna.org/freeciv/packages/windows/testing/S2_4-r24327/>:

I had a freeciv-server.exe running (port 5556, started from start menu),
started a freeciv-gtk2.exe, and accidentally chose "new game" rather than
"connect to network game".

To my surprise, it connected to my manually-started server rather than one of
its own.

Didn't seem 100% reproducible but I got it to happen twice in a few tries.
Details from the second time:

There were two freeciv-server.exe processes, unsurprisingly.

netstat -a -b -o showed:


  TCP    0.0.0.0:5556           Teacup:0               LISTENING       3504
[freeciv-server.exe]
  TCP    127.0.0.1:5556         Teacup:0               LISTENING       3140
[freeciv-server.exe]
  TCP    127.0.0.1:5556         Teacup:49176           ESTABLISHED     3504
[freeciv-server.exe]
  TCP    127.0.0.1:49176        Teacup:5556            ESTABLISHED     2180
[freeciv-gtk2.exe]


PID 3504 is presumably my standalone server and 3140 the spawned one.

I guess the problem is that Freeciv assumes it's not possible for two
processes to listen on 0.0.0.0:5556 and 127.0.0.1:5556 simultaneously, or
something.
(Can I just note that I hate interface binding semantics.)

Quitting the client then killed the manually started server (unsurprisingly).

After quitting the manual server, the spawned server hung around
(unsurprisingly), but it didn't obviously cause trouble (a new client-spawned
server used 5557).
(This might have been behind my lack of reproducibility, I didn't check again
after I realised this was happening.)

(Windows 7 32-bit. Machine not connected to any "real" network, if it makes a
difference.)

Dunno if this is 2.4.2 blocker -- case of manual server and local game
simultaneously is quite niche, and messing around with this might break
something else.




    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?21583>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to