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: src/contrib/tcp_wrappers/refuse.c,v 1.2 2000/02/03 10:26:58 shin Exp $ 10 * $DragonFly: src/contrib/tcp_wrappers/refuse.c,v 1.2 2003/06/17 04:24:06 dillon Exp $ 11 */ 12 13 #ifndef lint 14 static char sccsid[] = "@(#) refuse.c 1.5 94/12/28 17:42:39"; 15 #endif 16 17 /* System libraries. */ 18 19 #include <stdio.h> 20 #include <syslog.h> 21 22 /* Local stuff. */ 23 24 #include "tcpd.h" 25 26 /* refuse - refuse request */ 27 28 void refuse(request) 29 struct request_info *request; 30 { 31 #ifdef INET6 32 syslog(deny_severity, "refused connect from %s (%s)", 33 eval_client(request), eval_hostaddr(request->client)); 34 #else 35 syslog(deny_severity, "refused connect from %s", eval_client(request)); 36 #endif 37 clean_exit(request); 38 /* NOTREACHED */ 39 } 40 41