[Freeciv-Dev] [bug #14106] civserver should use --bind= address when connecting to the metaserver, too
Update of bug #14106 (project freeciv): Status:None = Fixed Open/Closed:Open = Closed ___ Reply to this item at: http://gna.org/bugs/?14106 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #14106] civserver should use --bind= address when connecting to the metaserver, too
Update of bug #14106 (project freeciv): Category:None = general Assigned to:None = cazfi Operating System:None = Any Planned Release: = 2.4.0 ___ Follow-up Comment #11: I can't see need for case mentioned in comment #5 about someone wanting to bind addresses where server listens clients, but not the address used in connecting metaserver. So I don't think we need to consider that. In current TRUNK curl is used to connect metaserver. I have not yet checked what it means for this patch. ___ Reply to this item at: http://gna.org/bugs/?14106 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #14106] civserver should use --bind= address when connecting to the metaserver, too
Follow-up Comment #12, bug #14106 (project freeciv): Well, I ended writing new patch from scratch. (file #13189) ___ Additional Item Attachment: File name: BindMeta_14106.diffSize:4 KB ___ Reply to this item at: http://gna.org/bugs/?14106 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #14106] civserver should use --bind= address when connecting to the metaserver, too
Update of bug #14106 (project freeciv): Status:Wont Fix = None Assigned to: pepeto = None Open/Closed: Closed = Open ___ Follow-up Comment #10: Could Wont Fix be dropped then? Done. ___ Reply to this item at: http://gna.org/bugs/?14106 ___ Message posté via/par Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #14106] civserver should use --bind= address when connecting to the metaserver, too
Follow-up Comment #5, bug #14106 (project freeciv): And what if you don't want to set --Bind-meta but you need --bind? I am not convinced by the need of this feature. Do you know also the --identity parameter? I think this is enough to do all that you need, right? ___ Reply to this item at: http://gna.org/bugs/?14106 ___ Message posté via/par Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #14106] civserver should use --bind= address when connecting to the metaserver, too
Follow-up Comment #6, bug #14106 (project freeciv): And what if you don't want to set --Bind-meta but you need --bind? Unfortunately, I cannot foresee all the possible network set-ups within which civserver may be deployed. So, I'd better leave such a feature to be implemented by those who demand it. I am not convinced by the need of this feature. To demonstrate the need for this feature, I've switched one of my civserver instances to use port 9876 and the unpatched version of civserver with `-b 62.109.12.37' (instead of `-B 62.109.12.37'.) Just now, I'm able to see my server in the list at http://www.cazfi.net/freeciv/metaserver/, but, obviously, I won't be able to connect to it (unless the address will be specified explicitly.) Perhaps, someone else would have better luck with it? Do you know also the --identity parameter? I think this is enough to do all that you need, right? As of civserver 2.1.9, there's no such command line option, or, at least, neither $ civserver --help, nor grep(1) over the source, reveals it. Besides, using the peer address seems much more secure than using the information contained within the HTTP request to the metaserver. Thank you for your consideration. ___ Reply to this item at: http://gna.org/bugs/?14106 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #14106] civserver should use --bind= address when connecting to the metaserver, too
Update of bug #14106 (project freeciv): Status:None = Wont Fix Open/Closed:Open = Closed ___ Follow-up Comment #7: I think the --identity parameter is really enough for doing what you are requesting. I check the source code, and it appears this parameter have recently added, so you are right it's on in 2.1.9, but it will be in next releases, 2.1.10 and 2.2.0. So I guess I can close this one now. Reference of the ticket in the old tracker rt PR#40755. ___ Reply to this item at: http://gna.org/bugs/?14106 ___ Message posté via/par Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #14106] civserver should use --bind= address when connecting to the metaserver, too
Update of bug #14106 (project freeciv): Assigned to:None = pepeto ___ Reply to this item at: http://gna.org/bugs/?14106 ___ Message posté via/par Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #14106] civserver should use --bind= address when connecting to the metaserver, too
Follow-up Comment #3, bug #14106 (project freeciv): In the end, it appears that --Bind-meta= is a more sensible thing to do in the case of a multihomed host Why is that? It seems to me that this only forces user to enter same IP twice; once for --bind and second time for --Bind-meta. Actually, if they differ, doesn't client get wrong IP from metaserver (the one server used to connect metaserver, and not the one server is listening client connections from)? ___ Reply to this item at: http://gna.org/bugs/?14106 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #14106] civserver should use --bind= address when connecting to the metaserver, too
Follow-up Comment #4, bug #14106 (project freeciv): In the end, it appears that --Bind-meta= is a more sensible thing to do in the case of a multihomed host Why is that? It seems to me that this only forces user to enter same IP twice; once for --bind and second time for --Bind-meta. Not at all, as --bind= already implies --Bind-meta= on the same address with my patch: + if ((b_a = srvarg.meta_bind_addr != 0 + ? srvarg.meta_bind_addr + : srvarg.bind_addr) != 0) { Actually, if they differ, doesn't client get wrong IP from metaserver (the one server used to connect metaserver, and not the one server is listening client connections from)? This option allows for a multi-homed host to use a specific IPv4 address when reporting to the metaserver, while still accepting connections on any of its addresses. In my case, e. g., the server has a NATed private (RFC 1918) IPv4 address from a cheaper ISP, which is the default route, and a real IPv4 address from another ISP (not to talk about of yet another RFC 1918 address for LAN.) While I wish for civserver to accept connections on any of these addresses, I need a specific IPv4 to be reported to the metaserver. Unless --Bind-meta= is used, the connection will be done using the NATed address, and the address of the NAT will be in the Metaserver's list. ___ Reply to this item at: http://gna.org/bugs/?14106 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #14106] civserver should use --bind= address when connecting to the metaserver, too
Follow-up Comment #2, bug #14106 (project freeciv): I've updated the patch. In the end, it appears that --Bind-meta= is a more sensible thing to do in the case of a multihomed host (except for the case of binding different civservers to different IP addresses.) I'm going to attach an updated patch soon. (file #6492) ___ Additional Item Attachment: File name: freeciv-2.1.9-metabind-2.patch Size:3 KB ___ Reply to this item at: http://gna.org/bugs/?14106 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #14106] civserver should use --bind= address when connecting to the metaserver, too
URL: http://gna.org/bugs/?14106 Summary: civserver should use --bind= address when connecting to the metaserver, too Project: Freeciv Submitted by: None Submitted on: Tuesday 08/11/2009 at 19:26 CEST Category: None Severity: 2 - Minor Priority: 5 - Normal Status: None Assigned to: None Originator Email: oneing...@gmail.com Open/Closed: Open Discussion Lock: Any Release: Operating System: None ___ Details: Currently, civserver has an option to bind () on a certain IP address. This option is, however, useless for my multihomed system, as it still tries to connect to the metaserver from the other IP, resulting in a non-working metaserver list entry. Alternatively, a separate option (e. g.: --meta-bind=) could be added. ... Perhaps, the change is something like adding the bits like the following ones of sernet.c (server_open_socket): 952if (!net_lookup_service(srvarg.bind_addr, srvarg.port, src, FALSE)) { 953 freelog(LOG_FATAL, _(Server: bad address: %s:%d.), 954 srvarg.bind_addr, srvarg.port); 955 exit(EXIT_FAILURE); 956} 999if(bind(sock, src.saddr, sockaddr_size(src)) == -1) { 1000 freelog(LOG_FATAL, Server bind failed: %s, fc_strerror(fc_get_errno())); 1001 sockaddr_debug(src); 1002 exit(EXIT_FAILURE); 1003} ... to meta.c (send_to_metaserver), in between the calls to socket () and fc_connect (): 217if ((sock = socket(meta_addr.saddr.sa_family, SOCK_STREAM, 0)) == -1) { 218 freelog(LOG_ERROR, Metaserver: can't open stream socket: %s, 219 fc_strerror(fc_get_errno())); 220 metaserver_failed(); 221 return FALSE; 222} 223 224if (fc_connect(sock, meta_addr.saddr, 225 sockaddr_size(meta_addr)) == -1) { 226 freelog(LOG_ERROR, Metaserver: connect failed: %s, fc_strerror(fc_get_errno())); 227 metaserver_failed(); 228 fc_closesocket(sock); 229 return FALSE; 230} Hopefully I'd be able to do the change and try it soon. TIA. ___ Reply to this item at: http://gna.org/bugs/?14106 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #14106] civserver should use --bind= address when connecting to the metaserver, too
Additional Item Attachment, bug #14106 (project freeciv): File name: freeciv-2.1.9- Size:0 KB ___ Reply to this item at: http://gna.org/bugs/?14106 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #14106] civserver should use --bind= address when connecting to the metaserver, too
Follow-up Comment #1, bug #14106 (project freeciv): FWIW, the patch I've made (attached) seems to work. ___ Reply to this item at: http://gna.org/bugs/?14106 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #14106] civserver should use --bind= address when connecting to the metaserver, too
Additional Item Attachment, bug #14106 (project freeciv): File name: metabind.patch Size:0 KB ___ Reply to this item at: http://gna.org/bugs/?14106 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev