From land@gx.dnepr.net  Mon Jul 29 04:14:15 2002
Return-Path: <land@gx.dnepr.net>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id DAF9837B400
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 29 Jul 2002 04:14:15 -0700 (PDT)
Received: from gx.dnepr.net (gx.dnepr.net [217.198.131.109])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 1743443E3B
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 29 Jul 2002 04:14:14 -0700 (PDT)
	(envelope-from land@gx.dnepr.net)
Received: from gx.dnepr.net (localhost.dnepr.net [127.0.0.1])
	by gx.dnepr.net with ESMTP id g6TBE5nA000633
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 29 Jul 2002 14:14:05 +0300 (EEST)
	(envelope-from land@gx.dnepr.net)
Received: (from land@localhost)
	by gx.dnepr.net id g6TBE3Ka000632;
	Mon, 29 Jul 2002 14:14:03 +0300 (EEST)
	(envelope-from land)
Message-Id: <200207291114.g6TBE3Ka000632@gx.dnepr.net>
Date: Mon, 29 Jul 2002 14:14:03 +0300 (EEST)
From: land@dnepr.net
Reply-To: land@dnepr.net
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Syslogd stops sending messages to remote host after temporary network fail
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         41115
>Category:       bin
>Synopsis:       Syslogd stops sending messages to remote host after temporary network fail
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 29 04:20:01 PDT 2002
>Closed-Date:    Wed Aug 07 11:23:35 PDT 2002
>Last-Modified:  Wed Aug 07 11:23:35 PDT 2002
>Originator:     land@dnepr.net
>Release:        FreeBSD 4.6-RELEASE-p2 i386
>Organization:
>Environment:
System: FreeBSD 4.6-RELEASE-p2 FreeBSD 4.6-RELEASE-p2 #3: Sun Jul 14 12:18:03 EEST 2002 /usr/obj/usr/src/sys/XXX i386

>Description:

If syslogd can't successfully send udp message to configured in syslog.conf host,
it do not try to send messages to this host until restart.

>How-To-Repeat:

syslog.conf:
*.*		@somehost

Disble communication with that host.
E.g.:
/sbin/ipfw add 10 deny udp from any to $somehost 514

>Fix:

*** /usr/src/usr.sbin/syslogd/syslogd.c Sat Jun 29 12:46:06 2002
--- syslogd.c   Mon Jul 29 14:01:04 2002
***************
*** 1050,1059 ****
                                        break;
                        }
                        if (lsent != l) {
-                               int e = errno;
-                               (void)close(f->f_file);
-                               errno = e;
-                               f->f_type = F_UNUSED;
                                logerror("sendto");
                        }
                }
--- 1050,1055 ----

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: cjc 
State-Changed-When: Wed Aug 7 11:20:34 PDT 2002 
State-Changed-Why:  
Actually, you don't need to reboot the host, just restart syslogd(8). 

This is a well known bug, and a previous PR submitter, bin/31029, 
provided a much better solution... which I _will_ finally merge in the 
very near future. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41115 
>Unformatted:
