FreeBSD Bugzilla – Attachment 5312 Details for
Bug 12782
xntpd doesn't handle interface aliases properly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
ntp_io.c.patch
ntp_io.c.patch (text/plain; charset=us-ascii), 1022 bytes, created by
aagero
on 1999-07-30 08:53:36 UTC
(
hide
)
Description:
ntp_io.c.patch
Filename:
MIME Type:
Creator:
aagero
Created:
1999-07-30 08:53:36 UTC
Size:
1022 bytes
patch
obsolete
>--- ntp_io.c~ Tue May 30 05:54:38 1995 >+++ ntp_io.c Fri Jan 22 17:46:10 1999 >@@ -214,7 +214,7 @@ > #endif /* STREAMS_TLI */ > char buf[MAXINTERFACES*sizeof(struct ifreq)]; > struct ifconf ifc; >- struct ifreq ifreq, *ifr; >+ struct ifreq oifreq, ifreq, *ifr; > int n, i, j, vs, size; > struct sockaddr_in resmask; > >@@ -325,11 +325,16 @@ > ioc.ic_len = sizeof(struct ifreq); > if(ioctl(vs, I_STR, &ioc)) { > #else /* ! STREAMS_TLI */ >+ oifreq = ifreq; /* save old interface information from SIOCGIFCONF */ > if (ioctl(vs, SIOCGIFADDR, (char *)&ifreq) < 0) { > #endif /* STREAMS_TLI */ > syslog(LOG_ERR, "get interface addr: %m"); > continue; > } >+ if (!strncmp(oifreq.ifr_name, ifreq.ifr_name, strlen(oifreq.ifr_name))) >+ if (((struct sockaddr_in *)&ifreq.ifr_addr)->sin_addr.s_addr != >+ ((struct sockaddr_in *)&oifreq.ifr_addr)->sin_addr.s_addr) >+ ifreq = oifreq; /* Different from SIOCGIFADDR, probably an IP alias */ > > (void)strncpy(inter_list[i].name, ifreq.ifr_name, > sizeof(inter_list[i].name));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 12782
: 5312