📄 117
字号:
Received: from copland.udel.edu by huey.udel.edu id aa28257; 28 Mar 97 20:35 ESTReceived: from socrates.ucsf.EDU (gregc@socrates.ucsf.EDU [128.218.27.3]) by copland.udel.edu (8.8.5/8.7.3) with ESMTP id UAA00484 for <mills@udel.edu>; Fri, 28 Mar 1997 20:35:21 -0500 (EST)From: gregc@cgl.ucsf.eduReceived: (from gregc@localhost) by socrates.ucsf.EDU (8.8.5/GSC4.26) id RAA25778 for mills@udel.edu; Fri, 28 Mar 1997 17:35:15 -0800 (PST)Date: Fri, 28 Mar 1997 17:35:15 -0800 (PST)Message-Id: <199703290135.RAA25778@socrates.ucsf.EDU>To: mills@udel.eduSubject: bug fix for xntpdWe were having a problem with xntpd not listening on all addresses,in particular on interface aliases, i.e. interfaces with more thanone address associated with them. This became apparent with thenewer versions of the nameserver that round-robin all of the addressesassociated with a host -- we had one alias out of three addresses, soone third of the time ntp wouldn't work. Enclosed is the patch, itremoves an unnecessary ioctl and works like a charm. Greg Couch gregc@cgl.ucsf.edu===================================================================xntp3-5.89/xntpd===================================================================RCS file: RCS/ntp_io.c,vretrieving revision 1.1diff -r1.1 ntp_io.c492,513c492< # ifndef SYS_WINNT< # ifdef STREAMS_TLI< ioc.ic_cmd = SIOCGIFADDR;< ioc.ic_timout = 0;< ioc.ic_dp = (caddr_t)&ifreq;< ioc.ic_len = sizeof(struct ifreq);< if (ioctl(vs, I_STR, &ioc))< {< msyslog(LOG_ERR, "Failed to get interface addr: %m");< continue;< }< # else /* not STREAMS_TLI */< if (ioctl(vs, SIOCGIFADDR, (char *)&ifreq) < 0)< {< msyslog(LOG_ERR, "Failed to get interface addr: %m");< continue;< }< # endif /* not STREAMS_TLI */< < # endif /* not SYS_WINNT */< < (void)strncpy(inter_list[i].name, ifreq.ifr_name,---> (void)strncpy(inter_list[i].name, ifr->ifr_name,515c494< inter_list[i].sin = *(struct sockaddr_in *)&ifreq.ifr_addr;---> inter_list[i].sin = *(struct sockaddr_in *)&ifr->ifr_addr;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -