From fb592922f37662ae8c224222ca1a938474303bbb Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 22 Nov 2009 21:17:05 -0500 Subject: Do not allow haproxy to sync to self even if the ip is passed the first check (possibly still in config.xml) --- config/haproxy/haproxy.inc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'config') diff --git a/config/haproxy/haproxy.inc b/config/haproxy/haproxy.inc index e11e6cdf..e55eca59 100644 --- a/config/haproxy/haproxy.inc +++ b/config/haproxy/haproxy.inc @@ -253,6 +253,10 @@ function haproxy_do_xmlrpc_sync($sync_to_ip, $password) { if(!$sync_to_ip) return; + + // Do not allow syncing to self. + if(`/sbin/ifconfig -a | grep "$sync_to_ip"`) + return; $xmlrpc_sync_neighbor = $sync_to_ip; if($config['system']['webgui']['protocol'] != "") { -- cgit v1.2.3