From 418b4ff08b3c80d04108bb26749699e902000c3f Mon Sep 17 00:00:00 2001 From: Nick Hilliard Date: Fri, 11 Jun 2021 20:38:42 +0100 Subject: [PATCH] fix for v6 peering matrix --- database/Repositories/BGPSessionData.php | 4 ++-- database/Repositories/BgpSession.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/database/Repositories/BGPSessionData.php b/database/Repositories/BGPSessionData.php index 3dfa285e1..3b2f40acf 100644 --- a/database/Repositories/BGPSessionData.php +++ b/database/Repositories/BGPSessionData.php @@ -107,8 +107,8 @@ public function getPeers( $vlan = null, $protocol = 6, $asn = null, $forceDb = f FROM bgpsessiondata AS bs LEFT JOIN ipv{$protocol}address AS srcip ON bs.srcipaddressid = srcip.id LEFT JOIN ipv{$protocol}address AS dstip ON bs.dstipaddressid = dstip.id - LEFT JOIN vlaninterface AS vlis ON srcip.id = vlis.ipv4addressid - LEFT JOIN vlaninterface AS vlid ON dstip.id = vlid.ipv4addressid + LEFT JOIN vlaninterface AS vlis ON srcip.id = vlis.ipv{$protocol}addressid + LEFT JOIN vlaninterface AS vlid ON dstip.id = vlid.ipv{$protocol}addressid LEFT JOIN virtualinterface AS vis ON vlis.virtualinterfaceid = vis.id LEFT JOIN virtualinterface AS vid ON vlid.virtualinterfaceid = vid.id LEFT JOIN cust AS cs ON vis.custid = cs.id diff --git a/database/Repositories/BgpSession.php b/database/Repositories/BgpSession.php index 3f5f59a1b..3061b5ad4 100644 --- a/database/Repositories/BgpSession.php +++ b/database/Repositories/BgpSession.php @@ -125,8 +125,8 @@ public function getPeers( $vlan = null, $protocol = 6, $asn = null, $forceDb = f FROM bgp_sessions AS bs LEFT JOIN ipv{$protocol}address AS srcip ON bs.srcipaddressid = srcip.id LEFT JOIN ipv{$protocol}address AS dstip ON bs.dstipaddressid = dstip.id - LEFT JOIN vlaninterface AS vlis ON srcip.id = vlis.ipv4addressid - LEFT JOIN vlaninterface AS vlid ON dstip.id = vlid.ipv4addressid + LEFT JOIN vlaninterface AS vlis ON srcip.id = vlis.ipv{$protocol}addressid + LEFT JOIN vlaninterface AS vlid ON dstip.id = vlid.ipv{$protocol}addressid LEFT JOIN virtualinterface AS vis ON vlis.virtualinterfaceid = vis.id LEFT JOIN virtualinterface AS vid ON vlid.virtualinterfaceid = vid.id LEFT JOIN cust AS cs ON vis.custid = cs.id