[Freeciv-Dev] (PR#11541) patch to add ip address to connection struct
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=11541 >
attached.
This is needed so that paulz can better check for and blacklist cheaters
and abusers and general misfits from the pubserver.
I plan on committing this to both branches directly if there are no
objections.
-mike
Index: common/connection.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/connection.h,v
retrieving revision 1.37
diff -u -r1.37 connection.h
--- common/connection.h 12 Sep 2004 21:44:10 -0000 1.37
+++ common/connection.h 16 Dec 2004 06:09:15 -0000
@@ -193,6 +193,9 @@
/* used to follow where the connection is in the authentication process */
enum auth_status status;
char password[MAX_LEN_PASSWORD];
+
+ /* for reverse lookup and blacklisting in db */
+ char ipaddr[MAX_LEN_ADDR];
} server;
/*
Index: server/sernet.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/sernet.c,v
retrieving revision 1.123.2.5
diff -u -r1.123.2.5 sernet.c
--- server/sernet.c 25 Nov 2004 05:39:57 -0000 1.123.2.5
+++ server/sernet.c 16 Dec 2004 06:09:16 -0000
@@ -772,11 +772,13 @@
sz_strlcpy(pconn->addr,
(from ? from->
h_name : inet_ntoa(fromend.sockaddr_in.sin_addr)));
+ sz_strlcpy(pconn->server.ipaddr,
+ inet_ntoa(fromend.sockaddr_in.sin_addr));
conn_list_insert_back(&game.all_connections, pconn);
- freelog(LOG_VERBOSE, "connection (%s) from %s",
- pconn->username, pconn->addr);
+ freelog(LOG_VERBOSE, "connection (%s) from %s (%s)",
+ pconn->username, pconn->addr, pconn->server.ipaddr);
ping_connection(pconn);
return 0;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#11541) patch to add ip address to connection struct,
Mike Kaufman <=
|
|