Blob Blame History Raw
diff -Nur Heartbeat-3-0-STABLE-3.0.4.orig/lib/plugins/HBcomm/ucast.c Heartbeat-3-0-STABLE-3.0.4/lib/plugins/HBcomm/ucast.c
--- Heartbeat-3-0-STABLE-3.0.4.orig/lib/plugins/HBcomm/ucast.c	2010-12-09 13:09:47.000000000 -0700
+++ Heartbeat-3-0-STABLE-3.0.4/lib/plugins/HBcomm/ucast.c	2013-11-27 09:29:00.237836275 -0700
@@ -462,7 +462,7 @@
 	struct ip_private *ei;
 	int tos;
 #if defined(SO_BINDTODEVICE)
-	struct ifreq i;
+	struct ifreq ifc;
 #endif
 #if defined(SO_REUSEPORT)
 	int i = 1;
@@ -499,18 +499,18 @@
 		 *
 		 * This is so we can have redundant NICs, and heartbeat on both
 		 */
-		strcpy(i.ifr_name,  ei->interface);
+		strcpy(ifc.ifr_name,  ei->interface);
 
 		if (setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE,
-				&i, sizeof(i)) == -1) {
+				&ifc, sizeof(ifc)) == -1) {
 			PILCallLog(LOG, PIL_CRIT,
 			  "ucast: error setting option SO_BINDTODEVICE(w) on %s: %s",
-			  i.ifr_name, strerror(errno));
+			  ifc.ifr_name, strerror(errno));
 			close(sockfd);
 			return -1;
 		}
 		PILCallLog(LOG, PIL_INFO, "ucast: bound send socket to device: %s",
-			i.ifr_name);
+			ifc.ifr_name);
 	}
 #endif
 #if defined(SO_REUSEPORT)