Add try/catch for ethernet packet deserialize -- will throw an
error here.
@@ -368,9 +368,19 @@ public class Controller implements IFloodlightProviderService, IStorageSourceLis
}
if (alwaysDecodeEth) {
+ try {
eth = new Ethernet();
eth.deserialize(pi.getData(), 0, pi.getData().length);
}
+ catch (RuntimeException e) {
+ if (log.isDebugEnabled()) {
+ log.debug("Failed to deserialize ethernet packet {} -> {}",
+ eth.getSourceMACAddress(), eth.getDestinationMACAddress());
+ }
+ throw new RuntimeException("Error in deserialize ethernet packet", e);
+ }
+
+ }
// fall through to default case...
default:
