VOL-1829: Dont fatally kill the process on a bad packet indication
But do log some better details
Change-Id: Idad16faaf0d8ea5727fc3128b8dd44a04dd788f8
diff --git a/adaptercore/device_handler.go b/adaptercore/device_handler.go
index f468fd1..92b6445 100644
--- a/adaptercore/device_handler.go
+++ b/adaptercore/device_handler.go
@@ -1069,11 +1069,11 @@
etherFrame.VLAN = nil
packet.Data, err = etherFrame.MarshalBinary()
if err != nil {
- log.Fatalf("failed to marshal frame: %v", err)
+ log.Errorw("failed to marshal frame:", log.Fields{"err": err, "etherFrame": etherFrame})
return err
}
if err := (ðerFrame).UnmarshalBinary(packet.Data); err != nil {
- log.Fatalf("failed to unmarshal frame: %v", err)
+ log.Errorw("failed to unmarshal frame:", log.Fields{"err": err, "packetData": packet.Data})
return err
}
log.Debug("Double tagged packet , removed outer vlan", log.Fields{"New frame": etherFrame})