Commit 91ffcba9 authored by Jonathon Duerig's avatar Jonathon Duerig

Bugfix: Use external_subport for stitching interfaces when available.

parent f179cd7a
......@@ -389,7 +389,7 @@ $result = DBQueryFatal("select w.node_id1, w.card1, w.port1, i1.iface, ".
"w.node_id2, w.card2, w.port2, i2.iface, ".
"w.external_interface, w.external_wire, ".
"e.node_id, e.vlans, ".
"e.external_manager, e.network_id, e.external_interface, e.external_wire ".
"e.external_manager, e.network_id, e.external_interface, e.external_wire, e.external_subport ".
"from wires as w ".
"left join external_networks as e ".
"on w.node_id1=e.node_id or w.node_id2=e.node_id ".
......@@ -400,7 +400,7 @@ while (my ($cnode, $ccard, $cport, $ciface, $enode, $ecard, $eport, $eiface,
$external_iface_urn, $external_link_urn, $external, $vlanList,
$external_manager_urn,
$external_network_id, $external_network_iface_urn,
$external_network_link_urn) = $result->fetchrow_array) {
$external_network_link_urn, $subport) = $result->fetchrow_array) {
if ($external eq $cnode) {
my $temp;
$temp = $cnode; $cnode = $enode; $enode = $temp;
......@@ -416,6 +416,9 @@ while (my ($cnode, $ccard, $cport, $ciface, $enode, $ecard, $eport, $eiface,
if (! defined($ciface)) {
$ciface = "$ccard.$cport";
}
if (defined($subport)) {
$ciface = $subport;
}
if (! defined($external_iface_urn)) {
$external_iface_urn = $external_network_iface_urn;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment