diff --git a/tftpd/tftpd.c b/tftpd/tftpd.c index 67cec61..fa84e5d 100644 --- a/tftpd/tftpd.c +++ b/tftpd/tftpd.c @@ -475,6 +475,16 @@ tftp(struct tftphdr *tp, int size) nak(EACCES); /* File denied by mapping rule */ exit(0); } + if ( verbosity >= 1 ) { + if ( filename == origfilename || !strcmp(filename, origfilename) ) + syslog(LOG_NOTICE, "%s from %s filename %s\n", + tp->th_opcode == WRQ ? "WRQ" : "RRQ", + inet_ntoa(from.sin_addr), filename); + else + syslog(LOG_NOTICE, "%s from %s filename %s remapped to %s\n", + tp->th_opcode == WRQ ? "WRQ" : "RRQ", + inet_ntoa(from.sin_addr), origfilename, filename); + } ecode = (*pf->f_validate)(filename, tp->th_opcode, pf); if (ecode) { nak(ecode); @@ -494,17 +504,6 @@ tftp(struct tftphdr *tp, int size) exit(0); } - if ( verbosity >= 1 ) { - if ( filename == origfilename || !strcmp(filename, origfilename) ) - syslog(LOG_NOTICE, "%s from %s filename %s\n", - tp->th_opcode == WRQ ? "WRQ" : "RRQ", - inet_ntoa(from.sin_addr), filename); - else - syslog(LOG_NOTICE, "%s from %s filename %s remapped to %s\n", - tp->th_opcode == WRQ ? "WRQ" : "RRQ", - inet_ntoa(from.sin_addr), origfilename, filename); - } - if ( ap != (ackbuf+2) ) { if ( tp->th_opcode == WRQ ) (*pf->f_recv)(pf, ackbuf, ap-ackbuf);