Summary: | rdate -u broken | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Hiel Van Campen <hielvc> |
Component: | Current packages | Assignee: | Robin Johnson <robbat2> |
Status: | RESOLVED NEEDINFO | ||
Severity: | normal | ||
Priority: | High | ||
Version: | 2004.2 | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
strace rdate -u
strace -otrace.t rdate -p ntp.sdsu.edu |
Description
Hiel Van Campen
2004-11-15 10:07:26 UTC
could you please explain a little more clearly which versions work and which don't? rdate -u worked for me prior to versions 990821-r1 and 1.4. Now "rdate -s -u" doesnt, I get the error "rdate: error in read: Invalid argument". all of the versions work fine for me. rdate -p -u HOST rdate -p HOST do TCP mode work for you? could you include the results from 'strace rdate -p HOST' AND 'strace rdate -u -p HOST' (attach them as seperate files). Created attachment 44293 [details]
strace rdate -u
strace -otrace.u rdate -p -u ntp.sdsu.edu
Created attachment 44295 [details]
strace -otrace.t rdate -p ntp.sdsu.edu
strace -otrace.t rdate -p ntp.sdsu.edu which works.
does UDP work properly on your machine? any firewalls? If you downgrade back to rdate-0.990821 does it work again? Try another kernel perhaps? I tested on 2.6.7-mm4, 2.6.10-rc1-mm5, 2.6.9-gentoo-r4, 2.6.7-hardened-r12 and UDP and TCP modes for rdate work on all of those. I down graded to rdate-0.990821-r2 and the -u ,UDP now works again. Tonight I'll go back up to 1.4 and test it again. I have a second machine that Im setting up for someone and it has rdate-1.4 on it and the UDP option errors out as reported before "rdate: error in read: Invalid argument". could you try some other kernels like I suggested? are you certain UDP works properly on your machine, or any firewalls around? 1. Working rdate-0.990821-r2. I was mistaken in my original post This version works both ways, UDP and TCP. Thats with my current kernel 2.6.9 2. Rdate-1.4 does not work useing UDP. 4. The P4 box also works with 990821 but not 1.4. Kernel is 2.6.9-r1 5. I got kernel 2.4.28 and rdate-1.4 UDP works. do other UDP things work on your machine? is there any firewall stuff? Sorry its been so long but heres my set up. I am behind a router but Im not useing the firewall. I have had a halflife server on this box until recently, its now now on an old pII, and its uses UDP on one or 2 ports. Besides that and "rdate -u" Im not a where of any thing else. I'm very stumped now. options: a) your 2.6 kernel is broken - your 2.4 kernel works, my 2.[46] kernels work. b) something else is weird. Looking at your strace rdate -u ... I do notice one strange thing (this is the call to the time server): recvfrom(3, 0xbffff8a8, 4, 0, 0xbffff8b0, 0xbffff8a4) = -1 EINVAL (Invalid argument) Compare this to an earlier invocation of recvfrom (this is a request to your DNS server): recvfrom(3, "\377.\201\200\0\1\0\2\0\2\0\2\3ntp\4sdsu\3edu\0\0\1\0\1"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.2.1")}, [16]) = 135 Compare this to my two: request to DNS server: recvfrom(3, "N\230\201\200\0\1\0\2\0\2\0\1\3ntp\4sdsu\3edu\0\0\1\0\1"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("206.12.16.1")}, [16]) = 119 request to time server: recvfrom(3, "\305aP\252", 4, 0, {sa_family=AF_INET, sin_port=htons(37), sin_addr=inet_addr("130.191.1.1")}, [16]) = 4 In the case of your application, the pointers for the time server call are not being printed. I'm wondering if they are even valid - as that would explain the EINVAL error response. If they are invalid, why are they invalid? You'd need to debug the C code to trace this one down. no response from user. |