summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-03-13 07:26:31 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-03-13 07:30:04 +0100
commit30bd093b1b4ca422bcdb8a9dd51392cd5b69b982 (patch)
tree1f07490b44c1f19a707935f112e7692ceba42d75
parentb36ec511e6bc0048d1e17b0a400234d21a85e623 (diff)
downloadecon-30bd093b1b4ca422bcdb8a9dd51392cd5b69b982.zip
econ-30bd093b1b4ca422bcdb8a9dd51392cd5b69b982.tar.gz
econ-30bd093b1b4ca422bcdb8a9dd51392cd5b69b982.tar.bz2
econserv: Answer udp requests to client port 3620
Not to their port they used to connect to us. FIXME: Figure out, whether client may handle both?
-rw-r--r--econserv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/econserv.c b/econserv.c
index 2987980..dc46703 100644
--- a/econserv.c
+++ b/econserv.c
@@ -134,6 +134,12 @@ handle_input(struct ecs *ecs, char *in, int fd,
switch (hdr->commandID) {
case E_CMD_EASYSEARCH:
case E_CMD_IPSEARCH:
+#if 1
+ if (msg.msg_name) {
+ ((struct sockaddr_in *) msg.msg_name)->sin_port =
+ htons(ECON_PORTNUMBER);
+ }
+#endif
memset(&ecs->epkt.cmd, 0, sizeof ecs->epkt.cmd);
ecs->epkt.hdr.commandID = E_CMD_CLIENTINFO;
/* Clientinfo needs a record or EasyMP crashes */