INN commit: branches/2.5 (nnrpd/nnrpd.c scripts/innreport_inn.pm)
INN Commit
rra at isc.org
Mon Feb 8 21:06:11 UTC 2010
Date: Monday, February 8, 2010 @ 13:06:11
Author: iulius
Revision: 8967
Log the port number of a connection (nnrpd).
Modified:
branches/2.5/nnrpd/nnrpd.c
branches/2.5/scripts/innreport_inn.pm
--------------------------+
nnrpd/nnrpd.c | 6 +++---
scripts/innreport_inn.pm | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
Modified: nnrpd/nnrpd.c
===================================================================
--- nnrpd/nnrpd.c 2010-02-08 21:05:54 UTC (rev 8966)
+++ nnrpd/nnrpd.c 2010-02-08 21:06:11 UTC (rev 8967)
@@ -531,7 +531,7 @@
** Determine access rights of the client.
*/
static void
-StartConnection(void)
+StartConnection(unsigned short port)
{
static const char *default_host_error = "unknown error";
struct sockaddr_storage ssc, sss;
@@ -612,7 +612,7 @@
* of overviews and slow answers on some architectures (like BSD/OS). */
setsockopt(STDIN_FILENO, IPPROTO_TCP, TCP_NODELAY, &nodelay, sizeof(nodelay));
- notice("%s (%s) connect", Client.host, Client.ip);
+ notice("%s (%s) connect - port %u", Client.host, Client.ip, port);
PERMgetaccess(NNRPACCESS);
PERMgetpermissions();
@@ -1217,7 +1217,7 @@
xsignal(SIGPIPE, CatchPipe);
/* Get permissions and see if we can talk to this client. */
- StartConnection();
+ StartConnection(ListenPort);
if (!PERMcanread && !PERMcanpost && !PERMneedauth) {
syslog(L_NOTICE, "%s no_permission", Client.host);
Reply("%d You have no permission to talk. Goodbye!\r\n",
Modified: scripts/innreport_inn.pm
===================================================================
--- scripts/innreport_inn.pm 2010-02-08 21:05:54 UTC (rev 8966)
+++ scripts/innreport_inn.pm 2010-02-08 21:06:11 UTC (rev 8967)
@@ -1536,7 +1536,7 @@
return 1 if $left =~ /^python: dynamic authorization access for read access granted$/o;
return 1 if $left =~ /^python: dynamic authorization access type is not known: /o;
# connect
- if ($left =~ /(\S+) (\([0-9a-fA-F:.]*\) )?connect$/o) {
+ if ($left =~ /(\S+) (\([0-9a-fA-F:.]*\) )?connect(?: - port \d+)?$/o) {
my $cust = $1;
$cust = lc $cust unless $CASE_SENSITIVE;
my $dom = &host2dom($cust);
More information about the inn-committers
mailing list