Skip to content
Snippets Groups Projects
Commit 1b66bb2e authored by Ryan Izard's avatar Ryan Izard
Browse files

Fix bug in controller OF protocol version when we set below 1.3. We now honor...

Fix bug in controller OF protocol version when we set below 1.3. We now honor OF1.2 and under's lack of version bitmaps in the hello.
parent 1adaeb51
No related branches found
No related tags found
No related merge requests found
......@@ -411,6 +411,4 @@ public class OFConnection implements IOFConnection, IOFConnectionBackend{
}
}
}
......@@ -865,14 +865,21 @@ class OFChannelHandler extends IdleStateAwareChannelHandler {
*/
private void sendHelloMessage() throws IOException {
// Send initial hello message
List<OFHelloElem> he = new ArrayList<OFHelloElem>();
he.add(factory.buildHelloElemVersionbitmap()
.setBitmaps(ofBitmaps)
.build());
OFHello.Builder builder = factory.buildHello()
.setXid(handshakeTransactionIds--)
.setElements(he);
OFHello m = builder.build();
OFHello.Builder builder = factory.buildHello();
/* Our highest-configured OFVersion does support version bitmaps, so include it */
if (factory.getVersion().compareTo(OFVersion.OF_13) >= 0) {
List<OFHelloElem> he = new ArrayList<OFHelloElem>();
he.add(factory.buildHelloElemVersionbitmap()
.setBitmaps(ofBitmaps)
.build());
builder.setElements(he);
}
OFHello m = builder.setXid(handshakeTransactionIds--)
.build();
channel.write(Collections.singletonList(m));
log.debug("Send hello: {}", m);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment