Skip to content

Commit

Permalink
Log unsupported openflow messages but avoid errors
Browse files Browse the repository at this point in the history
With this commit, the openflow drivers would not return an error
when they receive a packet that is not supported. Instead they
log the unsupported message.
  • Loading branch information
soheilhy committed Mar 13, 2016
1 parent 9a717f5 commit 65519ab
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions openflow/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ func (d *of10Driver) handlePkt(pkt of.Header, c *ofConn) error {
case of10.IsStatsReply(pkt10):
return d.handleStatsReply(of10.NewStatsReplyWithBuf(pkt10.Buf), c)
default:
return fmt.Errorf("Received unsupported packet: %v", pkt.Type())
glog.Errorf("Received unsupported packet: %v", pkt.Type())
return nil
}
}

Expand All @@ -71,7 +72,8 @@ func (d *of12Driver) handlePkt(pkt of.Header, c *ofConn) error {
case of12.IsRoleReply(pkt12):
return d.handleRoleReply(of12.NewRoleReplyWithBuf(pkt12.Buf), c)
default:
return fmt.Errorf("received unsupported packet: %v", pkt.Type())
glog.Errorf("received unsupported packet: %v", pkt.Type())
return nil
}
}

Expand Down

0 comments on commit 65519ab

Please sign in to comment.