From 754b13e381a2673b3aba1e6c5e137af438437225 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Wed, 27 Jan 2010 21:54:33 +0000 Subject: [PATCH] make sure to unset $peerhost if no match, else will match previous entry in the table (durr) git-svn-id: http://www.observium.org/svn/observer/trunk@733 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/pages/device/bgp.inc.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/html/pages/device/bgp.inc.php b/html/pages/device/bgp.inc.php index c6f3465f8..7ece7a89b 100644 --- a/html/pages/device/bgp.inc.php +++ b/html/pages/device/bgp.inc.php @@ -41,11 +41,12 @@ print_optionbar_end(); $query .= " AND D.device_id = I.device_id"; $ipv6_host = mysql_fetch_array(mysql_query($query)); - if($ipv4_host) { - $peerhost = $ipv4_host; - } elseif($ipv6_host) { - $peerhost = $ipv6_host; - } + if($ipv4_host) { + $peerhost = $ipv4_host; + } elseif($ipv6_host) { + $peerhost = $ipv6_host; + } else { unset($peerhost); } + if($peerhost) { $peername = generatedevicelink($peerhost); } else {