Bug 42882 - small error recvfrom() reporting patch to xntp3-5.93
small error recvfrom() reporting patch to xntp3-5.93
Status: CLOSED DEFERRED
Product: Red Hat Linux
Classification: Retired
Component: xntp3 (Show other bugs)
6.2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Harald Hoyer
David Lawrence
http://arctic.org/~dean/patches/xntp3...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-05-30 12:50 EDT by Need Real Name
Modified: 2007-04-18 12:33 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-06-05 06:02:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2001-05-30 12:50:42 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)

Description of problem:
when xntp3-5.93 logs a recvfrom() error (such as "No route to host") it 
should include the host address so that the admin can further debug the 
problem.  included is a patch to fix this (which i've
also submitted to the xntpd folks).

How reproducible:
Always

Steps to Reproduce:
1. stick a bogus address into your /etc/ntp.conf, such as
   server 1.1.1.1
2. restart xntpd and wait until it tries to query the host
	

Actual Results:  May 20 06:33:20 twinlark xntpd[556]: recvfrom() fd=6: No 
route to host

Expected Results:  (this is an example after my patch)

May 29 06:37:07 twinlark xntpd[32224]: recvfrom() from=204.123.2.72 fd=6: 
No route to host

Additional info:

here's a patch to improve this logging.  it'll be mangled by the form... 
but you can pick up an unmangled version at
http://arctic.org/~dean/patches/xntp3-5.93-recvfrom-log.patch

--- xntp3-5.93/xntpd/ntp_io.c.dg1       Thu May 24 09:15:17 2001
+++ xntp3-5.93/xntpd/ntp_io.c   Thu May 24 16:52:26 2001
@@ -1579,7 +1579,8 @@
                        continue;
                      else
                        {
-                         msyslog(LOG_ERR, "recvfrom() fd=%d: %m", fd);
+                         msyslog(LOG_ERR, "recvfrom() from=%s fd=%d: %m",
+                                 inet_ntoa(rb->recv_srcadr.sin_addr), fd);
 #ifdef DEBUG
                          if (debug)
                            printf("input_handler: fd=%d dropped (bad 
recvfrom)\n", fd);

Note You need to log in before you can comment on or make changes to this bug.