[Bug 2220] Incorrect check for maximum association id in ntpq.
bk: 4fd35ad1MHv9AWdluR-SOQxudKS2iw
+* [Bug 2211] findbcastinter(): possibly undefined variable iface used.
+* [Bug 2220] Incorrect check for maximum association id in ntpq.
(4.2.7p278) 2012/06/03 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2204] [Bug 2204] Build with --enable-getifaddrs=glibc fails.
* [Bug 2178] refclock_tsyncpci.c reach register fails to shift.
* [Bug 2191] dcfd -Y y2kcheck on CentOS 6.2 x86_64 breaks make check.
(4.2.7p277) 2012/05/25 Released by Harlan Stenn <stenn@ntp.org>
sockaddr_u *addr
)
{
+ endpt * iface;
+
+ iface = NULL;
#if !defined(MPE) && (defined(SIOCGIFCONF) || defined(SYS_WINNT))
- struct interface *iface;
-
-
DPRINTF(4, ("Finding broadcast/multicast interface for addr %s in list of addresses\n",
stoa(addr)));
DPRINTF(4, ("No bcast interface found for %s\n",
stoa(addr)));
iface = ANY_INTERFACE_CHOOSE(addr);
- } else
+ } else {
DPRINTF(4, ("Found bcast-/mcast- interface index #%d %s\n",
iface->ifnum, iface->name));
+ }
+
return iface;
}
if ('&' == str[0]) {
if (!atouint(&str[1], &ul)) {
fprintf(stderr,
- "***Association value `%s' invalid/undecodable\n",
+ "***Association index `%s' invalid/undecodable\n",
str);
return 0;
}
- if (0 == numassoc)
+ if (0 == numassoc) {
dogetassoc(stdout);
- if (ul > numassoc) {
- fprintf(stderr,
- "***Association for `%s' unknown (max &%d)\n",
- str, numassoc);
- return 0;
+ if (0 == numassoc) {
+ fprintf(stderr,
+ "***No associations found, `%s' unknown\n",
+ str);
+ return 0;
+ }
}
+ ul = min(ul, numassoc);
argp->uval = assoc_cache[ul - 1].assid;
break;
}