Bug 273 - Query port not binding to specified IP address
Status: RESOLVED FIXED
Alias: None
Product: Battlefield 1942
Classification: Unclassified
Component: dedicated server
Version: beta1
Hardware: PC Linux
: P3 minor
Assignee: Ryan C. Gordon
QA Contact:
URL:
: 275
Depends on:
Blocks:
 
Reported: 2002-12-12 19:18 EST by Zachary Williams
Modified: 2003-01-16 07:17:55 EST
1 user (show)

See Also:



Description Zachary Williams 2002-12-12 19:18:46 EST
While the game will bind to the proper IP, the query port does 'not' bind to
the proper IP.  It meerly binds on a global basis, instead of to the aliased
interface.

netstat -an output (snipped)

udp        0      0 146.20.43.191:14567     0.0.0.0:*
udp        0      0 0.0.0.0:23000           0.0.0.0:*

It should bind to 146.20.43.191:23000 not 0.0.0.0.  It functions, but, it
will cause issues for multiple servers on a single machine.
Comment 1 Ryan C. Gordon 2002-12-13 23:39:46 EST
*** Bug 275 has been marked as a duplicate of this bug. ***
Comment 2 Ryan C. Gordon 2002-12-15 09:34:15 EST
Looking at for next patch.

--ryan.

Comment 3 Ryan C. Gordon 2002-12-26 04:41:34 EST
Please recheck with build #1040889129:

http://icculus.org/betas/bf1942/bf1942-lnxded-betaupdate-build-1040889129.tar.bz2

--ryan.

Comment 4 Steven Hartland 2002-12-26 09:39:36 EST
With build 1040889129 fails to bind to any address other than 0.0.0.0
FreeBSD 4.7 Linux Compat 7.1
Specifying an address:
gamespy: trying to bind to 212.42.10.162, port 23000.
gamespy: bind failed! -1 errno=99 [Cannot assign requested address].
..

No address specified:
gamespy: trying to bind to 255.255.255.255, port 23063.
gamespy: bind failed! -1 errno=99 [Cannot assign requested address].
..

0.0.0.0 specified:
gamespy: trying to bind to 0.0.0.0, port 23000.

Comment 5 Piero Piutti 2002-12-27 04:37:47 EST
p2 333 with 128mb ram
Slackware 8.1 + kernel 2.4.20 and glibc 2.3.1
build #1040889129

Specifying an address:
gamespy: trying to bind to 123.234.123.234, port 23000.
[This works fine
udp        0      0 123.234.123.234:23000      0.0.0.0:*
udp        0      0 123.234.123.234:14567      0.0.0.0:*
]

No address specified:
gamespy: trying to bind to 255.255.255.255, port 23000.
[No error on the console, but the server seems down via ASE
udp        0      0 255.255.255.255:23000   0.0.0.0:*
udp        0      0 0.0.0.0:14567           0.0.0.0:*
]

0.0.0.0 specified:
gamespy: trying to bind to 0.0.0.0, port 23000.
[This works fine
udp        0      0 0.0.0.0:23000           0.0.0.0:*
udp        0      0 0.0.0.0:14567           0.0.0.0:*
]

Comment 6 Ryan C. Gordon 2003-01-16 05:50:51 EST
I believe this is now fixed for FreeBSD. Can you confirm before I resolve this bug?

--ryan.

Comment 7 Steven Hartland 2003-01-16 07:08:42 EST
Indeed it is.
game.setServerIP 212.42.10.162 now gives:
gamespy: trying to bind to 212.42.10.162, port 23000.
Comment 8 Ryan C. Gordon 2003-01-16 07:17:55 EST
(For the record, the "fix" was to set the UDP socket to be "reusable"...this is
either a peculiar aspect of FreeBSD or a bug in the Linux binary compatibility
that it requires this. Not that it shouldn't be set reusable, but gamespy's SDK
doesn't do this by default...).

--ryan.