Bug 42882 - small error recvfrom() reporting patch to xntp3-5.93
Summary: small error recvfrom() reporting patch to xntp3-5.93
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: xntp3
Version: 6.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Harald Hoyer
QA Contact: David Lawrence
URL: http://arctic.org/~dean/patches/xntp3...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-05-30 16:50 UTC by Need Real Name
Modified: 2007-04-18 16:33 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2001-06-05 10:02:52 UTC
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2001-05-30 16:50:42 UTC
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.