From 36908921475f276de0a68cd59e9e78238a58801b Mon Sep 17 00:00:00 2001
From: RicardoFonseca <RicardoFonseca@users.noreply.github.com>
Date: Thu, 3 Sep 2015 18:00:29 +0100
Subject: [PATCH] Fixed srcPort bug in compareTo()

---
 src/main/java/net/floodlightcontroller/routing/Link.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/net/floodlightcontroller/routing/Link.java b/src/main/java/net/floodlightcontroller/routing/Link.java
index 19032590b..29a32dfa2 100755
--- a/src/main/java/net/floodlightcontroller/routing/Link.java
+++ b/src/main/java/net/floodlightcontroller/routing/Link.java
@@ -137,7 +137,7 @@ public class Link implements Comparable<Link> {
             return (int) (this.getSrc().getLong() - a.getSrc().getLong());
         
         if (this.getSrcPort() != a.getSrcPort())
-            return (int) (this.getSrc().getLong() - a.getSrc().getLong());
+            return (int) (this.getSrcPort().getLong() - a.getSrcPort().getLong());
         
         if (this.getDst() != a.getDst())
             return (int) (this.getDst().getLong() - a.getDst().getLong());
-- 
GitLab