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

Bug fix WRT closed issue #471. ethertype range check for valid LLC lengths...

Bug fix WRT closed issue #471. ethertype range check for valid LLC lengths expanded to include 17-1535 inclusive and <17 as invalid.
parent 0b5c1873
No related branches found
No related tags found
No related merge requests found
......@@ -582,17 +582,20 @@ 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() < 1500) {
long destMac = eth.getDestinationMACAddress().getLong();
if ((destMac & LINK_LOCAL_MASK) == LINK_LOCAL_VALUE) {
ctrLinkLocalDrops.increment();
if (log.isTraceEnabled()) {
log.trace("Ignoring packet addressed to 802.1D/Q "
+ "reserved address.");
}
return Command.STOP;
}
}
} else if (eth.getEtherType() < 1536 && eth.getEtherType() >= 17) {
long destMac = eth.getDestinationMACAddress().getLong();
if ((destMac & LINK_LOCAL_MASK) == LINK_LOCAL_VALUE) {
ctrLinkLocalDrops.increment();
if (log.isTraceEnabled()) {
log.trace("Ignoring packet addressed to 802.1D/Q "
+ "reserved address.");
}
return Command.STOP;
}
} 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