Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > e8c0b673ea1b7e162bcac8e349d03cea > files > 30

ntp-4.2.2p1-15.el5_7.1.src.rpm

--- ntp-stable-4.2.0a-20040617/ntpd/ntp_peer.c.loopback	2004-02-25 06:58:12.000000000 +0100
+++ ntp-stable-4.2.0a-20040617/ntpd/ntp_peer.c	2006-02-17 14:30:18.000000000 +0100
@@ -576,9 +576,13 @@
 	 * This might happen in some systems and would preclude proper
 	 * operation with public key cryptography.
 	 */
-	if (ISREFCLOCKADR(srcadr))
+	if (ISREFCLOCKADR(srcadr)) {
+		if (!loopback_interface) {
+			netsyslog(LOG_ERR, "missing loopback interface!");
+			exit(1);
+		}
 		peer->dstadr = loopback_interface;
-	else if (cast_flags & (MDF_BCLNT | MDF_ACAST | MDF_MCAST | MDF_BCAST)) {
+	} else if (cast_flags & (MDF_BCLNT | MDF_ACAST | MDF_MCAST | MDF_BCAST)) {
 		peer->dstadr = findbcastinter(srcadr);
 		/*
 		 * If it was a multicast packet, findbcastinter() may not