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

Undo LinkDiscoveryManager 'bug' fix from a while back. We'll test to see if...

Undo LinkDiscoveryManager 'bug' fix from a while back. We'll test to see if it's what's causing some issues with invalid ethertypes. Also, includes a patch for OFChannelHandler that will accept the smallest of the OpenFlow versions during the initial handshake.
parent 2dc31089
No related branches found
No related tags found
No related merge requests found
......@@ -301,7 +301,11 @@ class OFChannelHandler extends IdleStateAwareChannelHandler {
@Override
void processOFHello(OFHello m) throws IOException {
OFVersion version = m.getVersion();
factory = OFFactories.getFactory(version);
/* Choose the lower of the two supported versions. */
if (version.compareTo(factory.getVersion()) < 0) {
factory = OFFactories.getFactory(version);
} /* else The controller's version is < or = the switch's, so keep original controller factory. */
OFMessageDecoder decoder = pipeline.get(OFMessageDecoder.class);
decoder.setVersion(version);
setState(new WaitFeaturesReplyState());
......
......@@ -582,7 +582,7 @@ IFloodlightModule, IInfoProvider {
return handleLldp((LLDP) bsn.getPayload(), sw, inPort, false, cntx);
} else if (eth.getPayload() instanceof LLDP) {
return handleLldp((LLDP) eth.getPayload(), sw, inPort, true, cntx);
} else if (eth.getEtherType() < 1536 && eth.getEtherType() >= 17) {
} else if (eth.getEtherType() < 1536 /*&& eth.getEtherType() >= 17*/) {
long destMac = eth.getDestinationMACAddress().getLong();
if ((destMac & LINK_LOCAL_MASK) == LINK_LOCAL_VALUE) {
ctrLinkLocalDrops.increment();
......@@ -592,10 +592,10 @@ IFloodlightModule, IInfoProvider {
}
return Command.STOP;
}
} else if (eth.getEtherType() < 17) {
} /*else if (eth.getEtherType() < 17) {
log.error("Received invalid ethertype of {}.", eth.getEtherType());
return Command.STOP;
}
}*/
if (ignorePacketInFromSource(eth.getSourceMACAddress())) {
ctrIgnoreSrcMacDrops.increment();
......
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