1 /* 2 * refuse() reports a refused connection, and takes the consequences: in 3 * case of a datagram-oriented service, the unread datagram is taken from 4 * the input queue (or inetd would see the same datagram again and again); 5 * the program is terminated. 6 * 7 * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
| 1 /* 2 * refuse() reports a refused connection, and takes the consequences: in 3 * case of a datagram-oriented service, the unread datagram is taken from 4 * the input queue (or inetd would see the same datagram again and again); 5 * the program is terminated. 6 * 7 * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
|
| 8 * 9 * $FreeBSD: head/contrib/tcp_wrappers/refuse.c 56977 2000-02-03 10:27:03Z shin $
|
8 */ 9 10#ifndef lint 11static char sccsid[] = "@(#) refuse.c 1.5 94/12/28 17:42:39"; 12#endif 13 14/* System libraries. */ 15 16#include <stdio.h> 17#include <syslog.h> 18 19/* Local stuff. */ 20 21#include "tcpd.h" 22 23/* refuse - refuse request */ 24 25void refuse(request) 26struct request_info *request; 27{
| 10 */ 11 12#ifndef lint 13static char sccsid[] = "@(#) refuse.c 1.5 94/12/28 17:42:39"; 14#endif 15 16/* System libraries. */ 17 18#include <stdio.h> 19#include <syslog.h> 20 21/* Local stuff. */ 22 23#include "tcpd.h" 24 25/* refuse - refuse request */ 26 27void refuse(request) 28struct request_info *request; 29{
|
| 30#ifdef INET6 31 syslog(deny_severity, "refused connect from %s (%s)", 32 eval_client(request), eval_hostaddr(request->client)); 33#else
|
28 syslog(deny_severity, "refused connect from %s", eval_client(request));
| 34 syslog(deny_severity, "refused connect from %s", eval_client(request));
|
| 35#endif
|
29 clean_exit(request); 30 /* NOTREACHED */ 31} 32
| 36 clean_exit(request); 37 /* NOTREACHED */ 38} 39
|