Flip before returning ByteBuffer

Change-Id: I7350e24f20d5686a8c6c43291d963070fe7da792
diff --git a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/DeviceEvent.java b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/DeviceEvent.java
index e9ba12e..628b9d4 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/DeviceEvent.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/DeviceEvent.java
@@ -82,7 +82,7 @@
 
     // Assuming mac is unique cluster-wide
     public static ByteBuffer getDeviceID(final byte[] mac) {
-	return ByteBuffer.allocate(2 + mac.length).putChar('D').put(mac);
+	return (ByteBuffer) ByteBuffer.allocate(2 + mac.length).putChar('D').put(mac).flip();
     }
 
     public byte[] getID() {