Chip Boling

[ONOS-2155] Fix for OpenFlow hello version negotiation

Change-Id: Idf0f59dc9761cd4a1cfc2c91922ad22b2c1b5c20
...@@ -188,12 +188,13 @@ class OFChannelHandler extends IdleStateAwareChannelHandler { ...@@ -188,12 +188,13 @@ class OFChannelHandler extends IdleStateAwareChannelHandler {
188 throws IOException { 188 throws IOException {
189 // TODO We could check for the optional bitmap, but for now 189 // TODO We could check for the optional bitmap, but for now
190 // we are just checking the version number. 190 // we are just checking the version number.
191 - if (m.getVersion() == OFVersion.OF_13) { 191 + if (m.getVersion().getWireVersion() >= OFVersion.OF_13.getWireVersion()) {
192 - log.debug("Received {} Hello from {}", m.getVersion(), 192 + log.debug("Received {} Hello from {} - switching to OF "
193 + + "version 1.3", m.getVersion(),
193 h.channel.getRemoteAddress()); 194 h.channel.getRemoteAddress());
194 h.sendHandshakeHelloMessage(); 195 h.sendHandshakeHelloMessage();
195 h.ofVersion = OFVersion.OF_13; 196 h.ofVersion = OFVersion.OF_13;
196 - } else if (m.getVersion() == OFVersion.OF_10) { 197 + } else if (m.getVersion().getWireVersion() >= OFVersion.OF_10.getWireVersion()) {
197 log.debug("Received {} Hello from {} - switching to OF " 198 log.debug("Received {} Hello from {} - switching to OF "
198 + "version 1.0", m.getVersion(), 199 + "version 1.0", m.getVersion(),
199 h.channel.getRemoteAddress()); 200 h.channel.getRemoteAddress());
......