diff --git a/src/main/java/net/floodlightcontroller/core/OFConnection.java b/src/main/java/net/floodlightcontroller/core/OFConnection.java index 444e07d7338b1502e32e91f444ae4c1c82ab31f9..36efb215975f38dbe22b41433485c0ba2a49d9b1 100644 --- a/src/main/java/net/floodlightcontroller/core/OFConnection.java +++ b/src/main/java/net/floodlightcontroller/core/OFConnection.java @@ -411,6 +411,4 @@ public class OFConnection implements IOFConnection, IOFConnectionBackend{ } } - - } diff --git a/src/main/java/net/floodlightcontroller/core/internal/OFChannelHandler.java b/src/main/java/net/floodlightcontroller/core/internal/OFChannelHandler.java index 50d471a794c6a03bb20b452f3edf0934cd6711e5..485e83627f8c2068984a426dfd3557b173bbe2bf 100644 --- a/src/main/java/net/floodlightcontroller/core/internal/OFChannelHandler.java +++ b/src/main/java/net/floodlightcontroller/core/internal/OFChannelHandler.java @@ -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); }